Edit Image
edit_imageEdit an existing local PNG/JPEG using natural-language instructions and a reference image to keep the result close to the original. Queue variations and reproduce edits with exact seeds.
Instructions
Edit an existing local image with Qwen Image 2.1. Pass the file path and an instruction such as 'remove the Chinese text and keep the rest unchanged'. The source image is used as a reference, so the result stays close to the original. Reusing a generation seed does not edit a picture; use this tool instead. Queues the job(s) and returns immediately with prompt_ids and seeds; then call get_result with the prompt_ids to wait for and receive the image paths. The returned seed is a decimal string; pass it back exactly to reproduce the same edit.
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_path": "<image_path>",
"prompt": "<prompt>"
},
"name": "edit_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed as a decimal string. Reuse the exact seed from a previous edit to reproduce it. | |
| count | No | Number of edit variations to generate, from 1 to 4 | |
| prompt | Yes | Edit instruction describing what to change and what to keep | |
| image_path | Yes | Absolute or project path to the PNG or JPEG to edit | |
| negative_prompt | No | Optional things to avoid, such as text, letters, or watermarks |