OpenAI CreateImage

OpenAI CreateImage

Certified

Generate images with OpenAI

Creates one or more images from a prompt using OpenAI Images. Default size is 1024x1024; optionally download Base64 content into Kestra internal storage or return remote URLs. 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') }}"
    download: true
    n: 5
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

Default false. When true, saves Base64 output to Kestra internal storage; when false, returns image URLs.

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 internal storage URIs or remote URLs depending on download.