Google: gemini-3.1-flash-image-preview
gemini-3.1-flash-image-preview
Gemini 3.1 Flash Image Preview (officially marketed as Nano Banana 2) offers professional-grade visual intelligence with lightning-fast efficiency and grounded generation. It is the speed-optimized counterpart to Gemini 3 Pro Image, designed for scale and broad developer use cases.
Provider: Google|Input types
Output types|Publish Time: None
Group price
Price information for different user groups
Auto Group routing → default
| Group | Billing type | Input Price | Output Price |
|---|---|---|---|
| default | Pay as you go | $0.1750 / M tokens$0.2500 / M tokens | $42.0000 / M tokens$60.0000 / M tokens |
Provider
Pricing$0.1750 / M tokens
Input video-
Input audio-
Web Search-
Cache pricing-
Context window-
Max output-
Latency397 ms
Throughput170 TPS
Availability97.50%
Image output
API call example
Connect quickly using the standard OpenAI-compatible APIPython
1
import openai2
3
client = openai.OpenAI(4
api_key="<YOUR_API_KEY>",5
base_url="http://localhost:3000/v1"6
)7
8
response = client.chat.completions.create(9
model="gemini-3.1-flash-image-preview",10
messages=[11
{"role": "user", "content": "What model are you?"}12
]13
)14
15
print(response.choices[0].message.content)