Given a prompt, create an image.
For more information, refer to the OpenAI Image Generation API docs.
yaml
type: "io.kestra.plugin.openai.CreateImage"
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
Dynamic YES
The OpenAI API key.
Dynamic YES
Message to send to the API as prompt.
Dynamic YES
Default LARGE
Possible Values
SMALLMEDIUMLARGE
The size of the generated images.
Dynamic NO
Default 10
The maximum number of seconds to wait for a response.
Dynamic YES
Default false
Whether 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.
Dynamic NO
The number of images to generate. Must be between 1 and 10.
Dynamic YES
A unique identifier representing your end-user.
SubType string
Generated images.