Gemini 3.1 Pro API Cost Calculator
Price Gemini 3.1 Pro at $2 in and $12 out per million tokens, with its higher rates above 200,000 tokens and the hourly cost of its context cache.
Updated · By Niraj Kumar · 6 sources
https://checkpre.com/ai/gemini-3-1-pro-api-cost-calculator
Each request
System prompt, conversation history, documents and tool definitions are all resent on every call.
The visible answer.
Count tokens from a prompt or JSON payloadShowHide
Plain text, OpenAI Chat or Responses JSON, or Anthropic Messages JSON. A final assistant message or a response body counts as output. Counted in your browser; nothing is uploaded.
Loading the tokenizer…
Counts use OpenAI's o200k tokenizer, so they are exact for GPT-6 and GPT-5 models, plus a few tokens of message framing. Other providers' tokenizers count the same text differently and do not publish a conversion factor; Anthropic says Claude models from 4.7 on produce about 30% more tokens than earlier Claude models. For an exact count on another model, paste one of its API responses: the usage it reports is shown above.
Thinking tokens are billed as output. Leave at 0 for models or settings that do not reason.
Volume
30,000 requests over 30 days.
Discounts
The share of input that repeats exactly at the start of every request, such as a fixed system prompt. The prompt caching calculator prices cache writes and expiry in detail.
- Per 1,000 requests
- $12.00
- Input
- $180.00
- Output
- $180.00
- Price rank
- 19th cheapest of 24
- Cheapest listed model
- Claude Haiku 5.5
- $16.50 a month, $343.50 less
- Input50%
- Output50%
- 1Claude Haiku 5.5Anthropic$16.50
- 2GPT-6 LunaOpenAI$16.50
- 3Qwen3.8 FlashAlibaba$20.55
- 4GPT-5.6 LunaOpenAI$36.00
- 5DeepSeek V4.1 FlashDeepSeek$45.00
- 6Qwen3.7 PlusAlibaba$60.00
- 7Gemini 3.5 Flash-LiteGoogle$64.50
- 8Gemini 3.8 FlashGoogle$123.75
- 9Grok 4.3xAI$150.00
- 10Claude Haiku 4.5Anthropic$165.00
- 11DeepSeek V4 ProDeepSeek$178.20
- 12Grok 4.7xAI$270.00
- 13Qwen3.8 MaxAlibaba$270.00
- 14Claude Sonnet 5.5Anthropic$330.00
- 15Claude Sonnet 5Anthropic$330.00
- 16GPT-6.1 SolOpenAI$330.00
- 17GPT-6 SolOpenAI$330.00
- 18GPT-5.6 TerraOpenAI$360.00
- 19Gemini 3.1 ProGoogle$360.00
- 20Claude Opus 5.5Anthropic$660.00
- 21GPT-5.6 SolOpenAI$660.00
- 22Claude Opus 5Anthropic$825.00
- 23Claude Fable 5.1Anthropic$1,650
- 24GPT-6 AstraOpenAI$1,650
How the Gemini 3.1 Pro API Cost Calculator works
As of October 13, 2026, Gemini 3.1 Pro costs $2 per million input tokens and $12 per million output tokens, with cache hits at $0.20. A request costs its input tokens × the input rate ÷ 1,000,000 plus its output tokens × the output rate ÷ 1,000,000; multiply by requests for the monthly bill.
cost = (fresh input × input rate + cached input × cache rate + (output + reasoning) × output rate) ÷ 1,000,000This page uses the same method as the LLM API Cost Calculator, which explains each term and assumption in full.
Worked example
A chat feature on Gemini 3.1 Pro sending 3,000 input tokens and getting 500 back, 1,000 times a day.
- 1Input: 3,000 × $2 ÷ 1,000,000 = $0.006
- 2Output: 500 × $12 ÷ 1,000,000 = $0.006
- 3Per request: $0.012
- 4Per month: $0.012 × 1,000 × 30 = $360.00
$360.00 a month. Caching a fixed system prompt that makes up 80% of the input would bring it to about $230.40, and the batch API would halve either figure.
Frequently asked questions
How much does Gemini 3.1 Pro cost per million tokens?
$2 per million input tokens and $12 per million output tokens at Google's standard rate. Cache hits are $0.20, and keeping an explicit cache costs $4.50 per million tokens an hour. The batch API takes 50% off. Prompts over 200,000 tokens are billed at $4 input and $18 output for the whole request.
How does Gemini 3.1 Pro's pricing change for long prompts?
Prompts over 200,000 tokens are billed at $4 input, $0.40 cached and $18 output per million tokens instead of $2, $0.20 and $12. Its explicit context cache also costs $4.50 per million tokens for every hour it is kept, which only pays off above about 2.5 hits an hour. Google still labels the model a preview.
How big a request can Gemini 3.1 Pro take?
Up to 1.05 million tokens of context, input and output together, and up to 65,536 output tokens per response. That is roughly 790,000 words of English. The calculator warns when a request will not fit.
Sources
- Anthropic, Claude API pricing · checked
- OpenAI, API pricing · checked
- Google, Gemini API pricing · checked
- DeepSeek, Models and pricing · checked
- xAI, Models and pricing · checked
- Alibaba Cloud Model Studio, Model pricing · checked
Related calculators
- LLM API Cost CalculatorPrice a real workload across Claude, GPT, Gemini, DeepSeek, Grok and Qwen side by side, with prompt caching, batch discounts and exact token counts.
- Claude Sonnet 5 vs Gemini 3.1 Pro API CostClaude Sonnet 5 at $2/$10 against Gemini 3.1 Pro at $2/$12 per million tokens, including Gemini's higher rates for prompts over 200,000 tokens.
- Claude Opus 5.5 vs Gemini 3.1 Pro API CostClaude Opus 5.5 at $4/$20 against Gemini 3.1 Pro at $2/$12 per million tokens, with caching and Gemini's long-context rates worked in.
- Claude Opus 5.5 API Cost CalculatorPrice Claude Opus 5.5 at $4 in and $20 out per million tokens, with 5% cache hits, and see how it compares with Opus 5, GPT and Gemini.
More in AI, Cloud & Developer
- Gemini 3.8 Flash API Cost Calculator
- Gemini 3.5 Flash-Lite API Cost Calculator
- DeepSeek V4 Pro API Cost Calculator
- DeepSeek V4.1 Flash API Cost Calculator
- Grok 4.7 API Cost Calculator
- Grok 4.3 API Cost Calculator
- Qwen3.8 Max API Cost Calculator
- Qwen3.7 Plus API Cost Calculator
- All 99 AI, Cloud & Developer calculators