AiCostCompare

Gemma 4 31B

by Google · google/gemma-4-31b-it · #60 cheapest of 325 paid models

Prices updated Jul 22, 2026, 1:31 AM UTC · refreshed hourly

Gemma 4 31B Instruct is Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output. Features a 256K token context window, configurable thinking/reasoning mode, native function...

Compare vs:Claude Sonnet 5Claude Opus 4.6Claude Haiku 4.5GPT-5.6 Sol

Pricing

Input

$0.12

per 1M tokens

Output

$0.37

per 1M tokens

Blended (3:1)

$0.182

3 input : 1 output

Cache read

per 1M cached tokens

Cache write

per 1M tokens

Cache & batch economics

Effective prices for Gemma 4 31B (no cache-read rate published — hits billed as normal input).

Cache hit rateEffective blended $/1MExample request*vs no cache
0%$0.182$0.0126
50%$0.182$0.0126−0%
90%$0.182$0.0126−0%

*Example: 100K sticky context + 2K new input + 1K output. Batch discount is an approximate 50% off list rates for this provider’s batch API. Confirm on the vendor’s pricing page.

What a request costs

WorkloadInput tokensOutput tokensCost / requestCost / 1K requests
Short chat message500300$0.000171$0.171
Document summary8,0001,000$0.00133$1.33
Codebase question (RAG)30,0002,000$0.00434$4.34
Long-context analysis150,0005,000$0.0198$19.85

Performance

Intelligence Index

29.4

AA composite quality

Coding Index

43.4

Math Index

Agentic Index

14.4

Output speed

35 tok/s

median

Time to first token

0.98s

median

Time to first answer

50.29s

after reasoning tokens

Artificial Analysis benchmarks

BenchmarkScore
GPQA Diamond85.7%
Humanity's Last Exam22.7%
SciCode43.4%
IFBench75.6%
AA-LCR (Long Context Reasoning)62.0%
Terminal-Bench Hard36.4%
Terminal-Bench 2.143.4%
τ²-Bench (Telecom)59.9%
τ³-Bench Banking15.1%

Specs

Context window

262K

tokens

Max output

16K

tokens

Input modalities

image, text, video

Tokenizer

Gemma