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

google logo

Gemma 4 31B

7.5x cheaper for a typical chat

Higher intelligence score

anthropic logo

Claude Haiku 4.5

7.4 vs 4.4 on Artificial Analysis

Larger context window

google logo

Gemma 4 31B

262K vs 200K tokens

Newer release

google logo

Gemma 4 31B

Released April 2, 2026

Benchmarks

Benchmark scores

Independent scores from Artificial Analysis. Higher is better.

Intelligence index

google logoGemma 4 31B4.4
anthropic logoClaude Haiku 4.57.4

Coding index

google logoGemma 4 31B43.4
anthropic logoClaude Haiku 4.543.9

Agentic index

google logoGemma 4 31B4.2
anthropic logoClaude Haiku 4.58

Pricing

Gemma 4 31B vs Claude Haiku 4.5 API pricing

Per-token API rates. Cheaper option highlighted.

Metricgoogle logoGemma 4 31Banthropic logoClaude Haiku 4.5
Input tokensPer 1M tokens$0.20$1
Output tokensPer 1M tokens$0.40$5
Cached input (read)Per 1M tokensNot available$0.10
Cache writePer 1M tokensNot available$1.25
Web searchPer requestNot 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

google logoGemma 4 31B$0.60
anthropic logoClaude Haiku 4.5$4.50

Coding task

30K in, 4K out

google logoGemma 4 31B$7.60
anthropic logoClaude Haiku 4.5$50$23 cached

Long document summary

150K in, 2K out

google logoGemma 4 31B$30.80
anthropic logoClaude Haiku 4.5$160$25 cached

Specs

Context window and capabilities

How much each model can read, how much it can write, and what it accepts as input.

Metricgoogle logoGemma 4 31Banthropic logoClaude Haiku 4.5
Context window262K tokens200K tokens
Max output16K tokens64K tokens
Input typesImage, Text, VideoFile, Image, Text
Output typesTextText
Reasoning effort levelsNot availableNot available
Default reasoning effortNot availableNot available
Release dateApril 2, 2026October 15, 2025

Features

Supported features

API features available for each model.

Metricgoogle logoGemma 4 31Banthropic logoClaude Haiku 4.5
Tool callingSupportedSupported
Structured outputsSupportedSupported
JSON modeSupportedSupported
ReasoningSupportedSupported
TemperatureSupportedSupported
Stop sequencesSupportedSupported
Deterministic seedSupportedNot supported
Verbosity controlNot supportedNot 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.

google logoanthropic logo

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.