google/gemini-3.1-flash-image

Google: Nano Banana 2 (Gemini 3.1 Flash Image)

Context length
131K
Input / 1M tokens
$0.50
Output / 1M tokens
$3.00
Released
2026-06-18
Modality
text+image->text+image

About Google: Nano Banana 2 (Gemini 3.1 Flash Image)

Gemini 3.1 Flash Image, 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...

Call Google: Nano Banana 2 (Gemini 3.1 Flash Image)

Via OpenRouter: one base URL for every provider.

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": "Say hello"}]
  }'

Direct on Google Gemini / AI Studio:

curl https://generativelanguage.googleapis.com/v1beta/chat/completions \
  -H "Authorization: Bearer $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.1-flash-image",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

Google Gemini / AI Studio keys

OpenRouter keys

OpenRouter keys work for google/gemini-3.1-flash-image regardless of the upstream provider.