generate_image
Generate images from text prompts using Gemini image models, with customizable resolution, aspect ratio, and output directory.
Instructions
Generate an 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 the image to generate | |
| outputDir | No | Directory to save the generated 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) | |
| returnBase64 | No | Return the image as base64 data URL instead of saving to file (useful for Claude Desktop) |