New to Kestra?
Use blueprints to kickstart your first workflows.
Turn a text prompt into an AI generated image using OpenAI DALL-E, orchestrated in Kestra with declarative YAML, retries, and downloadable outputs.
id: openai-dall-e-create-image
namespace: company.team
tasks:
- id: puppy
type: io.kestra.plugin.openai.CreateImage
apiKey: "{{ secret('OPENAI_API_KEY') }}"
n: 1
download: true
prompt: the cutest little happy smiling puppy
Generate AI images from a text prompt using OpenAI DALL-E, fully orchestrated in Kestra. This blueprint takes a natural language prompt, calls the DALL-E image generation API, and makes the resulting image available for download straight from the execution Outputs tab. It solves a common gap in generative AI workflows: turning one off API calls into a repeatable, parameterized, scheduled, and observable pipeline that fits alongside the rest of your data and automation stack.
The flow runs a single task, puppy, of type io.kestra.plugin.openai.CreateImage. It authenticates to OpenAI with apiKey sourced from {{ secret('OPENAI_API_KEY') }}, sends the prompt to DALL-E, requests n: 1 image, and sets download: true so Kestra stores the generated image in internal storage. Because download is enabled, the image appears in the Outputs tab of the execution and can be downloaded directly or passed to downstream tasks.
OpenAI exposes an API, not a scheduler or a workflow engine. Kestra fills that gap: trigger generation on a schedule or in response to events, apply automatic retries when the API rate limits or times out, capture full execution lineage and logs for every run, and keep the whole definition as declarative YAML in version control. You get reproducibility, observability, and the ability to wire image generation into upstream and downstream tasks, which the OpenAI API alone cannot provide.
OPENAI_API_KEY: your OpenAI API key used by the CreateImage task.OPENAI_API_KEY secret to your Kestra instance.prompt to describe the image you want.prompt as an input so users can drive generation at execution time.n to generate multiple variations in a single run.