Image
TextToImage
Dalle

Name

dalleUrlTextToImage or dalleBase64TextToImage depending on the desired output.

Description

Returns an image generated by Dalle from the given text prompt.

API Key

Uses the openai API key:

index.ts

const aigur = createClient({
apiKeys: {
openai: process.env.OPENAI_KEY
}
})

Example

index.ts

import { dalleUrlTextToImage } from '@aigur/client';
//...
flow.node(dalleUrlTextToImage, () => ({
prompt: 'a dog',
})) // --> {url: `http://...`}

Input

Property Type Required Description Default Value
prompt string Yes The prompt to create the image from.
size enum('256x256', '512x512', '1024x1024') No The size of the generated image. Smaller images will be faster to generate. 512x512

Output

The output depends on the exact Node you use (dalleUrlTextToImage or dalleBase64TextToImage)

dalleUrlTextToImage

Property Type
url string

dalleBase64TextToImage

Property Type
result string (base64)