Edit an image
edit_imageChange a picture you give (image_url or input_images, as https:// links or data: URIs) following a prompt, with an editing model. Spends from your balance.
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>",
"prompt": "<prompt>"
},
"name": "edit_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | How many pictures, 1 to 10. Default 1. | |
| size | No | Width x height, e.g. 1024x1024, when the model lists sizes. | |
| model | Yes | An image model id. | |
| prompt | Yes | What to make. | |
| options | No | Any other option from get_model's parameters schema. | |
| max_cost | No | The most you will pay in US dollars; a request that can cost more is refused before anything is spent. | |
| image_url | No | The picture to change: an https:// link or a data: URI. | |
| aspect_ratio | No | Shape, e.g. 16:9, when the model lists aspect ratios. | |
| input_images | No | Several pictures to work from (https:// links or data: URIs). | |
| return_image | No | Also return the pictures themselves in the answer, so you can look at them. |