Get image
get_imageGet the images of a generation started by generate_image. Waits up to wait_seconds if they are not ready yet; call it again while it says "Still generating". Without creation_id it returns the latest generation started with this API key (use that if generate_image timed out or failed after starting).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| creation_id | No | The creation_id returned by generate_image, exactly as returned. Leave empty for the latest generation started with this API key. | |
| wait_seconds | No | How long this call may take, in seconds (default 45, at most 120). Many apps cancel a tool call after about 60 seconds, so keep the default unless you know your app allows longer calls. If the images are not ready in time, the answer says so and gives the creation_id. | |
| return_images | No | Whether to show the finished images in the answer (up to 2 small ones) so you can see them. Links are always returned. Set false to save context. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | ||
| images | Yes | Finished images; empty while running. | |
| prompt | No | ||
| status | Yes | "done": the images are ready. "running": still generating; call get_image with creation_id. | |
| blocked | No | Images removed by the content filter. | |
| cost_usd | No | ||
| warnings | No | ||
| next_step | Yes | What to do next. | |
| creation_id | Yes | ID of the generation; pass it to get_image. | |
| cost_credits | No | Charged from the paid balance, in credits (1 credit = $0.0025). | |
| free_images_used | No | Free daily images used instead of the paid balance. |