Direct API pricing comparison
Claude Sonnet 5 vs Gemini 3.1 Pro Preview
Compare current direct API token prices and estimated monthly workload costs for Claude Sonnet 5 and Gemini 3.1 Pro Preview.
2direct models
Pricing only.Claude Sonnet 5 is cheaper in 4 of 4 comparable standard workload presets below. This is a pricing comparison only; it does not rank model quality.
| Model | Input | Cached | Output | Context | Max output | Source |
|---|---|---|---|---|---|---|
Claude Sonnet 5Anthropic · Direct API | $2 | $0.2 | $10 | 1M | 128K | Direct ↗ |
Gemini 3.1 Pro PreviewGoogle · Direct API | $2 | $0.2 | $12 | 1.05M | 66K | Direct ↗ |
Same workload, different API bill
These four presets use 30 active days, standard direct rates, no retries, no reasoning-token add-on, no cache writes, and the cached-input percentage shown in each row.
| Standard workload | Claude Sonnet 5 | Gemini 3.1 Pro Preview | Lower monthly estimate |
|---|---|---|---|
| Chat10,000/day · 2,000 in · 500 out · 25% cached | $2,430 | $2,730 | Claude Sonnet 5 by $300 / mo |
| Coding2,000/day · 12,000 in · 1,800 out · 55% cached | $1,807.2 | $2,023.2 | Claude Sonnet 5 by $216 / mo |
| Agent1,200/day · 32,000 in · 2,500 out · 65% cached | $1,856.16 | $2,036.16 | Claude Sonnet 5 by $180 / mo |
| Documents400/day · 180,000 in · 2,000 out · 15% cached | $3,976.8 | $4,024.8 | Claude Sonnet 5 by $48 / mo |
The main calculator includes batch mode, long-context rules, retries, reasoning tokens, cache writes, and other model-specific pricing logic that a static comparison cannot fully capture.