AI model comparison
Gemma 4 31B vs Claude Haiku 4.5
Side by side comparison of Gemma 4 31B and Claude Haiku 4.5 on pricing, benchmark scores, context window, and more.
Gemma 4 31B Instruct is Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output.
- Input / 1M
- $0.20
- Output / 1M
- $0.40
- Context
- 262K
Claude Haiku 4.5 is Anthropic’s fastest and most efficient model, delivering near-frontier intelligence at a fraction of the cost and latency of larger Claude models.
- Input / 1M
- $1
- Output / 1M
- $5
- Context
- 200K
Comparing image generators? Compare image models
At a glance
Quick verdict
How the two models stack up on the things people ask about most.
Lower price
Gemma 4 31B
7.5x cheaper for a typical chat
Higher intelligence score
Claude Haiku 4.5
7.4 vs 4.4 on Artificial Analysis
Larger context window
Gemma 4 31B
262K vs 200K tokens
Newer release
Gemma 4 31B
Released April 2, 2026
Benchmarks
Benchmark scores
Independent scores from Artificial Analysis. Higher is better.
Intelligence index
Coding index
Agentic index
Pricing
Gemma 4 31B vs Claude Haiku 4.5 API pricing
Per-token API rates. Cheaper option highlighted.
| Metric | ||
|---|---|---|
| Input tokensPer 1M tokens | $0.20 | $1 |
| Output tokensPer 1M tokens | $0.40 | $5 |
| Cached input (read)Per 1M tokens | Not available | $0.10 |
| Cache writePer 1M tokens | Not available | $1.25 |
| Web searchPer request | Not available | $0.01 |
What it costs in practice
Estimated cost per 1,000 requests at standard rates. Coding and long-document figures also show the cost when the input is already cached.
Chat message
2K in, 500 out
Coding task
30K in, 4K out
Long document summary
150K in, 2K out
Specs
Context window and capabilities
How much each model can read, how much it can write, and what it accepts as input.
| Metric | ||
|---|---|---|
| Context window | 262K tokens | 200K tokens |
| Max output | 16K tokens | 64K tokens |
| Input types | Image, Text, Video | File, Image, Text |
| Output types | Text | Text |
| Reasoning effort levels | Not available | Not available |
| Default reasoning effort | Not available | Not available |
| Release date | April 2, 2026 | October 15, 2025 |
Features
Supported features
API features available for each model.
| Metric | ||
|---|---|---|
| Tool calling | Supported | Supported |
| Structured outputs | Supported | Supported |
| JSON mode | Supported | Supported |
| Reasoning | Supported | Supported |
| Temperature | Supported | Supported |
| Stop sequences | Supported | Supported |
| Deterministic seed | Supported | Not supported |
| Verbosity control | Not supported | Not supported |
Our take
Gemma 4 31B is 7.5x cheaper for a typical chat. Claude Haiku 4.5 scores higher on the Artificial Analysis Intelligence Index (7.4 vs 4.4). Gemma 4 31B has the larger context window (262K vs 200K tokens). The right pick depends on your workload, so the quickest way to settle it is to send the same prompt to both and compare.
FAQ
Frequently asked questions
Is Gemma 4 31B or Claude Haiku 4.5 cheaper?
Gemma 4 31B is cheaper for a typical chat (2K input tokens and 500 output tokens). Gemma 4 31B costs $0.20 per 1M input tokens and $0.40 per 1M output tokens, while Claude Haiku 4.5 costs $1 per 1M input tokens and $5 per 1M output tokens.
Which has a bigger context window, Gemma 4 31B or Claude Haiku 4.5?
Gemma 4 31B supports up to 262K tokens of context, compared with 200K for Claude Haiku 4.5.
Is Gemma 4 31B smarter than Claude Haiku 4.5?
On the Artificial Analysis Intelligence Index, Gemma 4 31B scores 4.4 and Claude Haiku 4.5 scores 7.4, putting Claude Haiku 4.5 ahead. Benchmarks don't capture everything, so the best test is running your own prompts through both.
Can I use Gemma 4 31B and Claude Haiku 4.5 at the same time?
Yes. Shortcut Chat sends one prompt to multiple models at once, so you can see Gemma 4 31B and Claude Haiku 4.5 answer side by side and keep the better response.
Why choose? Ask both.
Send one prompt to Gemma 4 31B and Claude Haiku 4.5 at the same time. Compare the answers side by side and keep the best one.