Generate an image
flow_generate_imageCreate images from text prompts with Nano Banana models through Flow agent composer and download them to a specified folder. Supports preview before spending credits and resume for in-flight generations.
Instructions
Generate images through the Flow agent composer (Nano Banana models) and download them. Spends Flow credits when auto_confirm=true; auto_confirm=false prepares and verifies without sending. resume=true only waits for / downloads an in-flight generation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>",
"project_url": "<project_url>",
"output_dir": "<output_dir>"
},
"name": "flow_generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of images to request | |
| model | No | nano-banana-pro | |
| ratio | No | 1:1 | |
| job_id | No | ||
| prompt | Yes | ||
| resume | No | ||
| output_dir | Yes | ||
| project_url | Yes | ||
| auto_confirm | No | ||
| reference_images | No | Local image paths attached as visual references |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| files | Yes | Absolute paths of downloaded outputs | |
| model | Yes | ||
| ratio | Yes | ||
| job_id | Yes | Pass back with resume=true to pick up this generation after a restart | |
| prompt | Yes | The exact instruction sent to the Flow agent | |
| status | Yes | ||
| duration | No | ||
| media_ids | Yes | ||
| elapsed_ms | Yes | ||
| screenshot | No | ||
| approval_text | Yes | Text of the approval card if one was shown (contains the credit cost) | |
| references_attached | Yes |