Generate or edit an image
generate_imageUse to create an image from a prompt, or to edit images by passing image_urls. Costs depend on the model (default Nano Banana 2.1: 16 credits at 1K); credits are reserved up front and refunded if it fails. Waits up to ~40 s and usually returns the finished image, which the user also sees in a card. If status is still queued or running, call check_job every 10-20 s.
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>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| model | No | Image model id; the default if omitted. | |
| theme | No | A brand kit (name, id or 'default') to keep it on brand. | |
| prompt | Yes | What to make, in plain words. | |
| use_logo | No | With theme: give the model the kit's logo to place. | |
| character | No | A saved Character (name or id) to keep their look. | |
| image_urls | No | Source or reference images (http URLs) to edit or follow. | |
| resolution | No | 1k, 2k or 4k where the model offers it. | |
| aspect_ratio | No | 1:1 |