Compare / Models
Claude Sonnet 4.5 vs Gemini 3.1 Pro (preview)
Price, context window and capabilities side by side — read from the same catalog that meters your calls, not from a press release.
Gemini 3.1 Pro (preview) is 1.5x cheaper on input. Gemini 3.1 Pro (preview) is 1.3x cheaper on output. Gemini 3.1 Pro (preview) holds 1M tokens against 200K.
At a glance
Side by side
Anthropic
Frontier-quality text and reasoning through one OpenAI-compatible endpoint.
Google's newest Pro tier, shipped as a preview.
Specifications
Every difference we can measure
| Claude Sonnet 4.5 | Gemini 3.1 Pro (preview) | |
|---|---|---|
| Input price | $3/M | $2/M |
| Output price | $15/M | $12/M |
| Context window | 200K tokens | 1M tokens |
| Vision | Yes | Yes |
| Tool calling | Yes | Yes |
| Prompt caching | Yes | Yes |
| Long context | No | Yes |
A row appears only when we hold the fact for both models. Anything the provider has not published is left out rather than guessed, so an empty row is missing data and never a zero.
Verdict
Which to pick
Gemini 3.1 Pro brings a bigger context window and strong multimodal input; Sonnet 4.5 is the steadier hand inside agent loops. Route by shape of work: massive-context analysis to Gemini, iterative tool-driven execution to Sonnet.
Keep looking
Related comparisons
FAQ
Frequently asked questions
What is the difference between Claude Sonnet 4.5 and Gemini 3.1 Pro (preview)?
Gemini 3.1 Pro (preview) is 1.5x cheaper on input. Gemini 3.1 Pro (preview) is 1.3x cheaper on output. Gemini 3.1 Pro (preview) holds 1M tokens against 200K. Only Gemini 3.1 Pro (preview) declares long context. Both run on the same endpoint and the same key here, so trying each is a one-line change to the model id.
Which is cheaper, Claude Sonnet 4.5 or Gemini 3.1 Pro (preview)?
Gemini 3.1 Pro (preview) is, on input tokens. Output usually dominates the bill on generative work, so check the output row above against your own ratio of prompt to completion before deciding.
Can I switch between Claude Sonnet 4.5 and Gemini 3.1 Pro (preview) without changing my code?
Yes. Both are OpenAI-compatible through one CompanyFabric key, so switching is the model string and nothing else — no second SDK, no second contract, one prepaid balance across both.
Do I have to choose?
No. Send companyfabric/auto and we route each request to the cheapest model that can serve it, which is how most people use both without deciding in advance.
One key. Every model. Exact prices.
Run Claude Sonnet 4.5 and Gemini 3.1 Pro (preview) on the same key and compare them on your own prompts. Free starter credits included, no subscription required.