generate_image
Generate images from text prompts or reference images using Google's Nano Banana AI. Supports up to 14 reference images for editing or combining, with adjustable resolution and aspect ratio.
Instructions
Generate an image using Google Nano Banana (Gemini) AI model. Can generate from text only, or use one or more reference images (up to 14) to guide generation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model to use: gemini-2.5-flash-image (fast) or gemini-3-pro-image-preview (high quality, default) | gemini-3-pro-image-preview |
| prompt | Yes | Text description of the image to generate or instructions for editing/combining reference images | |
| imagePaths | No | Optional array of file paths to reference images (up to 14). Supports png, jpg, jpeg, webp, gif. | |
| outputPath | No | File path to save the generated image. If not provided, image data is returned inline. | |
| resolution | No | Resolution of the generated image. 512 only on gemini-3.1-flash-image-preview. Nano Banana Pro supports 1K, 2K, 4K. | 1K |
| aspectRatio | No | Aspect ratio of the generated image. Additional ratios (1:4, 4:1, 1:8, 8:1) available on gemini-3.1-flash-image-preview. | 1:1 |
| outputFormat | No | Output image format | png |