 CreateImage
CreateImage
Given a prompt, create an image with OpenAI.
For more information, refer to the OpenAI Image Generation API docs.
yaml
type: "io.kestra.plugin.openai.CreateImage"Examples
yaml
id: openai
namespace: company.team
tasks:
  - id: create_image
    type: io.kestra.plugin.openai.CreateImage
    prompt: A funny cat in a black suit
    apiKey: <your-api-key>
    download: true
    n: 5
Properties
apiKey *Requiredstring
OpenAI API key
prompt *Requiredstring
Message to send to the API as prompt
clientTimeout Non-dynamicinteger
 Default 
10The maximum number of seconds to wait for a response
download booleanstring
 Default 
falseWhether to download the generated image
If enable, the generated image will be downloaded inside Kestra's internal storage. Else, the URL of the generated image will be available as task output.
n Non-dynamicinteger
The number of images to generate; must be between 1 and 10.
size string
 Default 
LARGE Possible Values 
SMALLMEDIUMLARGEThe size of the generated images.
user string
A unique identifier representing your end-user
Outputs
images array
 SubType string
Generated images
