Generate image
generate_imageStart an image from text (a model with mode text-to-image), or edit / combine images (a model with mode image-to-image: pass them in images). Take the model id and its options from list_models. Spends credits: tell the user the price from list_models first. Returns a taskId; most images take 10–60 seconds. Failed generations are refunded automatically. Images must be public https URLs; use upload_media for the user's own files.
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": {
"model": "<model>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | An image model id from list_models. | |
| images | No | Image-to-image: the images to edit or combine. | |
| prompt | No | What the image shows, or what to change. | |
| resolution | No | One of the model's resolutions. Default: its first. | |
| aspect_ratio | No | One of the model's aspect ratios. Default: 1:1 where offered. | |
| output_format | No | gif: only text-to-image on models with gifOutput. | |
| transparent_background | No | Only for models with transparentBackground. |