Short answer: Gemini 2.5 Flash Image—also called Nano Banana—is Google’s image-generation and editing model, with model ID gemini-2.5-flash-image. It is distinct from general Gemini 2.5 Flash, which does not support image generation. As of November 12, 2026, Google labels the image model a legacy model and recommends migrating Gemini API projects to Nano Banana 2 Lite (gemini-3.1-flash-lite-image). Separately, Google says the Vertex AI version will retire on March 15, 2027. Check the lifecycle guidance for the exact API route you use. (aistudio.google.com)
What it can do—and when that matters
Google documents image generation, image editing, and multi-turn image editing for Gemini 2.5 Flash Image. Consider it for workflows that need generated visuals or conversational edits; evaluate the actual output against requirements such as preserving a product’s shape, logo, or camera angle. For example, an evaluation prompt might ask: “Keep the product’s shape, logo, and camera angle unchanged. Replace only the background with a softly lit kitchen counter.” This is an illustrative prompt, not a tested result. (docs.cloud.google.com)
Vertex AI limits: Google lists up to 3 images per prompt, up to 10 output images per prompt, and supported aspect ratios of 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, and 21:9. The 7 MB per-file limit applies to inline data or direct console uploads; files from Google Cloud Storage have a 30 MB limit. Listed MIME types are PNG, JPEG, WebP, HEIC, and HEIF. These specifications are for Vertex AI; confirm limits for any other route. (docs.cloud.google.com)
Production API fit: a minimal Gemini Developer API path
Google’s Python image-generation example uses google-genai, genai.Client(), generate_content, and model ID gemini-2.5-flash-image; it reads image output from response parts. The example below follows that documented pattern. It has not been tested here. (ai.google.dev)
pip install -U google-genai
export GEMINI_API_KEY="YOUR_API_KEY"
from google import genai
client = genai.Client() # Reads GEMINI_API_KEY or GOOGLE_API_KEY
response = client.models.generate_content(
model="gemini-2.5-flash-image",
contents="Create a simple blue ceramic mug on a white background.",
)
for part in response.parts:
if part.inline_data:
image = part.as_image()
image.save("generated-image.png")
break
else:
raise RuntimeError("No inline image was returned")
Keep the API key on a trusted server, not in client-side code. Google’s SDK documentation says the client can read GEMINI_API_KEY or GOOGLE_API_KEY; set only one to avoid ambiguity. Google lists the Gemini API for supported countries and territories, including the United States; check its current regions list if your users or deployment are elsewhere. The model page marks this image-generation model as paid, so do not assume it is available on the free tier. Check your project’s active rate limits in AI Studio before launch; quotas vary by model and project. (googleapis.github.io)
Current Gemini Developer API pricing
Google’s pricing page lists $0.039 per generated image and $0.30 per 1 million input text/image tokens for the paid tier; it marks these image-model input and output charges as unavailable on the free tier. It says text input and output follow Gemini 2.5 Flash pricing. As a simple estimate, 1,000 image outputs cost about $39 for image output alone. If each request also uses 100 text-input tokens, that adds about $0.03 (100,000 tokens at $0.30 per million), for roughly $39.03 before any text output, retries, or other billable usage. Confirm the live rate card before budgeting. (aistudio.google.com)
Should you choose it?
It may fit if its documented image-generation and editing workflow meets your needs, but it is not the default choice for a new integration: Google’s Gemini API guide calls it a legacy model and recommends migrating to Nano Banana 2 Lite (gemini-3.1-flash-lite-image). For Vertex AI, account for the stated March 15, 2027 retirement date and migration guidance. Before committing, test representative prompts, detail preservation, failure handling, the relevant route’s limits, migration effort, and total cost. (aistudio.google.com)
Sources
Nano Banana image generation — Gemini API
Gemini 2.5 Flash Image — Gemini Enterprise Agent Platform
Gemini 2.5 Flash Image — Gemini API model documentation
Gemini 2.5 Flash — Gemini API model documentation
