edit_image
Edit or combine images using text instructions. The first image serves as the base, while additional images act as references for style, characters, or objects. Saves the result to disk and returns the file path.
Instructions
Edit or combine images per a text prompt. First image is the base; any others are references (style, characters, objects). Saves to disk and returns the file path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Output resolution | |
| model | No | Gemini image model id (default: gemini-3.1-flash-image) | |
| images | Yes | Input image file path(s) | |
| prompt | Yes | Edit instruction | |
| filename | No | Base filename without extension | |
| grounding | No | Ground with Google Search for factual accuracy | |
| outputDir | No | Save directory (default: ./nano-banana) | |
| aspectRatio | No | e.g. 1:1, 16:9, 9:16, 21:9, up to 1:4 or 8:1 | |
| thinkingLevel | No | Model reasoning effort; high helps complex or text-heavy images |