
OpenAI CreateImage
CertifiedGenerate images with OpenAI
OpenAI CreateImage
Generate images with OpenAI
Creates one or more images from a prompt using OpenAI Images.
Default size is 1024x1024.
GPT Image results are stored in Kestra internal storage.
For legacy DALL-E requests, download: true requests content for internal storage instead of a remote URL.
OpenAI retired DALL-E 2 and 3 in May 2026.
See the Images API docs.
type: io.kestra.plugin.openai.CreateImageExamples
id: openai
namespace: company.team
tasks:
- id: create_image
type: io.kestra.plugin.openai.CreateImage
prompt: A funny cat in a black suit
apiKey: "{{ secret('OPENAI_API_KEY') }}"
model: gpt-image-1
Properties
apiKey *string
OpenAI API key
prompt *string
Image prompt
Required text sent to the Images API.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150clientTimeout integer
10The maximum number of seconds to wait for a response
download booleanstring
falseDownload generated images
Defaults to false.
For legacy dall-e-* models, true requests Base64 output and stores the images in Kestra internal storage; false returns image URLs.
gpt-image-* models always return Base64, so their images are stored regardless of this setting.
model string
gpt-image-1OpenAI image model
Model used to generate images. Defaults to gpt-image-1. Any image model accepted by the OpenAI API can be set, e.g. gpt-image-1-mini.
n integer
Number of images
Between 1 and 10; OpenAI defaults to 1 when unset.
quality string
AUTOLOWMEDIUMHIGHImage quality
One of auto, low, medium, high.
size string
LARGESMALLMEDIUMLARGEImage size
Defaults to 1024x1024; choose 256x256, 512x512, or 1024x1024.
user string
A unique identifier representing your end-user
Outputs
images array
Generated images
List of image URIs.
Legacy DALL-E returns remote URLs when download is false and Kestra internal storage URIs when true.
GPT Image always returns internal storage URIs.