Claude Sonnet 5 vs Gemma 4 31B IT
anthropic/claude-sonnet-5 · google/gemma-4-31b-it
As of October 25, 2026, Gemma 4 31B IT is the cheaper API on UberLLM: $0.0372 per million input tokens and $0.1116 per million output, versus $0.1600 / $0.8000 for Claude Sonnet 5 — about 85% less on a blended 3:1 token mix. Both are reached through one OpenAI-compatible key and routed to the cheapest healthy seller, with no UberLLM fee added, so the price you see is the price you pay. Choose Gemma 4 31B IT to cut cost; choose Claude Sonnet 5 when context size wins — Claude Sonnet 5 carries the larger context window (1,000,000 vs 262,144 tokens), which can matter for long-document work.
Claude Sonnet 5 vs Gemma 4 31B IT, side by side
| Spec | Claude Sonnet 5 | Gemma 4 31B IT |
|---|---|---|
| Price · input / 1M | $0.1600 | $0.0372 |
| Price · output / 1M | $0.8000 | $0.1116 |
| Context length | 1,000,000 | 262,144 |
| Max output tokens | 64,000 | 131,072 |
| Input modalities | text | text, image |
| Output modalities | text | text |
| Tools / functions | Yes | Yes |
| Vision (image input) | — | Yes |
| Reasoning | Yes | — |
| Cheapest seller | UberLLM | UberLLM |
| % off list | 92% off | 69% off |
Live prices via UberLLM, routed to the cheapest healthy seller. The price shown has no UberLLM fee added. Updated October 25, 2026.
Claude Sonnet 5 vs Gemma 4 31B IT — FAQ
Is Claude Sonnet 5 or Gemma 4 31B IT cheaper?
Gemma 4 31B IT is cheaper on a blended token mix, by about 85%. UberLLM routes every request to the cheapest healthy seller and bills the price shown, with no fee added.
What's the price difference between Claude Sonnet 5 and Gemma 4 31B IT?
Claude Sonnet 5: $0.1600 in / $0.8000 out per 1M tokens. Gemma 4 31B IT: $0.0372 in / $0.1116 out per 1M tokens. That's roughly a 85% blended difference. Prices are live; UberLLM adds no fee.
Can I use both Claude Sonnet 5 and Gemma 4 31B IT with one API?
Yes. Both are served through a single OpenAI-compatible endpoint — set the base URL to https://api.uberllm.dev/v1 and your UberLLM key, then switch between them by changing the model id. Anthropic SDKs work via https://api.uberllm.dev/v1/messages.