Advanced Edit
advanced_editEdit images through specialized modes for inpainting, outpainting, background swaps, style transfers, and product shots. Pass an optional mask to guide semantic region changes with a Gemini image model.
Instructions
Edit an image with a specialized mode using a Gemini image model.
Each mode wraps the prompt in an instruction tuned for that edit. An optional mask (white = region to change) is passed to the model as guidance; the boundary is interpreted semantically, not pixel-exactly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Image model to use (default gemini-nano-banana-2.1) | |
| prompt | Yes | What to remove, add, replace, or the style to apply | |
| edit_mode | Yes | One of: inpaint_removal, inpaint_insertion, outpaint, background_swap, style_transfer, product_image | |
| mask_path | No | Optional mask image for the inpainting modes | |
| image_path | Yes | Path to the image to edit | |
| output_format | No | Output format (png, jpeg, webp) | png |
| output_filename | No | Custom output filename (optional) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||