TokenMix Research Lab · 2026-04-24
Nano Banana API: Gemini 2.5 Flash Image Access Guide
"Nano Banana" is the community nickname for Google's Gemini 2.5 Flash Image model — a dedicated image generation + editing variant of Gemini Flash, known for strong instruction-following, tight $0.039/image pricing, and built-in image editing (inpainting, modification) in addition to text-to-image. The nickname originated from an August 2025 Gemini benchmark leaderboard where the model appeared anonymously under "nano-banana", later confirmed as Gemini 2.5 Flash Image. This guide covers how to get API access, pricing tiers, code examples for generation + editing, differences from Imagen 4 and GPT Image 2, and limits. TokenMix.ai routes Nano Banana through OpenAI-compatible /images/generations endpoint.
Table of Contents
- Confirmed vs Speculation
- What Is Nano Banana (The Official Name)
- API Access & Pricing
- Code Examples: Generation + Editing
- Nano Banana vs Imagen 4 vs GPT Image 2
- Strengths & Limits
- FAQ
Confirmed vs Speculation
| Claim | Status |
|---|---|
| "Nano Banana" = Gemini 2.5 Flash Image | Confirmed — Google officially adopted nickname |
| Price ~$0.039 per image | Confirmed |
| Supports both generation AND editing | Yes — major feature |
| Strong on instruction adherence | Confirmed |
| Beats Imagen 4 on text rendering in images | Partial — varies |
| Available via Gemini API | Yes — model ID gemini-2.5-flash-image |
What Is Nano Banana (The Official Name)
Gemini 2.5 Flash Image is Google's image-capable variant of Gemini 2.5 Flash. It ships within the standard Gemini API and accepts:
- Text-only prompt → generates image
- Text + reference image → edits image
- Multiple images → composite / variation
Differentiator from Imagen 4:
- Imagen 4 = text-to-image only, no editing
- Nano Banana (2.5 Flash Image) = text-to-image + editing in one API
- Both produce ~4K output via Ultra variants
For workflows requiring iterative image editing (generate → adjust → refine), Nano Banana's editing feature is transformative.
API Access & Pricing
Pricing (April 2026):
- Standard generation: $0.039 per image (1024×1024 or equivalent)
- Edit operation: $0.039 per image
- Ultra HD: ~$0.079 per image
- Free tier: 100 images/day on Google AI Studio
Model IDs:
gemini-2.5-flash-image— standardgemini-2.5-flash-image-ultra— 4K variantgemini-3.1-flash-image-preview— preview next-gen
Compared to peers:
- DALL-E 3 / GPT Image 2: $0.04-0.08/image
- Imagen 4: $0.04/image (standard), $0.05 Ultra
- FLUX 2 Pro: $0.04-0.06/image
- Nano Banana: $0.039 competitive + editing built-in
Code Examples: Generation + Editing
Text-to-image generation (Python):
from google import genai
client = genai.Client()
response = client.models.generate_images(
model="gemini-2.5-flash-image",
prompt="A cozy reading nook with fairy lights and bookshelves",
number_of_images=1
)
# Save image
for img in response.images:
img.save("output.png")
Image editing (add element to existing image):
from PIL import Image
base = Image.open("input.jpg")
response = client.models.edit_image(
model="gemini-2.5-flash-image",
image=base,
prompt="Add a cat sitting on the armchair"
)
response.images[0].save("edited.png")
Via TokenMix.ai OpenAI-compatible:
from openai import OpenAI
client = OpenAI(base_url="https://api.tokenmix.ai/v1", api_key="...")
response = client.images.generate(
model="google/gemini-2.5-flash-image",
prompt="...",
n=1,
size="1024x1024"
)
Nano Banana vs Imagen 4 vs GPT Image 2
| Dimension | Nano Banana | Imagen 4 Ultra | GPT Image 2 |
|---|---|---|---|
| Generation quality | 88 | 92 | 87 |
| Editing support | Yes | No | Limited |
| Text rendering | Strong | Strong | Good |
| Price per image | $0.039 | $0.05 | $0.04 |
| Max resolution | 1024×1024 (Ultra: 4K) | 4K native | 4K |
| Speed | Fast | Medium | Medium |
| Google Cloud integration | Native | Native | Via Azure |
| API maturity | Good | Strong | Strong |
Summary: Imagen 4 Ultra for highest quality hero content. Nano Banana for iterative editing workflows. GPT Image 2 for OpenAI ecosystem users.
Strengths & Limits
Strengths:
- Text instruction following (one of the best)
- Editing existing images (rare capability at this price)
- Speed (Flash family = fast)
- Unified API (same Gemini Flash that handles text can generate images)
- Commercial license clear via Google terms
Limits:
- Default output 1024×1024 (upgrade to Ultra for 4K)
- Realism occasionally uncanny valley on portraits
- Safety filter aggressive (refuses many realistic human images)
- Chinese/Japanese character rendering weaker than Seedream 5.0
FAQ
Why is it called "Nano Banana"?
Anonymous submission name on LMArena-style benchmarks before Google officially revealed the model as Gemini 2.5 Flash Image. Community adopted the nickname; Google embraced it in some marketing.
Is Nano Banana the same as Gemini 3.1 Flash Image?
Family-adjacent but different. gemini-2.5-flash-image is stable (current production). gemini-3.1-flash-image-preview is the newer preview variant with better quality but less mature API. For production, use 2.5. For testing leading-edge, 3.1 preview.
Does Nano Banana preserve image aspect ratio when editing?
Yes, edit operations preserve input dimensions unless you specify a new size. Makes it ideal for workflows where you need to modify existing product photos / assets.
Can I fine-tune Nano Banana on my brand style?
Not directly via API. For custom brand styling, use Gemini's prompt-level styling ("in the style of") or consider specialized services like Midjourney custom styles. Image fine-tuning APIs from Google are in limited preview.
What about commercial licensing?
Per Google's terms, images you generate are yours to use commercially. Standard disclaimers apply — no IP infringement on trademarked characters, etc. See Google AI terms for specifics.
How does Nano Banana handle text in images?
Good — better than older Gemini image gen, competitive with Ideogram and DALL-E 3. For text-heavy logo work, Ideogram still slightly ahead. For general text-in-image (posters, thumbnails with text), Nano Banana works reliably.
Is there a batch API?
Yes, Google AI Studio supports batch generation. For high-volume image generation pipelines, batch mode reduces cost per image ~20%.
Sources
- Gemini 2.5 Flash Image — Google DeepMind
- Google AI Pricing
- Gemini API Docs
- Imagen 4 Ultra Review — TokenMix
- AI Image Generation Comparison — TokenMix
- Gemini 3.1 Pro Review — TokenMix
By TokenMix Research Lab · Updated 2026-04-24