Gemini 3.1 Flash Image Preview
Gemini 3.1 Flash Image Preview, 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.
gemini-3.1-flash-image-previewReleased 26 Feb 2026 (Feb 2026)Pricing
List prices at Google AI Studio, in US dollars per million tokens.
| Tier | Input / 1M | Output / 1M | |
|---|---|---|---|
| Standard | $0.50 | $3.00 | |
| Batch 50% off | $0.25 | $1.50 | 50% off |
| Web search $14.00 per 1,000 searches | $14.00 per 1,000 searches |
What it costs a month
At Google AI Studio list prices, 30 days.
- Chat assistant5,000 requests a day, 2K in / 0.5K out$375
- RAG over documents2,000 requests a day, 8K in / 0.6K out$348
- Coding agent1,000 requests a day, 40K in / 2K out$780
- Overnight batch20,000 requests a day, 4K in / 0.4K out, batch$960
Where to run it
3 hosts serve Gemini 3.1 Flash Image Preview. The comparison is on blended price, 3 parts input to 1 part output.
| Host | In / out per 1M | Model id | |
|---|---|---|---|
Google AI StudioLab API gemini-3.1-flash-image-preview | $0.50 / $3.00 | gemini-3.1-flash-image-preview | |
Vertex AICloud gemini-3.1-flash-image-preview | $0.50 / $3.00 | gemini-3.1-flash-image-preview | |
falInference gemini-3.1-flash-image-preview | - | gemini-3.1-flash-image-preview |
Show 1 more listings: regions, snapshots and variantsHide regional listings
| Vertex AI | |||||||
| Alias gemini-3.1-flash-image-preview | $0.50 / $3.00 | gemini-3.1-flash-image-preview | |||||
Capabilities
Core
- Streaming
- Function calling
- JSON mode
- Structured outputs
Multimodal
- Vision
- Image input
- Audio
- Image generation
- Video
Advanced
- Reasoning
- Tool calling
- MCP
- Prompt caching
- Batch API
- Embeddings
- Takes in
- ImagesText
- Produces
- ImagesText
- Features
- Prompt cachingBuilt-in web search
Cheaper alternatives
Current models that cost less and keep most of what this one can do: tools, vision, reasoning, structured output, caching and enough context.
Same model, cheaper host
No host sells it for less than Google AI Studio.
Smaller Google models
No cheaper Google model keeps its key capabilities.
Other frontier labs
No cheaper match from another frontier lab.
Open-weight picks
No cheaper open-weight match.
Call it
Using Google AI Studio's API.
from google import genai
client = genai.Client() # reads GEMINI_API_KEY
response = client.models.generate_content(model="gemini-3.1-flash-image-preview", contents="Hello")
print(response.text)curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-image-preview:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contents": [{"parts": [{"text": "Hello"}]}]}'from litellm import completion
response = completion(
model="gemini/gemini-3.1-flash-image-preview",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Quick answers
How much does Gemini 3.1 Flash Image Preview cost?
On Google AI Studio, Gemini 3.1 Flash Image Preview costs $0.50 per million input tokens and $3.00 per million output tokens.
Which APIs offer Gemini 3.1 Flash Image Preview?
Gemini 3.1 Flash Image Preview runs on 3 APIs: Google AI Studio, Vertex AI and fal.
What is Gemini 3.1 Flash Image Preview's context window?
66K tokens, with up to 66K tokens in one reply.
Is Gemini 3.1 Flash Image Preview being retired?
No retirement date is scheduled for it on any API we track.
When was Gemini 3.1 Flash Image Preview released?
Google released it on 26 Feb 2026.
What is Gemini 3.1 Flash Image Preview's API model id?
Use gemini-3.1-flash-image-preview with Google AI Studio.
Sources
Raw catalog entry for gemini-3.1-flash-image-preview on Google AI Studio
{
"deprecation_date": "2026-06-25",
"deprecation_source": "https://ai.google.dev/gemini-api/docs/deprecations",
"successor_model": "gemini/gemini-nano-banana-2.1",
"input_cost_per_token": 5e-7,
"input_cost_per_token_batches": 2.5e-7,
"litellm_provider": "gemini",
"max_input_tokens": 65536,
"max_output_tokens": 65536,
"mode": "image_generation",
"output_cost_per_image": 0.045,
"output_cost_per_image_token": 0.00006,
"output_cost_per_token": 0.000003,
"output_cost_per_token_batches": 0.0000015,
"rpm": 1000,
"tpm": 4000000,
"source": "https://ai.google.dev/gemini-api/docs/pricing",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/images/generations",
"/v1/images/edits"
],
"supported_modalities": [
"text",
"image"
],
"supported_output_modalities": [
"text",
"image"
],
"supports_function_calling": false,
"supports_prompt_caching": true,
"supports_reasoning": false,
"supports_response_schema": false,
"supports_system_messages": true,
"supports_vision": true,
"supports_web_search": true,
"search_context_cost_per_query": {
"search_context_size_low": 0.014,
"search_context_size_medium": 0.014,
"search_context_size_high": 0.014
},
"search_free_requests": {
"count": 5000,
"period": "month",
"shared_group": "gemini-3"
},
"web_search_billing_unit": "per_query"
}