ImageGeneration
Generate an image with LLMs
Generate images with LLMs using a natural language prompt.
type: "io.kestra.plugin.ai.completion.ImageGeneration"
Examples
Generate an image using OpenAI (DALL-E 3)
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
prompt *Requiredstring
Image prompt
The input prompt for the image generation model
provider *RequiredNon-dynamicAmazonBedrockAnthropicAzureOpenAIDeepSeekGoogleGeminiGoogleVertexAIMistralAIOllamaOpenAI
Language Model Provider
Outputs
finishReason string
STOP
LENGTH
TOOL_EXECUTION
CONTENT_FILTER
OTHER
Finish reason
imageUrl string
Generated image URL
The URL of the generated image
tokenUsage TokenUsage
Token usage
Definitions
Azure OpenAI Model Provider
endpoint *Requiredstring
API endpoint
The Azure OpenAI endpoint in the format: https://{resource}.openai.azure.com/
modelName *Requiredstring
Model name
type *Requiredobject
apiKey string
API Key
clientId string
Client ID
clientSecret string
Client secret
serviceVersion string
API version
tenantId string
Tenant ID
Google VertexAI Model Provider
endpoint *Requiredstring
Endpoint URL
location *Requiredstring
Project location
modelName *Requiredstring
Model name
project *Requiredstring
Project ID
type *Requiredobject
Google Gemini Model Provider
apiKey *Requiredstring
API Key
modelName *Requiredstring
Model name
type *Requiredobject
Mistral AI Model Provider
apiKey *Requiredstring
API Key
modelName *Requiredstring
Model name
type *Requiredobject
baseUrl string
API base URL
Ollama Model Provider
endpoint *Requiredstring
Model endpoint
modelName *Requiredstring
Model name
type *Requiredobject
OpenAI Model Provider
apiKey *Requiredstring
API Key
modelName *Requiredstring
Model name
type *Requiredobject
baseUrl string
API base URL
io.kestra.plugin.ai.domain.TokenUsage
inputTokenCount integer
outputTokenCount integer
totalTokenCount integer
Deepseek Model Provider
apiKey *Requiredstring
API Key
modelName *Requiredstring
Model name
type *Requiredobject
baseUrl string
https://api.deepseek.com/v1
API base URL
Amazon Bedrock Model Provider
accessKeyId *Requiredstring
AWS Access Key ID
modelName *Requiredstring
Model name
secretAccessKey *Requiredstring
AWS Secret Access Key
type *Requiredobject
modelType string
COHERE
COHERE
TITAN
Amazon Bedrock Embedding Model Type
Anthropic AI Model Provider
apiKey *Requiredstring
API Key
modelName *Requiredstring
Model name