TokenMix Research Lab · 2026-04-24

Nano Banana API: Gemini 2.5 Flash Image Access Guide

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

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

Snapshot note (2026-04-24): $0.039/image pricing is current per Google AI pricing page at snapshot. Comparison scores (88/92/87 Nano Banana vs Imagen 4 Ultra vs GPT Image 2) are community-measured composites, not a single audited benchmark. gemini-3.1-flash-image-preview may promote to GA status; check current model list before pinning to 2.5-flash-image vs the newer preview in your production pipeline.

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:

Differentiator from Imagen 4:

For workflows requiring iterative image editing (generate → adjust → refine), Nano Banana's editing feature is transformative.

API Access & Pricing

Pricing (April 2026):

Model IDs:

Compared to peers:

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:

Limits:

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

By TokenMix Research Lab · Updated 2026-04-24