Generate Image with Gemini
generate_imageCreate images from text descriptions using Google Gemini models. Supports custom aspects, resolutions, reference images, and web search for data-driven generation.
Instructions
Generate an image using Google Gemini image models (Nano Banana Pro). Returns image with inline preview in Claude Desktop and saves full-resolution to disk. Default model: gemini-3-pro-image-preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Description of the image to generate | |
| model | No | Gemini image model to use (default: gemini-3-pro-image-preview). Options: gemini-3-pro-image-preview, gemini-2.5-flash-image, nano-banana-pro-preview | |
| aspectRatio | No | Aspect ratio of the generated image | 1:1 |
| imageSize | No | Resolution of the generated image (only for image-specific models) | |
| images | No | Optional reference images to guide generation | |
| use_search | No | Enable Google Search grounding for data-driven image generation. Use for: weather forecasts, current events, stock prices, sports scores, statistics. The model will search the web for real-time data to inform image generation. | |
| global_media_resolution | No | Global image quality setting for cost optimization (default: HIGH). LOW (280 tokens, 75% savings) - Simple tasks, bulk operations. MEDIUM (560 tokens, 50% savings) - PDFs/documents (OCR saturates at medium). HIGH (1120 tokens) - Best quality, detailed analysis. Can be overridden per-image using mediaResolution in images array. | |
| outputPath | No | Optional file path to save the generated image (e.g., ./output/image.png) |