Inpaint image
inpaint_imageEdit only a masked area of an image: change, remove, replace, or add content while preserving all pixels outside the mask. White marks the target; black stays unchanged.
Instructions
Change only the masked area of an image (mask: white = change, black = keep): edit it, remove what is there, replace it, or add something inside it. The model is shown the area marked on a copy of the image; pixels outside the mask are preserved exactly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for reproducible results; omit or -1 for random | |
| action | No | edit: change the area as the prompt says; remove: erase what is there and fill with background (prompt optional, e.g. 'the bin'); replace: put the prompt's subject in its place; add: add the prompt's subject inside the area | edit |
| prompt | No | The change, or the subject to add/replace with; optional for remove | |
| quality | No | All run Qwen-Image 2.1 Turbo (8 steps): fast = ~1 MP (the default, fastest); balanced = ~1.5K; quality = native 2K (slowest; edits share 2K with their references) | |
| mask_path | Yes | Mask image: white = area to change, black = keep (or opaque strokes on a transparent layer) | |
| image_path | Yes | ||
| output_path | No | Optional destination (absolute, or relative to the project). Must be inside the project or the app output folder. Existing files are never overwritten; a numbered name is used instead. | |
| include_preview | No | Also return a small JPEG preview in the tool result. Default false: images stay local and are not sent to the model. |