edit_image
Revise an existing image or combine several references to apply follow-up changes, saving each result as a new numbered version while keeping earlier versions available.
Instructions
Revises an existing image, or combines several as references, and saves the result.
This is the tool for follow-up changes ("make it black", "add sunglasses", "remove the
background"): pass the saved path of the latest version from the previous result. The
result is saved as the next numbered version, so earlier versions stay available.
Args:
prompt: The change to make, and what must stay the same, for example "Make the cat's
fur black. Keep the pose, background, and lighting unchanged." For several
references, describe the new image to build from them.
image_paths: Full paths to one or more local PNG, JPEG, or WebP files. For a revision,
the single most recent version.
mask_path: Optional PNG whose transparent areas mark where to edit the first image.
size: "auto" or WIDTHxHEIGHT, with the same rules as generate_image.
quality: "low" for fast drafts up to "max".
background: "transparent" needs output_format "png" or "webp".
output_format: File format of the saved image.
n: Number of results, 1 to 4. Each one is billed.
model: A model ID for this request only. Leave empty to use the user's default.
open_after: Open each saved image in the user's default image viewer. Set it when the
user asks to see or open the result, which helps most in Claude Code, where the chat
is a terminal that can't display images.
input_fidelity: Leave as "auto". GPT Image 2 and later always preserve input detail and
reject this option; "high" helps only older models keep faces and fine detail.
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>",
"image_paths": "<image_paths>"
},
"name": "edit_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| size | No | auto | |
| model | No | ||
| prompt | Yes | ||
| quality | No | auto | |
| mask_path | No | ||
| background | No | auto | |
| open_after | No | ||
| image_paths | Yes | ||
| output_format | No | png | |
| input_fidelity | No | auto |