Nano Banana 2 (Gemini 3.1 Flash Image)
About this model
Nano Banana 2 (Gemini 3.1 Flash Image) is an AI model from Google DeepMind, made available through the API on June 18, 2026. It can read up to 131,072 tokens in one request, roughly 246 pages of text, and write up to 32,768 tokens in a single answer. Besides text, it accepts images as input. It can generate images.
Through the API it costs $0.50 per million input tokens and $3 per million output tokens.
It supports extended reasoning: it can "think" step by step before answering, which helps on maths, code and complex questions.
Quality scores
Rankings →Not rated yet. Independent test results usually appear a few weeks after a model is released.
Where to use it
Companies that serve this model through an API: 2. Prices per million tokens, cheapest first.
| Provider | Inputi | Outputi | Contexti | Uptime (24 h)i |
|---|---|---|---|---|
Google AI StudioOfficial | $0.50 | $3 | 64K | 100.0% |
GoogleOfficial | $0.50 | $3 | 128K | 99.3% |
Availability and prices come from OpenRouter’s public API and are refreshed daily. Uptime is the share of successful requests over the last 24 hours. Some providers run a compressed version of open models (fp8, int4), which is cheaper but can be slightly less accurate.
Use it in your code
Call Nano Banana 2 (Gemini 3.1 Flash Image) through OpenRouter’s OpenAI-compatible API: create a key on openrouter.ai, then run one of these examples.
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "google/gemini-3.1-flash-image", "messages": [{"role": "user", "content": "Hello! What can you do?"}]}'import os
from openai import OpenAI
client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"])
reply = client.chat.completions.create(
model="google/gemini-3.1-flash-image",
messages=[{"role": "user", "content": "Hello! What can you do?"}],
)
print(reply.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://openrouter.ai/api/v1", apiKey: process.env.OPENROUTER_API_KEY });
const reply = await client.chat.completions.create({
model: "google/gemini-3.1-flash-image",
messages: [{ role: "user", content: "Hello! What can you do?" }],
});
console.log(reply.choices[0].message.content);The same code works with every model on this site: only the model ID changes. Many labs also offer their own API and SDK.
What it costs in practice
- 1,000 chat replies$1.15
- Summarise a 100-page document$0.028
- An app with 10,000 requests a day for a month$510
Similar-priced alternatives
| Model | Inputi | Outputi | Contexti | |
|---|---|---|---|---|
GPT Audio MiniOpenAI | $0.60 | $2.40 | 128K | Compare with ⇄ |
News about Google DeepMind
See all →Frequently asked questions
- How much does Nano Banana 2 (Gemini 3.1 Flash Image) cost?
- Nano Banana 2 (Gemini 3.1 Flash Image) costs $0.50 per million input tokens and $3 per million output tokens through the API. For example, 1,000 chat replies of about 500 tokens in and 300 out cost around $1.15.
- What is the context window of Nano Banana 2 (Gemini 3.1 Flash Image)?
- Nano Banana 2 (Gemini 3.1 Flash Image) can read up to 131,072 tokens in one request, about 246 pages of text. It can write up to 32,768 tokens in a single answer.
- Is Nano Banana 2 (Gemini 3.1 Flash Image) open source?
- No. Nano Banana 2 (Gemini 3.1 Flash Image) is a closed model: its weights are not published, so you use it through Google DeepMind’s own apps and API, or through cloud providers.
- Who makes Nano Banana 2 (Gemini 3.1 Flash Image)?
- Nano Banana 2 (Gemini 3.1 Flash Image) is made by Google DeepMind. It became available through the API on June 18, 2026.
- Can Nano Banana 2 (Gemini 3.1 Flash Image) read images?
- Yes. Besides text, it accepts images as input.