edit_image
Modify a single image or combine multiple images by following a text instruction. The result is saved as a PNG with an optional preview.
Instructions
Edit or fuse input image(s) with an instruction (Gemini aliases only).
One input image = edit; two or more = fusion. Imagen models are text-to-image only
and are rejected here.
Args:
image_paths: Absolute paths to the input image(s).
prompt: The editing / fusion instruction.
model: nano-banana (default) or nano-banana-pro.
output_dir: Where to save the full-res PNG. Defaults to env
GEMINI_IMAGE_OUTPUT_DIR, else the server's CWD.
return_image: When True, append a downscaled preview of the result.
Returns:
A text line with the saved absolute path, optionally followed by a downscaled
preview Image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | nano-banana | |
| prompt | Yes | ||
| output_dir | No | ||
| image_paths | Yes | ||
| return_image | No |