All nodes/AI/Media (Speech / Image / Video)
Generate Image
Generate an image from text (text2img) or from text + an input image (img2img). Parameters (size/quality/n) depend on the selected model.
Type in the graph: image_generate
ToolExec
An error branch can be enabled (expose_error_output) to handle failures on their own path.
Ports can be split into separate execution and data handles.
Try it
Minimal working workflow
- Execute + Data
Pick your own connection or knowledge base first — the graph carries REPLACE_ME.
When to use it
The node draws an image from a text description, and edits an existing one when you connect a file. To merely look at a picture and answer about it you need no node at all — the attachment is read by the model itself inside an AI Agent or an LLM Response.
The wiring decides the role. An edge out of Images into the next step makes it an ordinary graph
node; an edge out of tool_out into an agent’s Extensions port makes it a tool, so the model decides
when to draw and the picture is attached to its reply.
How it works
The model list comes from the media catalog. A given model’s parameters — size, quality, number of images, seed — appear in the form only after the model is picked, because every model declares its own. Switching models drops the values the new one does not declare.
Connect a file to the Input image port and the same node becomes img2img: the description turns
into a description of the edit. For a model that accepts no reference, the port is not drawn at all.
The tool role is subtler: tool arguments carry only text, so “redraw this photo” works through the Use the turn’s images as a reference (agent tool) switch, which hands the model the images the user attached to that turn. The result always reaches the user; it enters the model’s own context only with Show the result to the model, and an inlined picture costs input tokens on every generation.
Generated files land in the workspace file store; what travels down the graph is a reference, not bytes.
Common mistakes
- An
Images→Filesedge into Exit. The Files port accepts pure data only. Turn on Split output ports and draw the edge fromimages_data. - Expecting a single picture.
imagesis a list: if the model drew several, all of them travel on. - A leftover edge into
Input imageafter a model change. The port disappears, the saved edge stays — and the node refuses to run rather than send the reference nowhere. - Writing the prompt only in the field. The
Promptport wins; the field is used when the port delivered nothing. - An empty connection instead of your own key. A connection with no key falls back to the platform key and is billed as usual. With your own key (BYO) the generation is not charged.
Inputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
Promptprompt | Execute + Dataexecute_data | string | shown when operation_mode ≠ "as_tool" |
Input imageimage | Datadata | file | accepts many edges shown when operation_mode ≠ "as_tool" |
Outputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
Imagesimages | Execute + Dataexecute_data | file | shown when operation_mode ≠ "as_tool" |
As Tooltool_out | Extensionlink_extension | — | shown when operation_mode ≠ "executable" |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
Node modeoperation_mode | string | executable | Executable — a step in the graph, with Run/Success ports. As Tool — an extension an AI Agent calls itself; only the tool_out port is shown and the agent decides when to run it. Options: |
Promptprompt | string | "" | Used when no 'prompt' input is connected. supports templates shown when operation_mode = executable |
Modelmodel | string | openrouter/openai/gpt-image-1 | Image model from the media catalog (e.g. 'openrouter/openai/gpt-image-1'). Its own parameters (size, quality, number of images) appear below once the model is selected; models that accept no reference image also hide the 'image' port. Options: |
| Advanced | |||
Show the result to the modelshow_result_to_model | boolean | false | Inline the generated file into the conversation after the tool result, so the model can look at what it produced and refine it on a following round. Off by default: an inlined file costs input tokens on every generation. shown when operation_mode = as_tool |
Stream progress to Catch Tool Callstream_progress_in_catch | boolean | true | Emit loading/success lines for this tool into a connected catch_tool_call node. shown when operation_mode = as_tool |
Use the turn's images as a reference (agent tool)use_turn_images | boolean | true | When an AI Agent calls this node as a tool, send the images the user attached to that turn as the reference (img2img / edit). The tool arguments cannot carry bytes, so this is the only way "redraw this photo" reaches the provider. Ignored on the graph path, which uses the 'image' port. shown when operation_mode = as_tool |
Connection Idconnection_id | string | "" | Optional workspace connection carrying your own provider key (BYO). Empty = the platform key from the environment. connection: openrouter |
Shared fields
Every node has these three — the platform adds them, not the node author.
expose_error_output— When enabled, show an execution output to connect nodes that run if this step fails.split_ports_in— Show separate execution and data input handles instead of one combined port.split_ports_out— Show separate execution and data output handles instead of one combined port.