ImageGenerationImageGeneration
​Image​GenerationCertified

Generate images with LLMs using a natural language prompt.

Generate an image with LLMs

Generate images with LLMs using a natural language prompt.

yaml
type: "io.kestra.plugin.ai.completion.ImageGeneration"

Generate an image using OpenAI (DALL-E 3)

yaml
id: image_generation
namespace: company.ai

tasks:
  - id: image_generation
    type: io.kestra.plugin.ai.completion.ImageGeneration
    prompt: >
      Four-panel comic page about a data engineer shipping a workflow.
      Clean modern line art with soft colors and ample white space.
      Panel 1: Early morning desk setup with dual monitors, coffee, and a workflow DAG on screen; calm focused mood.
      Panel 2: Debugging a failing task; close-up of terminal and error icon; speech bubble: "hmm…"
      Panel 3: Fix applied; green checks ripple through the pipeline; small celebratory detail (cat paw, fist pump).
      Panel 4: Deployed dashboard showing metrics trending up; sticky note says "ship it".
      Include subtle tech props (cloud icons, database cylinder) but no logos.
      Minimal readable text only in tiny bubbles/notes; no large paragraphs of text.
    provider:
      type: io.kestra.plugin.ai.provider.OpenAI
      apiKey: "{{ kv('OPENAI_API_KEY') }}"
      modelName: dall-e-3
Properties

Image prompt

The input prompt for the image generation model

Language Model Provider

Definitions
accessKeyId*Requiredstring

AWS Access Key ID

modelName*Requiredstring
secretAccessKey*Requiredstring

AWS Secret Access Key

type*Requiredobject
baseUrlstring
caPemstring
clientPemstring
modelTypestring
DefaultCOHERE
Possible Values
COHERETITAN

Amazon Bedrock Embedding Model Type

apiKey*Requiredstring
modelName*Requiredstring
type*Requiredobject
baseUrlstring
caPemstring
clientPemstring
maxTokensintegerstring

Maximum Tokens

Specifies the maximum number of tokens that the model is allowed to generate in its response.

endpoint*Requiredstring

API endpoint

The Azure OpenAI endpoint in the format: https://{resource}.openai.azure.com/

modelName*Requiredstring
type*Requiredobject
apiKeystring
baseUrlstring
caPemstring
clientIdstring

Client ID

clientPemstring
clientSecretstring

Client secret

serviceVersionstring

API version

tenantIdstring

Tenant ID

apiKey*Requiredstring
modelName*Requiredstring
type*Requiredobject
baseUrlstring
Defaulthttps://dashscope-intl.aliyuncs.com/api/v1
text
If you use a model in the China (Beijing) region, you need to replace the URL with: https://dashscope.aliyuncs.com/api/v1,
otherwise use the Singapore region of: "https://dashscope-intl.aliyuncs.com/api/v1.
The default value is computed based on the system timezone.
caPemstring
clientPemstring
enableSearchbooleanstring

Whether the model uses Internet search results for reference when generating text or not

maxTokensintegerstring
repetitionPenaltynumberstring

Repetition in a continuous sequence during model generation

text
Increasing repetition_penalty reduces the repetition in model generation,
1.0 means no penalty. Value range: (0, +inf)
apiKey*Requiredstring
modelName*Requiredstring
type*Requiredobject
baseUrlstring
Defaulthttps://api.deepseek.com/v1
caPemstring
clientPemstring
gitHubToken*Requiredstring

GitHub Token

Personal Access Token (PAT) used to access GitHub Models.

modelName*Requiredstring
type*Requiredobject
baseUrlstring
caPemstring
clientPemstring
apiKey*Requiredstring
modelName*Requiredstring
type*Requiredobject
baseUrlstring
caPemstring
clientPemstring
endpoint*Requiredstring

Endpoint URL

location*Requiredstring

Project location

modelName*Requiredstring
project*Requiredstring

Project ID

type*Requiredobject
baseUrlstring
caPemstring
clientPemstring
apiKey*Requiredstring
modelName*Requiredstring
type*Requiredobject
baseUrlstring
Defaulthttps://router.huggingface.co/v1
caPemstring
clientPemstring
baseUrl*Requiredstring
modelName*Requiredstring
type*Requiredobject
caPemstring
clientPemstring
apiKey*Requiredstring
modelName*Requiredstring
type*Requiredobject
baseUrlstring
caPemstring
clientPemstring
compartmentId*Requiredstring

OCID of OCI Compartment with the model

modelName*Requiredstring
region*Requiredstring

OCI Region to connect the client to

type*Requiredobject
authProviderstring

OCI SDK Authentication provider

baseUrlstring
caPemstring
clientPemstring
endpoint*Requiredstring

Model endpoint

modelName*Requiredstring
type*Requiredobject
baseUrlstring
caPemstring
clientPemstring
apiKey*Requiredstring
modelName*Requiredstring
type*Requiredobject
baseUrlstring
Defaulthttps://api.openai.com/v1
caPemstring
clientPemstring
apiKey*Requiredstring
modelName*Requiredstring
type*Requiredobject
baseUrlstring
caPemstring
clientPemstring
accountId*Requiredstring

Account Identifier

Unique identifier assigned to an account

apiKey*Requiredstring
modelName*Requiredstring
type*Requiredobject
baseUrlstring

Base URL

Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).

caPemstring
clientPemstring
apiKey*Requiredstring

API Key

modelName*Requiredstring

Model name

type*Requiredobject
baseUrlstring
Defaulthttps://open.bigmodel.cn/

API base URL

The base URL for ZhiPu API (defaults to https://open.bigmodel.cn/)

caPemstring

CA PEM certificate content

CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.

clientPemstring

Client PEM certificate content

PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.

maxRetriesintegerstring

The maximum retry times to request

maxTokenintegerstring

The maximum number of tokens returned by this request

stopsarray
SubTypestring

With the stop parameter, the model will automatically stop generating text when it is about to contain the specified string or token_id

Possible Values
STOPLENGTHTOOL_EXECUTIONCONTENT_FILTEROTHER

Finish reason

Generated image URL

The URL of the generated image

Token usage

Definitions
inputTokenCountinteger
outputTokenCountinteger
totalTokenCountinteger
Unittoken

Large Language Model (LLM) input token count

Unittoken

Large Language Model (LLM) output token count

Unittoken

Large Language Model (LLM) total token count