nanobanana_generate_image
Generate images from text prompts using Gemini AI models, saving them to specified file paths with configurable aspect ratios and quality options.
Instructions
Generate an image using Gemini's native image generation (Nano Banana).
This tool calls the Gemini API to generate an image based on your text prompt and saves it to the specified path.
Models:
gemini-2.5-flash-image: Fast, efficient (~$0.039/image)
gemini-3-pro-image-preview: Higher quality, supports 4K (~$0.134-0.24/image)
Supported Aspect Ratios: 1:1, 16:9, 9:16, 4:3, 3:4
Example:
prompt: "A modern flat illustration of a workflow diagram with three connected nodes, purple and blue gradient colors, minimal style"
output_path: "assets/generated/workflow-hero.png"
model: "gemini-2.5-flash-image"
aspect_ratio: "16:9"Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Image generation prompt describing the desired image | |
| output_path | Yes | Relative or absolute path to save the generated image (e.g., 'assets/generated/hero.png') | |
| model | No | Gemini model to use. Flash for speed, Pro for quality | gemini-2.5-flash-image |
| aspect_ratio | No | Aspect ratio of the generated image | |
| overwrite | No | If true, overwrite existing file. If false, skip if file exists |