Skip to content

Model detail

Nano Banana 2 (Gemini 3.1 Flash Image Preview)

Provided by Google
Pay-as-you-go

Gemini 3.1 Flash Image Preview, a.k.a. "Nano Banana 2," is Google’s latest state of the art image generation and editing model, delivering Pro-level visual quality at Flash speed. It combines advanced contextual understanding with fast, cost-efficient inference, making complex image generation and iterative edits significantly more accessible. Aspect ratios can be controlled with the [image_config API Parameter]

Model specs

Model ID
gemini-3.1-flash-image-preview
Context length
–
Max output
–
I/O modalities
Released
2026-02

02

API endpoints

One MixRoute gateway, OpenAI-compatible

  • Gemini /v1beta/models/{model}:generateContent POST
  • OpenAI-compatible /v1/chat/completions POST

03

Pricing

Flat rate, unit: /1M Tokens

Input

$0.5000 /1M Tokens

Completion

$3.0000 /1M Tokens

Image completion

$10.0000 /1M Tokens

05

Selection summary

Quickly judge whether it fits your workload

What is this model good for?

Gemini 3.1 Flash Image Preview, a.k.a

Gemini 3.1 Flash Image Preview, a.k.a. "Nano Banana 2," is Google’s latest state of the art image generation and editing model, delivering Pro-level visual quality at Flash speed.

What should you check before using it?

Confirm output sizes and supported image formats

Model type: image. Verify supported features and quotas with the provider documentation. Knowledge cutoff: 2025-01. Released 2026-02-26.

Why use it through MixRoute?

Nano Banana 2 (Gemini 3.1 Flash Image Preview) takes text and images on one route

Text and image inputs share the same route and the same key. MixRoute serves Nano Banana 2 (Gemini 3.1 Flash Image Preview) on the OpenAI-compatible endpoint /v1/chat/completions; point your existing client at https://api.mixroute.ai/v1 with the model ID gemini-3.1-flash-image-preview and re-run your integration tests.

07

Capabilities & compatibility

Unconfirmed capabilities stay "Unknown," no guesses

Available:

Structured output

Nano Banana 2 (Gemini 3.1 Flash Image Preview) can produce JSON-formatted output on demand.

EX response_format: { type: "json_schema" } forces valid JSON output.
Available:

Streaming

Nano Banana 2 (Gemini 3.1 Flash Image Preview) supports streamed responses.

EX stream: true streams tokens incrementally, so chat UIs render as they arrive.
Available:

Prompt caching

Nano Banana 2 (Gemini 3.1 Flash Image Preview) supports prompt caching under supported routing conditions.

EX Keep the system prompt and tool definitions at the start of the request; repeated prefixes are automatically billed at the cache-read rate.
Available:

Vision input

Nano Banana 2 (Gemini 3.1 Flash Image Preview) can process image inputs alongside text.

EX Pass a base64-encoded image in a image_url content part alongside text messages.
Available:

OpenAI SDK

Call Nano Banana 2 (Gemini 3.1 Flash Image Preview) through MixRoute's OpenAI-compatible endpoint.

EX Change base_url to https://api.mixroute.ai/v1; everything else follows the OpenAI style.

08

Token cost estimator

Live estimate from this page's pricing, not an actual bill

This model has no cache-read price; caching is not counted

09

FAQ

Yes. Nano Banana 2 (Gemini 3.1 Flash Image Preview) is reachable through an OpenAI-compatible endpoint, so an existing OpenAI SDK client works after pointing the base URL at MixRoute and setting the model parameter to gemini-3.1-flash-image-preview. Keep your current request and response handling.

One endpoint, a testable decision

Test this model and alternate routes with the same request format

Start from a real workload, then let quality, total cost, and failure conditions decide whether to send production traffic.