Claude Sonnet 5 vs Gemini 3.1 Pro Preview: API Cost Comparison (2026)
Claude Sonnet 5 or Gemini 3.1 Pro Preview? Instead of comparing list prices, we compute the same workload on both (prices verified 2026-07-09). Spoiler: Claude Sonnet 5 wins on raw cost in most scenarios — but "when to pick each" matters more than the winner. Compare them live in the calculator.
| Rate per 1M tokens | Claude Sonnet 5 | Gemini 3.1 Pro Preview |
|---|---|---|
| Input | $2.00 | $2.00 |
| Cached input | $0.20 | $0.20 |
| Output | $10.00 | $12.00 |
Same workload, both models
| Monthly scenario | Claude Sonnet 5 | Gemini 3.1 Pro Preview | Difference |
|---|---|---|---|
| Support chatbot (150k requests, 400 in / 300 out tokens) | $570.00 | $660.00 | 14% in favor of Claude Sonnet 5 |
| Document workflow (22k runs, 3,000 in / 400 out tokens) | $220.00 | $237.60 | 7% in favor of Claude Sonnet 5 |
| High-volume classifier (1M requests, 300 in / 10 out tokens) | $700.00 | $720.00 | 3% in favor of Claude Sonnet 5 |
Your token shape decides: input-heavy workloads (documents, RAG) amplify the input-rate gap; output-heavy ones (content generation) weigh the output rate. Run your exact mix in the calculator with both preselected.
When to pick each
- Claude Sonnet 5 — when per-token cost rules: high volume, verifiable tasks, tight budgets. It comes out 14–14% cheaper in these scenarios.
- Gemini 3.1 Pro Preview — when the premium buys something you need (quality on your specific task, context, ecosystem). The only honest way to know: test your real case on both with a small sample.
- Both — the winning production pattern is often routing: easy requests to the cheap one, hard ones to the strong one.
Related guides: how AI API pricing works and how to reduce LLM costs.
Prices verified on 2026-07-09 against the provider's official pricing page. Estimates are for planning purposes only — always confirm current pricing with the provider.