Gemini 3.1 Flash Image Preview (Nano Banana 2)
google/gemini-3.1-flash-image-previewA chat model with a 131K-token context window, at $0.525 per million input tokens and $3.15 per million output tokens.
Details
- Maker
- Kind
- Chat
- Context window
- 131,072 tokens
- Max output
- 32,768 tokens
- Input
- $0.525 per million tokens
- Cached input
- $0.0525 per million tokens, 90% off
- Cache write
- Same as input
- Output
- $3.15 per million tokens
- Capabilities
- Reasoning, vision, web search, image generation
- Takes
- Text, image
- Returns
- Text, image
- Zero data retention
- Not on every provider
- No training on requests
- Yes, on every provider
- Released
- 2026-02-26
- Newer model
- google/gemini-3.7-flash-batchReleased later by the same maker, costs no more, and lists the same capabilities. Compare the two
Description
Gemini 3.1 Flash Image (Nano Banana 2) is optimized for image understanding and generation and offers a balance of price and performance.
Call it
curl
curl https://phantom.codes/v1/chat/completions \
-H "Authorization: Bearer $PHANTOM_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-3.1-flash-image-preview",
"messages": [
{"role": "user", "content": "Hello"}
]
}'Set PHANTOM_KEY to your key. Any OpenAI client works with the base URL https://phantom.codes/v1.