edit_image
Edit existing images using Gemini image models. Provide a text prompt describing the changes, along with image data or path, to generate a modified image.
Instructions
Edit an existing image using Gemini image models (Nano Banana 2 or Nano Banana Pro)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model to use: gemini-3.1-flash-image-preview (Nano Banana 2, recommended) or gemini-3-pro-image-preview (Nano Banana Pro) | |
| prompt | Yes | The text prompt describing how to edit the image | |
| imageData | No | Base64 encoded image data to edit (optional if imagePath is provided) | |
| imagePath | No | Path to the image file to edit (optional if imageData is provided) | |
| outputDir | No | Directory to save the edited image (optional, defaults to ~/Downloads/nano-banana-images) | |
| resolution | No | Output resolution: 0.5K (512px, 3.1 Flash only), 1K (default), 2K, or 4K | |
| aspectRatio | No | Aspect ratio for the generated image (optional) |