Google: Nano Banana 2

google/gemini-3.1-flash-image

Google Nano Banana 2 API pricing

Nano Banana 2 costs $0.200 per million input tokens and $24.00 per million image output tokens on Oxyy. These are the pay-as-you-go prices after the current 60% discount (Launch Promo; standard price $0.500 input and $60.00 image output). Text output tokens are billed at $1.20 per million. It generates images from text prompts and can work from reference images. A cheaper Google option is Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image) at $0.100 / $12.00 per 1M tokens; for every model and rate, see Gemini API pricing.

High-efficiency production-scale image generation and editing, balancing speed with 4K generation, world knowledge and reliable text rendering. The generalist workhorse of the Nano Banana family.

ModalitiesTextImageVideoTextImage
Price$0.200 / $24.00 per 1M tokens in / image outAll Gemini API pricing
ReleasedFeb 26, 2026

Providers

Where this model runs, and what each route costs. Requests are sent to a healthy provider automatically; if one errors, the gateway retries against another serving the same model.

ProviderInput /MOutput /MCache read /MLatencyThroughput
Google$0.200$24.00—12.37s—

Capabilities (14)

StreamingImage EditMulti Turn EditingInterleaved Text And ImageVideo To ImageReference ImagesCharacter ConsistencyThinkingSearch GroundingImage Search GroundingTool callingBatchSynthid WatermarkImage To Image

Supported parameters (8)

inputresponse_format.typeresponse_format.image_sizeresponse_format.aspect_ratioresponse_format.mime_typethinking_leveltoolsprevious_interaction_id

The endpoint's own fields, shown in the quickstart below, are required as well; a request without them is rejected.

Pricing

What this model costs on Oxyy, pay as you go. "Charged" is the rate a request is billed at; the standard price is shown beside it for reference.

Input price
$0.200
per 1M input tokens · standard price $0.500
Image output price
$24.00
per 1M image output tokens · standard price $60.00
RateStandard priceChargedUnit
Input$0.500$0.200per 1M input tokens
Image output$60.00$24.00per 1M image output tokens
Text output$3.00$1.20per 1M text output tokens

Discount. Charged rates include the current "Launch Promo" discount of 60% on every rate.

UTC

Specifications

Model ID
gemini-3.1-flash-image
Developer
Google
Type
Image generation
Input
Text, images and video
Output
Text and images
Released
Feb 26, 2026
Image input
Up to 20 MB each, 14 per request · PNG, JPEG, WebP
Video input
Up to 100 MB each, 14 per request · MP4
Endpoint
/v1/images/generations

Quickstart

Call gemini-3.1-flash-image with a POST to /v1/images/generations on https://api.oxyy.ai, using your Oxyy API key from the OXYY_API_KEY environment variable. The same key works for every model in the catalog.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.oxyy.ai/v1",
    api_key=os.environ["OXYY_API_KEY"],
)

response = client.images.generate(
    model="gemini-3.1-flash-image",
    prompt="A lighthouse on a cliff at sunset, watercolor",
    n=1,
    size="1024x1024",
)
print(response.data[0].url)

Performance

Throughput is how fast the model writes (tokens per second — higher is better). Latency is total round-trip time (lower is better). TTFT is time-to-first-token — how long before you see anything appear (lower is better). Throughput and TTFT are measured on streaming requests, which are the only ones with a first-token moment to time.

Throughput
—tok/s
P50, streaming requests
Latency
12.37s
P50, end to end
UTC

Throughput

P99—
P95—
P50—

Latency

P5011.1s
P7518.8s
P9539.9s
P9970.3s

Time to first token

P50—
P95—

Cache hit rate

0.00%
Share of input tokens served from the prompt cache over the window.

Availability

The share of requests to this model that completed successfully over the last 30 days. Requests the caller cancelled, and requests still in flight, are not counted. When an upstream provider errors, the gateway retries against another provider serving the same model, so a single provider incident does not necessarily show up here.

Success rate (30 days)
53.10%
over 139,299 completed requests
Days with traffic
30
of the last 30 days

Days are UTC days. Days with no completed requests are omitted rather than drawn at 100% — no traffic is not evidence of availability.

Activity

Token volume and request traffic to this model over time. Daily totals, UTC.

Prompt44.0M
Completion99.2M

Prompt tokens measure input size. Completion tokens reflect total output length. Reasoning is not priced separately for this model, so it is not itemised here.

Frequently asked questions

What is Nano Banana 2?
High-efficiency production-scale image generation and editing, balancing speed with 4K generation, world knowledge and reliable text rendering. The generalist workhorse of the Nano Banana family.
How much does Nano Banana 2 cost?
Nano Banana 2 costs $0.200 per million input tokens and $24.00 per million image output tokens on Oxyy. These are the pay-as-you-go prices after the current 60% discount (Launch Promo; standard price $0.500 input and $60.00 image output). Text output tokens are billed at $1.20 per million. You pay per request, with no subscription.
What can I send to Nano Banana 2?
Nano Banana 2 takes a text prompt and reference images (up to 20 MB each, 14 per request · PNG, JPEG, WebP) and returns text and images.
Which API endpoint does Nano Banana 2 use?
Send a POST request to https://api.oxyy.ai/v1/images/generations with "model": "gemini-3.1-flash-image", authenticated with your Oxyy API key. It is also served on /v1/images/edits, /v1/images/variations, /v1/chat/completions, /v1beta/models/gemini-3.1-flash-image:generateContent (Google Gemini SDK) and /v1/responses (Responses API).
When was Nano Banana 2 released?
Nano Banana 2 was released on Feb 26, 2026.
What other models does Google have?
Google also offers Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image), Gemini 2.5 Flash, Gemini 2.5 Flash-Lite and Gemini 2.5 Flash TTS through Oxyy.

Alternatives to Nano Banana 2

Models of the same kind from other vendors, closest in price first. Prices are pay-as-you-go on Oxyy, through the same API key.

Explore more models

More models from Google