Edit / iterate images in existing chats
edit_imagesRefine existing images in a ChatGPT chat by sending a follow-up prompt, keeping full context of prior results. Use it to adjust backgrounds, poses, or text on generated images.
Instructions
Send a follow-up prompt into existing ChatGPT chats (by chat_id from an earlier result, or a chatgpt.com/c/... URL) to refine the image there — 'make the background darker', 'same character, now running', 'fix the text to say X'. The chat keeps full context of previous images. Several edits (different chats) run in parallel; edits to the same chat run in order.
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": {
"edits": "<edits>"
},
"name": "edit_images"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Wait for the images before returning (default). false = return job ids immediately; collect later with wait_for_jobs. | |
| edits | Yes | ||
| output_dir | No | Folder to save images into. Default: /root/.gpt-image-mcp/images | |
| return_images | No | Return small JPEG previews inline (~500 tokens each) so you can see the results. Set false to save tokens. Files are always saved. | |
| timeout_seconds | No | Max seconds this call blocks (capped at 50s so it never hits client tool timeouts). Unfinished jobs keep running — collect them with wait_for_jobs. |