edit_image
Edit or compose 1-4 local reference images from a text prompt for product retouching, background replacement, style transfer, and UI mockups.
Instructions
Edit or compose 1-4 local reference images using a text prompt via /v1/images/edits (multipart upload). Great for product photography retouching, background replacement, style transfer, and UI mockups.
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 |
|---|---|---|---|
| size | No | Optional output size such as 1024x1024, 1024x1536, 1536x1024, 1024x1792, 1792x1024, auto. | |
| model | No | Model ID (default: gpt-image-2.5). For multi-image reference consistency, gemini-3.1-flash-image or gemini-3-pro-image is recommended. | |
| prompt | Yes | Editing instruction describing how to transform or combine the input image(s). | |
| quality | No | Optional quality level: auto, low, medium, or high. | |
| image_paths | Yes | Array of 1 to 4 local file paths (PNG/JPG/WebP) to edit or reference. | |
| output_path | No | Optional local file path to save the edited image. | |
| response_format | No | Preferred upstream response format (default: b64_json). | |
| include_inline_image | No | Whether to return an inline MCP image content block when binary data is available (default: true). |