Google
Gemma 4 31BOpen
Google’s strongest open-weights dense model in the Gemma 4 family.
Intelligence
35.0 #478
AAQI 29.0
Output Speed
35 t/s
TTFT 1.10 s · ITL 28.6 ms/tok
Blended price (3:1)
$0.131 /1M
In $0.075/M · Out $0.3/M
Context
262.1K
≈ 655 A4 pages · max out 8,192
Quality Domain Radar
6-Axis Frontier Evaluation vs Category Average & Flagship
Gemma 4 31B
Claude Mythos Preview (#1)
Average (68)
Radar axes are approximated from category scores where direct benchmark measurements are missing — see Methodology.
Strengths & Trade-offs
Where it wins
- Open weights — self-host, fine-tune and audit with no vendor lock-in
- Very low blended price — $0.131/1M mixed tokens
- Cheap prompt-cache reads at $0.0075/1M
Trade-offs to watch
- Slow generation (35 tok/s) for interactive workloads
Killer Use Cases
Whole-repo analysis
Single-pass ingestion of large codebases, contracts or research corpora.
Deep research
Synthesis across broad knowledge domains with citation-grade recall.
Real-time agents
Low-latency loops for voice, gaming and interactive copilots.
Developer Quickstart & API
Set
GEMINI_API_KEY first — get an API keycurl "https://generativelanguage.googleapis.com/v1beta/models/gemma-4-31b:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "content-type: application/json" \
-d '{
"contents": [{"parts": [{"text": "Refactor this function for O(n) time and explain the change."}]}]
}'from google import genai
client = genai.Client() # reads GEMINI_API_KEY
resp = client.models.generate_content(
model="gemma-4-31b",
contents="Refactor this function for O(n) time and explain the change.",
)
print(resp.text)const res = await fetch(
`https://generativelanguage.googleapis.com/v1beta/models/gemma-4-31b:generateContent`,
{
method: "POST",
headers: {
"x-goog-api-key": process.env.GEMINI_API_KEY,
"content-type": "application/json",
},
body: JSON.stringify({ contents: [{ parts: [{ text: "Refactor this function for O(n) time and explain the change." }] }] }),
}
);
console.log((await res.json()).candidates[0].content.parts[0].text);Official Resources & Links
API deployment
Compare hosts & latency
Throughput, TTFT and cache pricing across Groq, Cerebras, Together, DeepInfra, Fireworks, Bedrock and Azure.
GroqCerebrasTogether AIDeepInfraFireworks AIAWS BedrockAzure AI
Scores by Source
Category Scores
Benchmark Results
Live Specs & Architecture
Under the hood
Dense · 31B
- Prompt caching supported — cached input reads at $0.0075/1M tokens.
Release date
Mar 11, 2026
Architecture
Dense · 31B
Parameters
31B
License
Open Weights
Context Window
262,100 tokens
Max Output
8,192 tokens
Modalities
text + image
Cache Pricing
read $0.0075 · write $0.0938 /1M
Reasoning
—
Input Price
$0.075/M
Output Price
$0.3/M
Output Speed
35 t/s
Time to First Token
1.10 s
Data Updated
Aug 5, 2026
Estimated monthly bill
Estimated monthly spend
$0.00
Calculating savings vs GPT-4o...
Cite & embed
GitHub Markdown badge
Loading badge markdown...BibTeX
@misc{llmpodium2026gemma431b,
title = {Benchmark Analysis and Intelligence Evaluation of Gemma 4 31B},
author = {LLMPodium Research},
year = {2026},
url = {https://llmpodium.com/models/gemma-4-31b}
}Embed Score Badge
Add a live Podium Score badge to your GitHub or Hugging Face README — it links back to the live ranking.
Preview
Markdown
Loading badge snippet...HTML
Loading badge snippet...More from Google
Alternative Models
Closest alternatives to Gemma 4 31B based on capabilities, pricing, and benchmark scores.