Curated cost comparison

Claude Sonnet 5 vs Gemini 3.1 Pro Preview API cost

FactClaude Sonnet 5Gemini 3.1 Pro Preview
Input / MTok$3.00$2.00
Output / MTok$15.00$12.00
Cached input$0.3000$0.2000
Context1,000,0001,000,000
Example request$0.0600$0.0440
Verified2026-07-162026-07-16

Claude Sonnet 5 pricing rules

Scheduled standard price beginning September 1, 2026.

Official source

Gemini 3.1 Pro Preview pricing rules

Prompts above 200K use the higher rates for the request; thinking tokens are included in output billing.

Official source

Frequently asked questions

Which costs less for the example workload?

Gemini 3.1 Pro Preview has the lower list-price result for 10,000 input and 2,000 output tokens. This is not a quality ranking.

Does context size change the result?

It can. Context limits determine eligibility, and documented long-context thresholds can apply higher rates.

Are cached tokens included?

The baseline example excludes cache so the standard rates are comparable. Use the calculator to enter an expected cache hit.

Does batch pricing apply?

Only when the provider documents batch eligibility and the workload can tolerate asynchronous processing.

Are tools included?

No. Search, code execution and other server-side tools can carry separate provider charges.

Which model is best?

Price alone cannot determine best. Evaluate capability, latency, reliability, data policy, availability and task-specific performance separately.

Compare your own workload