Overview
Nano Banana (codename) is Google’s image generation model codename, currently with two available versions:- Official Release:
gemini-2.5-flash-image(recommended, supports 10 aspect ratios and custom resolution) - Preview Version:
gemini-2.5-flash-image-preview(still available)
October 3, 2025 Update: Google released the official version
gemini-2.5-flash-image, adding 10 aspect ratio support and custom resolution features. Recommend using the official version for best experience, while the old version remains usable.📚 Latest Documentation
Feishu Complete Usage Guide - Fastest updates, supports comment interactionVisit Feishu documentation for latest tutorials, tips sharing, and Q&A. Documentation continuously updated, questions can be discussed directly in Feishu comments.
Core Advantages
- 🚀 Fast Generation: Average only 10 seconds, faster than OpenAI series
- 💰 Pricing Advantage: $0.025/image (50% off official), about ¥0.14/image with top-up bonuses
- 🔄 Full Compatibility: Uses chat completion endpoint, fully compatible with gpt-4o-image and sora_image calling methods
- 🎨 Google Technology: Based on Google’s latest and strongest image generation/editing technology
Calling Methods
Correct Endpoint ✅
Incorrect Endpoint ❌
Important Note: This model uses the chat completion endpoint, not the traditional image generation endpoint. This design maintains compatibility with models like gpt-4o-image and sora_image.
Compatibility Notes
If you’ve previously used the following models, simply replace the model name:gpt-4o-image→gemini-2.5-flash-image(recommended) orgemini-2.5-flash-image-previewsora_image→gemini-2.5-flash-image(recommended) orgemini-2.5-flash-image-preview
Recommend Official Version:
gemini-2.5-flash-image supports more features (10 aspect ratios, custom resolution), but preview version gemini-2.5-flash-image-preview still works normally.Python Example Code
Complete Python example code with automatic local saving of base64 images:Usage Steps
- Replace API Key: Replace
API_KEYin code with your actual API key - Modify Prompt: Modify
PROMPTvariable as needed - Run Script: Execute Python script, image will be automatically saved locally
Price Comparison
| Model | Pricing | Advantage |
|---|---|---|
| Nano Banana | $0.025/image (~¥0.14 with bonuses) | ⭐ Google’s strongest tech, fast generation |
| gpt-image-1 | Higher | - |
| flux-kontext-pro | $0.035/image | On par |
| sora_image | Lower | Reverse-engineered model, moderate stability |
Cost-effectiveness Recommendation: Nano Banana achieves good balance between price, speed, and quality, especially suitable for applications requiring fast generation of high-quality images.
Feature Comparison
Speed Comparison
- Nano Banana: Average 10 seconds
- OpenAI Series: 15-30 seconds
- Other Models: Varies by model
Compatibility
- ✅ Fully compatible with
gpt-4o-imagecalling method - ✅ Fully compatible with
sora_imagecalling method - ✅ Supports chat completion endpoint
- ❌ Does not support traditional image generation endpoint
FAQ
Why use chat completion endpoint instead of image generation endpoint?
Why use chat completion endpoint instead of image generation endpoint?
To maintain compatibility with existing image generation models (like gpt-4o-image, sora_image), making it convenient for users to seamlessly switch between different image generation models.
How to switch from other image models to Nano Banana?
How to switch from other image models to Nano Banana?
Simply change the model name from
gpt-4o-image or sora_image to gemini-2.5-flash-image (recommended) or gemini-2.5-flash-image-preview, keeping other parameters unchanged.What's the difference between official and preview versions?
What's the difference between official and preview versions?
Official version
gemini-2.5-flash-image supports 10 aspect ratios and custom resolution features, while preview version gemini-2.5-flash-image-preview has fewer features but works normally. Both have identical pricing and calling methods, official version recommended.What format are generated images?
What format are generated images?
The model returns base64-encoded image data, typically in PNG or JPEG format. Code automatically detects format and saves to corresponding file type.
Does it support image editing features?
Does it support image editing features?
Yes, Nano Banana supports not only image generation but also image editing features. Please refer to detailed documentation for specific usage methods.
Related Documentation
- Detailed Usage Guide
- Image Generation Comparison Testing
- Other Image Generation Models
- API Usage Manual
For more technical details and use cases, check the detailed usage guide link above.