Skip to content
Dashboard

Gemini 3.1 Flash Image (Nano Banana 2)

Gemini 3.1 Flash Image (Nano Banana 2) is the generally available flash-tier image generation and editing model in the Gemini 3.1 family, combining Google Image Search grounding, configurable thinking levels, and new video-to-image input with production-ready 1K and 2K output.

Image GenImplicit CachingReasoningVision (Image)Web Search
index.ts
import { generateText } from 'ai'
const result = await generateText({
model: 'google/gemini-3.1-flash-image',
prompt: 'Render a picture of a red balloon.',
});

Playground

Try out Gemini 3.1 Flash Image (Nano Banana 2) by Google. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

google logo
Prompt
Describe what you want the model to generate.
Need inspiration?
Reference images(optional)
Images to generate
Aspect ratio
Resolution
google logo

Your generated image will appear here

Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
ZDR
No Training
Release Date
Google Vertex AI
131K
2.0s
280tps
$0.50/M$3.00/M
Read:$0.05/M
Write:—
$14/K
+ input costs
—
+3
05/28/2026
Google
131K
0.8s
174tps
$0.50/M$3.00/M
Read:$0.05/M
Write:—
$14/K
+ input costs
—
+3
05/28/2026
Throughput

P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.

Latency

P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.

Uptime

Direct request success rate on AI Gateway and per-provider. Visit the docs for more info.

More models by Google

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
Providers
ZDR
No Training
Release Date
1M
2.3s
202tps
$1.50/M$9.00/M
Read:$0.15/M
Write:—
$14.00/K
+ input costs
—
+4
google logo
vertex logo
05/19/2026
1M
0.4s
246tps
$0.25/M$1.50/M
Read:$0.03/M
Write:—
$14.00/K
+ input costs
—
+4
google logo
vertex logo
03/03/2026
1M
4.2s
105tps
$2.00/M
$12.00/M
Read:
$0.2/M
Write:
—
$14.00/K
+ input costs
—
+4
google logo
vertex logo
02/19/2026
1M
0.8s
166tps
$0.50/M
$3.00/M
Read:
$0.05/M
Write:
—
$14.00/K
+ input costs
—
+4
google logo
vertex logo
12/17/2025
1M
0.4s
242tps
$0.10/M$0.40/M
Read:$0.01/M
Write:—
$35.00/K
+ input costs
—
+4
google logo
vertex logo
06/17/2025
1M
0.4s
194tps
$0.30/M$2.50/M
Read:$0.03/M
Write:—
$35.00/K
+ input costs
—
+4
google logo
vertex logo
03/20/2025

About Gemini 3.1 Flash Image (Nano Banana 2)

Gemini 3.1 Flash Image (Nano Banana 2) is the general-availability release of the flash-tier image model in the Gemini 3.1 generation, released May 28, 2026. Gemini 3.1 Flash Image (Nano Banana 2) replaces google/gemini-3.1-flash-image-preview, which Google deprecated after the GA launch, and serves as the generalist of the Nano Banana family: the balance point between the pro tier's fidelity and the lite tier's speed.

The capabilities introduced in the preview carry into the GA model. Google Image Search grounding lets Gemini 3.1 Flash Image (Nano Banana 2) retrieve live visual reference data at generation time, improving accuracy on lesser-known landmarks, branded objects, and recent subjects. Configurable thinking levels (minimal and high) control how much Gemini 3.1 Flash Image (Nano Banana 2) reasons before rendering, and output options span 512p resolution plus narrow 1:4 and 1:8 aspect ratios alongside standard formats.

GA adds video-to-image input, a capability exclusive to Gemini 3.1 Flash Image (Nano Banana 2) among Google's image models. Pass a video file via direct upload or as a public YouTube URL, and Gemini 3.1 Flash Image (Nano Banana 2) analyzes the visual context, subjects, and actions in the footage to generate context-aware images such as thumbnails, posters, and infographics. The feature is in preview on Google's side, as is 4K output; 1K and 2K output are generally available.

Every generated image carries an invisible SynthID watermark for downstream identification of AI-generated content. Gemini 3.1 Flash Image (Nano Banana 2) accepts prompts within a context window of 131.1K tokens and returns text and images in the same multimodal response, with per-image billing by output resolution.

What To Consider When Choosing a Provider

  • Configuration: This is a multimodal model: call Gemini 3.1 Flash Image (Nano Banana 2) with generateText or streamText and set responseModalities: ['TEXT', 'IMAGE'] in providerOptions.google to receive image output. Image generation is priced per image by output resolution, and text follows per-token rates; see the pricing panel on this page for current numbers. Note that 4K output and video input are preview capabilities on Google's side, while 1K and 2K output are generally available.
  • Zero Data Retention: AI Gateway supports Zero Data Retention for this model via direct gateway requests (BYOK is not included). To configure this, check the documentation.
  • Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.

When to Use Gemini 3.1 Flash Image (Nano Banana 2)

Best For

  • Production Image Workloads: Teams that need the flash-tier balance of quality, speed, and cost behind a stable GA identifier
  • Video-Derived Imagery: Thumbnails, posters, and infographics generated from uploaded video files or public YouTube URLs
  • Search-Grounded Generation: Real-world landmarks, products, and recent subjects rendered with live Google Image Search data
  • Technical Diagrams and Infographics: Compositions where the high thinking level improves spatial reasoning and label placement
  • Mixed Text and Image Output: Single multimodal responses that return prose and generated images together

Consider Alternatives When

  • Highest Visual Fidelity: Professional compositing and fine-detail work favor google/gemini-3-pro-image
  • Maximum Speed and Volume: High-throughput pipelines run at lower cost on google/gemini-3.1-flash-lite-image
  • Pure Image Generation API: A dedicated text-to-image model like google/imagen-4.0-generate-001 skips multimodal call patterns
  • Video Output Required: Generated clips need the Veo model family rather than still images

Conclusion

Gemini 3.1 Flash Image (Nano Banana 2) is the production target for flash-tier image generation on AI Gateway. Teams that built on the preview get the same search grounding, thinking control, and format flexibility behind a stable identifier, plus video-to-image input that no other Gemini image model offers. For image workloads that need current-subject accuracy and production reliability at flash cost, Gemini 3.1 Flash Image (Nano Banana 2) is the natural starting point in the family.