OpenAI CreateImage

OpenAI CreateImage

Certified

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.

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: "{{ secret('OPENAI_API_KEY') }}"
    model: gpt-image-1
Properties

OpenAI API key

Image prompt

Required text sent to the Images API.

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.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset 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.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Default10

The maximum number of seconds to wait for a response

Defaultfalse

Download 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.

Defaultgpt-image-1

OpenAI 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.

Number of images

Between 1 and 10; OpenAI defaults to 1 when unset.

Possible Values
AUTOLOWMEDIUMHIGH

Image quality

One of auto, low, medium, high.

DefaultLARGE
Possible Values
SMALLMEDIUMLARGE

Image size

Defaults to 1024x1024; choose 256x256, 512x512, or 1024x1024.

A unique identifier representing your end-user

SubTypestring

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.