Using Nano Banana 2 (Gemini 3.1 Flash Image) on OpenRouter
Implementation guide · Gemini 3.1 · Google DeepMind
Serverless
OpenRouter exposes Nano Banana 2 (Gemini 3.1 Flash Image) through model ID google/gemini-3.1-flash-image. Use the setup steps, sourced pricing, capabilities, and official provider links below to validate this route before deployment.
Last refreshed 2026-06-15. Next refresh: weekly.
Quick Start
- 1
- 2Use the OpenRouter SDK or REST API to call
google/gemini-3.1-flash-image— see the documentation for request format. - 3
Code Examples
Pricing on OpenRouter
| Type | Price (per 1M) |
|---|---|
| Input tokens | $0.50 |
| Output tokens | $3.00 |
Capabilities
VisionMultimodalReasoningBatch API
About Nano Banana 2 (Gemini 3.1 Flash Image)
Nano Banana 2 is the GA Gemini 3.1 Flash Image model for image generation and editing through the Gemini API. It accepts text, image, PDF, and video inputs, adds video-to-image generation for thumbnails, posters, and infographics, returns text and images, supports search grounding and thinking, and replaces the gemini-3.1-flash-image-preview model retiring on 2026-06-25.
Model Specs
Released2026-05-28
Context131k
ArchitectureDecoder Only
Knowledge cutoff2025-01