Claude Sonnet 5 vs Gemini 3.1 Pro Preview

API pricing, context window and capabilities for Claude Sonnet 5 and Gemini 3.1 Pro Preview, side by side. Prices are the cheapest serving route per 1M tokens, verified against LiteLLM and OpenRouter.

Verdict

computed from the published numbers

Claude Sonnet 5 wins on price, on coding and on intelligence.

Price
Claude Sonnet 5
Coding
Claude Sonnet 5
Intelligence
Claude Sonnet 5
Context window
Tied

Key takeaways

who wins on what, from the published numbers

Claude Sonnet 5 wins

  • Cheaper output ($10.00 vs $12.00 /1M)
  • Higher max output (128K vs 66K)

Gemini 3.1 Pro Preview wins

  • Supports audio
  • Has web search
Cheaper overall
Claude Sonnet 5
$2.00 + $10.00 /1M
Larger context
Tied
More providers
Tied

Pricing & specs

cheapest serving route · per 1M tokens
Claude Sonnet 5Gemini 3.1 Pro Preview
Input $/1M$2.00 $2.00
Output $/1M$10.00 best$12.00
Context window1M 1M
Max output128K best66K
Serving providers4 4
Released2026-06-30 2026-02-19

Benchmarks

Artificial Analysis indices, side by side
Claude Sonnet 5Gemini 3.1 Pro Preview
Intelligence53.4 best46.5
Coding71.5 best68.8
GPQA Diamond91% 94% best
Output speed67 t/s 154 t/s best
Latency (TTFT)42.19s 34.98s best

Cost calculator

choose a serving route for each side
Input tokens / month
Output tokens / month
Claude Sonnet 5
via Amazon Bedrock
$20
Gemini 3.1 Pro Preview
via Vertex AI
$22

Capabilities

feature support, side by side
FeatureClaude Sonnet 5Gemini 3.1 Pro Preview
Vision
Tool use
Reasoning
Audio
Prompt caching
Structured output
Web search

Related comparisons

Frequently asked questions

Which is cheaper, Claude Sonnet 5 or Gemini 3.1 Pro Preview?
Claude Sonnet 5 is cheaper for output ($10.00 vs $12.00 per 1M tokens).
What is the context window difference between Claude Sonnet 5 and Gemini 3.1 Pro Preview?
Both Claude Sonnet 5 and Gemini 3.1 Pro Preview have about a 1M-token context window.
How do Claude Sonnet 5 and Gemini 3.1 Pro Preview compare on benchmarks?
On the tracked Artificial Analysis indices, Claude Sonnet 5 leads on coding, and Claude Sonnet 5 leads on intelligence.
Pricing verified against LiteLLM + OpenRouter + provider pages · refreshed daily

Every weekday

AI moves fast. Here's your debrief.

News, analysis, tools, and more.

For people who build with AI