Generate Image
generate_image · Nodes · AI
Generate an image from a text prompt using a configured image provider.
Generate Image#
Generates an image from a text prompt using a configured AI image generation provider. Supports DALL-E 3, Google Gemini, Stable Diffusion, Flux, and more.
What It Does#
The Generate Image node takes a text prompt, optional source images, and optional parameters (negative prompt, aspect ratio, seed), then sends them to your configured image generation model through a workspace connection. The model generates or edits an image, which is returned as a binary object on the output socket.
Key capabilities:
- Text-to-image: Generate images from natural language descriptions
- Image-conditioned generation: Feed one source image or a list of source images to models that support edits/composition
- Provider diversity: OpenAI (DALL-E 3), xAI, Google Gemini, Stability AI, Replicate, Fal.ai
- Configuration controls: Aspect ratio, negative prompting, seed for reproducibility
- Binary output: Returns raw image bytes with content type, filename, and dimensions when available
When to Use#
- Generating illustrations for documents or reports
- Creating visual assets for social media or presentations
- Producing design mockups from text descriptions
- Combining concept art or reference images into a generated result
- Building automated image generation pipelines
- Generating test images for e2e verification (test_image provider)
How It Works#
- Model resolution: The configured connection and model are validated against the ImageGenerator model kind
- Provider dispatch: The provider ID is matched to the correct provider implementation
- Image input resolution: Optional
imagesinput is resolved from binary, base64 JSON, URL, or stored media reference - API request: The prompt, optional images, and optional parameters are sent to the provider endpoint
- Response handling: The returned image bytes, content type, and dimensions (when known) are packaged into the binary output object
- Downstream flow: Use
upload_mediato persist the image to workspace storage
Inputs#
| Name | Type | Required | Description |
|---|---|---|---|
input |
any | No | Optional input data for prompt interpolation |
images |
media input or media input[] | No | Source image or images for model-supported edits/composition |
images accepts runtime binary, { binary }, { base64, mime_type, filename? }, { url }, http/https URL, an object descriptor, { object_id }, or a list of those values. Source inputs must resolve to image/* content.
Configuration#
| Field | Type | Required | Description |
|---|---|---|---|
model |
model | Yes | Image generation connection and model |
prompt |
text | Yes | Text prompt describing the image to generate. Supports template interpolation |
negative_prompt |
text | No | Text prompt describing what to avoid in the image |
aspect_ratio |
string | No | Desired aspect ratio (provider-dependent, e.g., "16:9", "1:1") |
seed |
number | No | Random seed for reproducible generation |
output_format |
string | No | Desired output format (provider-dependent, e.g., "png", "jpeg") |
Output#
| Name | Type | Description |
|---|---|---|
output |
object | Binary image output with binary, filename, content_type, width, height fields |
The output object includes:
binary: Raw image bytesfilename: Generated filename (e.g.,test-image-black.png)content_type: MIME type (e.g.,image/png)width: Image width in pixels (when available from provider)height: Image height in pixels (when available from provider)
Supported Providers#
| Provider | Models | Notes |
|---|---|---|
| OpenAI | GPT Image | Bearer auth, base64 response. GPT Image models support images input through image edits |
| xAI | grok-image-2 | OpenAI-compatible API |
| Google Gemini | Gemini image models | API key auth. Gemini image models support inline images input |
| Stability AI | stable-image-core, stable-image-ultra | Multipart form, raw image response |
| Replicate | flux-dev, flux-schnell | Async polling with exponential backoff |
| Fal.ai | flux-dev, flux-schnell | Key auth, async polling |
| Test Image | black-png-v1 | Deterministic 1x1 black PNG for testing |
Caveats#
- Width/height are
Nonefor some providers that do not return dimensions - Output is a raw binary object; use
upload_mediadownstream to persist to workspace storage - Async providers (Replicate, Fal.ai) use exponential backoff: 1s → 2s → 4s, capped at 10s, max 120s total
- Provider-specific parameter support varies
- If
imagesis connected to a model that does not support input images, the node fails instead of silently ignoring them
Inputs
inputRequiredimagesOptional
Outputs
output
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
model | model | Yes | Choose an image generation connection and model. |
prompt | text_block | Yes | Prompt describing the image to generate |
negative_prompt | text_block | Yes | Optional negative prompt |
aspect_ratio | string | Yes | Optional aspect ratio (e.g. 1:1, 16:9) |
seed | number | Yes | Optional seed for reproducible results |
output_format | string | Yes | Optional output format |
base_config | record | No | Shared node configuration. failure_mode decides what a failure of this node does to the workflow; leave it at the default stop unless the workflow handles the failure itself on the node's error output (route_to_error) or the node is a rare emergency kill switch (stop_workflow). |