edit_image
Edit an existing PNG or JPEG by providing a text instruction describing what to change. The modified image is saved as a new PNG file while preserving the original.
Instructions
Edit an existing PNG or JPEG with gpt-image-2 on Azure AI Foundry, following a text instruction. The result is written to disk as a PNG and the tool returns its path. The source file is never modified.
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": {
"image": "<image>",
"prompt": "<prompt>"
},
"name": "edit_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Path to the source PNG or JPEG. | |
| prompt | Yes | What to change in the image. | |
| output_path | No | Where to write the result. Must end in .png. |