---
title: "Nano Banana 2"
description: "Nano Banana 2 by Google: 131K context. Compare provider prices and applicable pricing conditions on the model page. Pay as you go."
canonical: https://pirouter.ai/models/google/gemini-3.1-flash-image
last-updated: 2026-10-15
---

# Nano Banana 2

> Nano Banana 2 by Google: 131K context. Compare provider prices and applicable pricing conditions on the model page. Pay as you go.

Nano Banana 2 is Google's high-efficiency image generation and conversational editing model, the faster, lower-cost counterpart to Nano Banana Pro. Built for high-volume use, it outputs images from 0.5K up to 4K and accepts text and image input.

## At a glance

- Model ID: `google/gemini-3.1-flash-image`
- Also accepted as: `gemini-3.1-flash-image`
- Vendor: Google
- Category: image
- Openness: Proprietary
- Model page: https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-image
- Context: 131,072 tokens
- Max output: 32,768 tokens
- Added to pirouter: 2026-05-28
- Status: Available

## Pricing (USD per 1M tokens)

|  | Input | Output | Reasoning | Image output |
|---|---|---|---|---|
| Standard | $0.5 | $3 | $3 | $60 |

## Capabilities

- Reasoning
- System messages
- Streaming
- Vision
- Video input
- PDF input
- Image output

## Reasoning effort

- high, minimal (default: minimal)

## How to call it

One pirouter API key works with every API format below; create it in the console. Use one of these formats; formats not listed are not available for this model.

- API key: https://app.pirouter.ai/sign-in

### OpenAI Images

- Endpoint: `POST /v1/images/generations` on https://api.pirouter.ai
- Auth: `Authorization: Bearer <key>`
- SDK base URL: https://api.pirouter.ai/v1
- Reference: https://pirouter.ai/docs/api/images

```bash
curl https://api.pirouter.ai/v1/images/generations \
  -H "Authorization: Bearer $PIROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-3.1-flash-image",
    "prompt": "A shiba inu drinking coffee on the moon, film grain"
  }'
```

### Gemini

- Endpoint: `POST /v1beta/models/google/gemini-3.1-flash-image:generateContent` on https://api.pirouter.ai
- Auth: `Authorization: Bearer <key>`
- SDK base URL: https://api.pirouter.ai
- Reference: https://pirouter.ai/docs/api/generate-content

```bash
curl "https://api.pirouter.ai/v1beta/models/google/gemini-3.1-flash-image:generateContent" \
  -H "Authorization: Bearer $PIROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{ "parts": [{ "text": "A shiba inu drinking coffee on the moon, film grain" }] }]
  }'
```

## Providers

One row per provider; pirouter sends each request to a healthy one.

| Provider | API format | Context | Max output | Input /M | Output /M | Trains on your data | Data retention |
|---|---|---|---|---|---|---|---|
| gcp | openai, gemini | 131,072 | 32,768 | $0.5 | $3 | No | Limited |

## Rankings

Where this model ranks on each blind-vote leaderboard, listing the boards where it makes the top 100. Open a board for the full ranking.

| Board | Rank | Score |
|---|---|---|
| [Text to image](https://pirouter.ai/rankings/t2i) | #9 / 78 | 1261 |
| [Image editing](https://pirouter.ai/rankings/imgedit) | #12 / 55 | 1387 |

Data: [LMArena leaderboard dataset](https://huggingface.co/datasets/lmarena-ai/leaderboard-dataset), used under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Updated 2026-09-30

## Supported parameters

`max_tokens`, `temperature`, `top_p`, `seed`, `reasoning`, `include_reasoning`, `stream`

## Links

- HTML: https://pirouter.ai/models/google/gemini-3.1-flash-image
- JSON: https://pirouter.ai/api/models/google/gemini-3.1-flash-image
- Providers JSON: https://api.pirouter.ai/v1/models/google/gemini-3.1-flash-image/endpoints
- Leaderboard ranks (JSON): https://pirouter.ai/api/models/google/gemini-3.1-flash-image/rankings
- Catalog: https://pirouter.ai/models
- Quickstart: https://pirouter.ai/docs/quickstart
- How routing works: https://pirouter.ai/docs/routing
- llms.txt: https://pirouter.ai/llms.txt

---

HTML version: https://pirouter.ai/models/google/gemini-3.1-flash-image · Machine-readable index: https://pirouter.ai/llms.txt
