CreateImage
CreateImage
yaml
type: "io.kestra.plugin.openai.CreateImage"
Given a prompt, create an image.
For more information, refer to the OpenAI Image Generation API docs.
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
- Type: string
- Dynamic: ✔️
- Required: ✔️
The OpenAI API key.
prompt
- Type: string
- Dynamic: ✔️
- Required: ✔️
Message to send to the API as prompt.
clientTimeout
- Type: integer
- Dynamic: ❓
- Required: ❌
- Default:
10
The maximum number of seconds to wait for a response.
download
- Type: boolean
- Dynamic: ❌
- Required: ❌
- 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.
n
- Type: integer
- Dynamic: ❓
- Required: ❌
The number of images to generate. Must be between 1 and 10.
size
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
LARGE
- Possible Values:
SMALL
MEDIUM
LARGE
The size of the generated images.
user
- Type: string
- Dynamic: ✔️
- Required: ❌
A unique identifier representing your end-user.
Outputs
images
- Type: array
- SubType: string
- Required: ❌
Generated images.
Definitions
Was this page helpful?