Generate an image
generate_imageGenerate one image from a prompt after quoting credits; poll get_run for delivery. Failed generations cost nothing, and identical requests reuse the existing run unless you pass attempt 2.
Instructions
Input: the same fields as quote_image, plus attempt. Generate one image from a prompt, a NEW run, charged the quoted credits once delivered; its run_id can be a later reference. Poll get_run. A generation that fails is charged nothing. Repeating an identical request returns the run it started, starting nothing new; pass attempt 2 for another one. Price: 5 to 38 credits per image, by model and size. Quote first with quote_image.
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>",
"model": "<model>",
"aspect_ratio": "<aspect_ratio>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| prompt | Yes | ||
| attempt | No | ||
| keep_text | No | ||
| references | No | ||
| max_credits | No | ||
| aspect_ratio | Yes |