Docs / Workflows / Actions / Image generation
Image generation
Create images from a description and optional reference images. The result is saved as OAIZ files for later jobs to use.
Image request
The prompt describes the image to create and can include event properties. Input-event images and images from attached knowledge can act as references. PNG, JPEG and WebP references are supported, with at most 16 reference images per request.
- count
- Generates 1 to 4 images. The default is 1.
- size
- Selects auto or a supported WIDTHxHEIGHT size. Common presets include 1024x1024, 1536x1024 and 1024x1536.
- format
- Stores the output as PNG, JPEG or WebP. PNG is the default.
Models and image settings
- GPT Image 2.6 Flare
- Uses openai/gpt-image-2.6-flare. Quality can be auto, low, medium, high, xhigh or max. Background can be auto, opaque or transparent. This is the default model.
- GPT Image 2.6 Sunburst
- Uses openai/gpt-image-2.6-sunburst. Supports the same size, quality, format and background options as 2.6 Flare.
- GPT Image 2.5 Flare
- Uses openai/gpt-image-2.5-flare. Supports xhigh and max quality and transparent backgrounds.
- GPT Image 2.5 Sunburst
- Uses openai/gpt-image-2.5-sunburst. Supports the same size, quality, format and background options as Flare.
Transparent backgrounds require PNG or WebP. All four models also accept custom sizes whose sides are multiples of 16, each between 480 and 3840 pixels. Total size must be between 655,360 and 8,294,400 pixels, with the longer side at most three times the shorter side.
Use a reference image
For example, an input event can carry a product photograph. A prompt can ask for a version on a transparent background while keeping the product’s shape and colours. This configuration uses that image as a reference and requests one square PNG.
{
"prompt": "Use the attached product photograph as a reference. Keep the product\u2019s shape and colours and remove the background.",
"model": "openai/gpt-image-2.6-flare",
"count": 1,
"size": "1024x1024",
"quality": "high",
"format": "png",
"background": "transparent"
}Files and metadata
Generated files are attached to the configured output event. The action also returns count, model, provider, size, quality, format and background under action.*. It returns requestId when the provider supplies one. Map the values a later job needs into the output event. These values describe the images. The files carry their bytes.
A later integration action can upload or send the attached files. Generation still makes a real provider call and stores files during a test when event publication is off.