Gemini 3.1 Pro vs Claude Sonnet 4.6: the developer API cost face-off
Coding workhorses and reasoning model showdown.
For complex coding and agentic reasoning, Gemini 3.1 Pro and Claude Sonnet 4.6 are the top contenders. Their cost structures depend heavily on prompt caching efficiency.
Cost Comparison
Based on 100,000 input tokens (50% cached), 5,000 output tokens, and 100 requests.
Side-by-side specs
| Spec | Gemini 3.1 Pro (<=200k) | Claude Sonnet 4.6 |
|---|---|---|
| Input Cost (per M) | $2.00 (better on this spec) | $3.00 |
| Output Cost (per M) | $12.00 (better on this spec) | $15.00 |
| Cached Input (per M) | $0.20 (better on this spec) | $0.30 |
| Batch Discount | 50% | 50% |
How they differ
Gemini 3.1 Pro costs $2.00 per million input tokens and $12.00 per million output tokens, with a 90% cache discount. Claude Sonnet 4.6 is priced at $3.00 per million input tokens and $15.00 per million output tokens, also with a 90% cache discount.
Verdict
Gemini 3.1 Pro is more economical across the board for both base input and output costs. Claude Sonnet 4.6 is preferred if you need Anthropic's specific coding and instruction-following strengths.
Which should you pick?
Choose Gemini 3.1 Pro (<=200k)
Massive context size processing (up to 2M tokens) and general cost savings.
Choose Claude Sonnet 4.6
State-of-the-art multi-file code editing, tool use, and agentic loops.
