{T}
TokenMath.net
Verified against Google Cloud / AI Studio Pricing
GoogleflagshipPublic PreviewPreview Release

Gemini 3.1 Pro Preview API Pricing & Cost Calculator

Frontier 1.05M context Preview model with multimodal reasoning, coding depth, and tiered pricing Need a token count first? Use the Gemini token counter.

Standard Input / 1M
$2.00
Prompt tokens
Cached Input / 1M
$0.20
Prompt caching rate
Output / 1M
$12.00
Generation completion
Context Window
1.05M
Max out: 16.4k
Tiered Context Pricing
Standard Prompts (≤ 200k)
$2.00 in / $12.00 out
Cached: $0.20/1M
Long-Context Prompts (> 200k)
$4.00 in / $18.00 out
Cached: $0.40/1M
API & Developer Integration Details
preview
API Model Stringgemini-3.1-pro-preview
Provider & FamilyGoogle (gemini)
Prompt Caching Rules32,768 min tokens (90% off)
Long-Context Tiers> 200k: 2x in / 1.5x out
First-party audit timestamp: 2026-10-11 07:55 UTCOfficial Documentation

Interactive Cost & Token Simulator for Gemini 3.1 Pro Preview

Live Calculation
Input Tokens2,500
Output Tokens800
Requests / Day5,000
Prompt Caching Ratio (50%)$0.2/M cached rate
Cost / Request$0.0124
Daily Spend (5,000 reqs)$61.75
Monthly Run-Rate (30d)$1,852.50

Standard Workload Cost Scenarios

ScenarioInput TokensOutput TokensUncached CostWith Prompt Caching
Short Chat Query1,000500$0.00800$0.00620
Document Summarization10,0002,000$0.0440$0.0260
Codebase & Context Analysis100,00020,000$0.4400$0.2600
Batch Corpus Processing1,000,000100,000$3.20$1.40
Technical Architecture & Pricing VerificationVerified: 2026-10-11 07:55 UTC
Model ArchitectureGemini 3.1 Pro Preview
Provider OrganizationGoogle
Tokenizer EncodingGoogle Gemini SentencePiece (256k vocabulary)
API ConnectivityGoogle AI Studio & Vertex AI API (gemini-3.1-pro-preview). Context window: 1,048,576 tokens.
Batch API 50% DiscountSupported (50% off input & output)
0
Tier 1 Rate Quota (Free-Tier Reference)1,000 RPM · 2M TPM

Tier 1 (free tier) reference limits — your account's actual quota may be higher.

Blended 3:1 Cost / 1M Tokens$4.50
Google Gemini 3.1 Pro Preview. Tier 1 (<=200k tokens): $2.00/1M input, $12.00/1M output, $0.20/1M cached. Tier 2 (>200k tokens): $4.00/1M input, $18.00/1M output, $0.40/1M cached. Context caching write is free ($0); storage is billed at $0.50/1M/hour (promotional through Dec 31, 2026).Google Cloud / AI Studio Pricing

Verified Pricing History

September 15, 2026: $2/M input · $12/M output ($0.2/M cached)
Calibrated to Gemini 3.1 Pro Preview specifications: 1,048,576 tokens context, <=200k ($2/$12) and >200k ($4/$18) tiered pricing.
June 2026: $1.25/M input · $5/M output ($0.31/M cached)
Gemini 3.1 Pro 2M context baseline.

When to Choose Gemini 3.1 Pro Preview

Ideal for production workloads demanding flagship capabilities, deep context depth (1.05M tokens), and reliability from Google. Excellent when predictable tokenomics and prompt caching support are paramount.

When Another Model May Be Better

If your use-case requires sub-second streaming latency or ultra-high frequency classification at micro-cent pricing, consider lighter budget options such as Gemini Flash-Lite or Claude Haiku. For deep formal logic, consider dedicated reasoning models like o3.

Frequently Asked Questions About Gemini 3.1 Pro Preview

How much does 1 million tokens cost with Gemini 3.1 Pro Preview?

For Gemini 3.1 Pro Preview, 1 million input tokens costs $2.00, while 1 million output tokens costs $12.00. If using prompt caching, repetitive input prefixes are discounted to $0.20 per million.

What is the context window for Gemini 3.1 Pro Preview?

Gemini 3.1 Pro Preview features a maximum context window of 1,048,576 tokens (~786,432 words), with a maximum output limit of 16,384 tokens per completion.

Which tokenizer does Gemini 3.1 Pro Preview use?

Gemini 3.1 Pro Preview utilizes the Google Gemini SentencePiece (256k vocabulary). Token counting on TokenMath runs client-side to ensure maximum privacy.

Does Gemini 3.1 Pro Preview support prompt caching discounts?

Yes. Gemini 3.1 Pro Preview supports prompt caching with a cached input rate of $0.20/1M (saving up to 90% on repeated input context).