Google: Gemma 4 31B
google/gemma-4-31b-it
Model weightsGemma 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 calling, and multilingual support across 140+ languages. Strong on coding, reasoning, and document understanding tasks. Apache 2.0 license.
Providers
Different companies host the same model. OpenRouter routes your request to one of them based on the routing mode you pick: Balanced (price + speed), Nitro (fastest), or Floor (cheapest).
| $0.100 | $0.340 | $0.100 | 0.70s | 142 tok/s | ||
| $0.100 | $0.340 | $0.100 | 0.43s | 58 tok/s | ||
| $0.150 | $0.400 | $0.060 | 0.70s | 73 tok/s | ||
| $0.135 | $0.510 | $0.075 | 0.44s | 55 tok/s | ||
| $0.750 | $1.000 | $0.250 | 1.30s | 35 tok/s | ||
| $0.300 | $0.600 | -- | 1.99s | 9 tok/s | ||
| $0.140 | $0.400 | -- | 0.55s | 146 tok/s | ||
| $0.120 | $0.360 | $0.090 | 0.62s | 40 tok/s | ||
| $0.140 | $0.400 | $0.140 | 0.54s | 42 tok/s | ||
| $0.150 | $0.400 | $0.060 | 0.78s | 23 tok/s | ||
| $0.120 | $0.370 | $0.012 | 3.15s | 24 tok/s | ||
| $0.200 | $0.335 | $0.100 | 0.90s | 67 tok/s | ||
| $0.140 | $0.400 | -- | 0.54s | 73 tok/s | ||
| $0.200 | $0.400 | -- | 4.77s | 7 tok/s | ||
| $0.380 | $1.150 | -- | 2.09s | 140 tok/s | ||
| $0.340 | $0.100 | $0.100 | 0.78s | 97 tok/s | ||
Not used in Standard routing:Why these endpoints are not used | ||||||
| $0.160 | $0.320 | -- | 2.91s | 13 tok/s | ||
- Input $0.10 / Output $0.34142 tok/s99.86% uptime
- Input $0.10 / Output $0.3458 tok/s96.92% uptime
- Input $0.15 / Output $0.4073 tok/s100.00% uptime
Input $0.135 / Output $0.5155 tok/s99.91% uptimeTurbo- Input $0.75 / Output $1.0035 tok/s97.70% uptime
Input $0.30 / Output $0.609 tok/s99.25% uptimePriority- Input $0.14 / Output $0.40146 tok/s100.00% uptime
- Input $0.12 / Output $0.3640 tok/s100.00% uptime
- Input $0.14 / Output $0.4042 tok/s99.45% uptime
- Input $0.15 / Output $0.4023 tok/s100.00% uptime
- Input $0.12 / Output $0.3724 tok/s99.86% uptime
- Input $0.20 / Output $0.33567 tok/s99.63% uptime
- Input $0.14 / Output $0.4073 tok/s95.78% uptime
Input $0.20 / Output $0.407 tok/s99.97% uptime- Input $0.38 / Output $1.15140 tok/s82.16% uptime
- Input $0.34 / Output $0.1097 tok/s96.24% uptime
- Not used in Standard routing:Why these endpoints are not used
Input $0.16 / Output $0.3213 tok/s100.00% uptimeFlex
Pricing
The average price customers actually pay for this model, next to the prices providers post. Caching and discounts mean the price actually paid is often well below the listed one.
Weighted average
Gemma 4 31B — Price history
| $0.0737 | $0.3688 | 42.8% | 1.3% | ||
| $0.0999 | $0.3385 | 38.3% | 20.2% | ||
| $0.0999 | $0.3388 | 26.9% | 17.9% | ||
| $0.1060 | $0.5078 | 48.1% | 18.4% | ||
| $0.1063 | $0.3573 | 45.1% | 1.2% | ||
| $0.1123 | $0.3989 | 41.8% | 3.7% | ||
| $0.1220 | $0.3988 | 31.0% | 12.5% | ||
| $0.1398 | $0.3978 | 0.0% | 1.0% | ||
| $0.1399 | $0.3986 | 23.8% | 2.8% | ||
| $0.1399 | $0.3993 | 19.7% | 12.6% | ||
| $0.1648 | $0.3346 | 35.1% | 0.8% | ||
| $0.1999 | $0.3988 | 0.0% | 5.0% | ||
| $0.2998 | $0.5995 | 0.0% | 2.0% | ||
| $0.3799 | $1.1496 | 0.0% | 0.2% | ||
| $0.6390 | $1.0000 | 22.2% | 0.2% | ||
| $0.2551 | $0.0998 | 35.3% | 0.4% | ||
Not used in Standard routing:Why these endpoints are not used | |||||
| $0.1598 | $0.3179 | 0.0% | 0.0% | ||
- Effective in $0.0737 / Effective out $0.3688Token share1.3%
- Effective in $0.0999 / Effective out $0.3385Token share20.2%
- Effective in $0.0999 / Effective out $0.3388Token share17.9%
- Effective in $0.1060 / Effective out $0.5078TurboToken share18.4%
- Effective in $0.1063 / Effective out $0.3573Token share1.2%
- Effective in $0.1123 / Effective out $0.3989Token share3.7%
- Effective in $0.1220 / Effective out $0.3988Token share12.5%
- Effective in $0.1398 / Effective out $0.3978Token share1.0%
- Effective in $0.1399 / Effective out $0.3986Token share2.8%
- Effective in $0.1399 / Effective out $0.3993Token share12.6%
- Effective in $0.1648 / Effective out $0.3346Token share0.8%
- Effective in $0.1999 / Effective out $0.3988Token share5.0%
- Effective in $0.2998 / Effective out $0.5995PriorityToken share2.0%
- Effective in $0.3799 / Effective out $1.1496Token share0.2%
- Effective in $0.6390 / Effective out $1.0000Token share0.2%
- Effective in $0.2551 / Effective out $0.0998Token share0.4%
- Not used in Standard routing:Why these endpoints are not used
- Effective in $0.1598 / Effective out $0.3179FlexToken share0.0%
Performance
Throughput is how fast the model writes (tokens per second — higher is better). Latency is total round-trip time (lower is better). TTFT is time-to-first-token — how long before you see anything appear (lower is better).
P50, best across providers
P50, best provider
Uptime
Uptime is the percentage of the past 3 days that at least one provider was responding to requests. Availability is the percentage of time that inference was successfully served. OpenRouter continuously monitors and uses the next-best provider when one returns an error.
Availability over the last 3 days
Last 72 hoursAvailability over the last 24 hours
When an error occurs in an upstream provider, we can recover by routing to another healthy provider, if your request filters allow it. You can access per-provider uptime data programmatically through the Endpoints API. Learn more about our load balancing and provider routing options.
Benchmarks
Scores on standardized evaluations and this model’s own outputs on shared benchmark prompts. Higher percentages are better — and each rank shows where this model lands among the models evaluated on that source.
| Source | Benchmark | Score |
|---|---|---|
| Artificial Analysis | Gemma 4 31B (Reasoning) Intelligence Index | 4.4 |
| Artificial Analysis | Gemma 4 31B (Reasoning) Coding Index | 43.4 |
| Artificial Analysis | Gemma 4 31B (Reasoning) Agentic Index | 4.2 |
| Artificial Analysis | Gemma 4 31B (Reasoning) GPQA Diamond | 85.7% |
| Artificial Analysis | Gemma 4 31B (Reasoning) HLE | 23.6% |
| Artificial Analysis | Gemma 4 31B (Reasoning) IFBench | 75.6% |
| Artificial Analysis | Gemma 4 31B (Reasoning) τ²-Bench Telecom | 59.9% |
| Artificial Analysis | Gemma 4 31B (Reasoning) AA-LCR | 69.7% |
| Artificial Analysis | Gemma 4 31B (Reasoning) τ-Bench Banking | 14.8% |
| Artificial Analysis | Gemma 4 31B (Reasoning) GDPval-AA | 6.3% |
| Artificial Analysis | Gemma 4 31B (Reasoning) CritPt | 1.4% |
| Artificial Analysis | Gemma 4 31B (Reasoning) SciCode | 45.5% |
| Artificial Analysis | Gemma 4 31B (Reasoning) Terminal-Bench Hard | 36.4% |
| Artificial Analysis | Gemma 4 31B (Reasoning) Terminal-Bench 4.0 | 0.0% |
| Artificial Analysis | Gemma 4 31B (Reasoning) Terminal-Bench 2.1 | 43.4% |
| Artificial Analysis | Gemma 4 31B (Reasoning) AA-Omniscience Accuracy | 19.9% |
| Artificial Analysis | Gemma 4 31B (Reasoning) AA-Omniscience Non-Hallucination Rate | 14.5% |
| Artificial Analysis | Gemma 4 31B (Non-reasoning) Coding Index | 33.2 |
| Artificial Analysis | Gemma 4 31B (Non-reasoning) GPQA Diamond | 76.3% |
| Artificial Analysis | Gemma 4 31B (Non-reasoning) HLE | 11.8% |
| Artificial Analysis | Gemma 4 31B (Non-reasoning) IFBench | 53.5% |
| Artificial Analysis | Gemma 4 31B (Non-reasoning) τ²-Bench Telecom | 65.5% |
| Artificial Analysis | Gemma 4 31B (Non-reasoning) AA-LCR | 46.7% |
| Artificial Analysis | Gemma 4 31B (Non-reasoning) τ-Bench Banking | 8.9% |
| Artificial Analysis | Gemma 4 31B (Non-reasoning) GDPval-AA | 2.7% |
| Artificial Analysis | Gemma 4 31B (Non-reasoning) CritPt | 0.0% |
| Artificial Analysis | Gemma 4 31B (Non-reasoning) Terminal-Bench Hard | 30.3% |
| Artificial Analysis | Gemma 4 31B (Non-reasoning) Terminal-Bench 2.1 | 29.2% |
| Vals AI | Gemma 4 31B IT CaseLaw v2 | 52.6% |
| Vals AI | Gemma 4 31B IT Finance Agent v1.1 | 50.8% |
| Vals AI | Gemma 4 31B IT MortgageTax | 61.4% |
| Vals AI | Gemma 4 31B IT SAGE | 82.8% |
| Vals AI | Gemma 4 31B IT Terminal-Bench 2.0 | 39.3% |
Apps
Public apps that send the most traffic to this model. Good signal for what real production workloads look like — and a hint at which use cases this model is best suited for.
Activity
Token volume and request traffic to this model over time.
API
Drop-in code to call this model. OpenRouter's API is OpenAI-compatible — most SDKs work by just swapping the base URL. The only thing that changes between models is the model slug below.
Not currently available through EU in-region routing. In-region routing docs
Documentation
Guides, cookbooks, blog posts, and tools for building with Google: Gemma 4 31B on OpenRouter.
Frequently asked questions
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 calling, and multilingual support across 140+ languages. Strong on coding, reasoning, and document understanding tasks. Apache 2.0 license.
The Gemma 4 31B documentation on OpenRouter includes the LLM Quantization: What fp8 and fp4 Do to Quality and Price blog post and the LLM API Rate Limits: How to Fix OpenAI and Claude 429 Errors blog post. The quickstart covers API keys and your first request, and the API reference lists every parameter.
Gemma 4 31B costs $0.10/M input tokens and $0.34/M output tokens, with separate rates for Cache Read at $0.10/M tokens.
Gemma 4 31B has a 262,144 token context window. It supports up to 262,144 completion tokens.
Yes. Gemma 4 31B accepts tools and tool_choice for function calling on 13 of the 14 providers serving it, and requests that send tools are routed to those providers. It also supports structured outputs via a JSON schema in response_format.
Gemma 4 31B accepts images, text, and video as input and returns text.
Gemma 4 31B is served by 14 providers on OpenRouter: KT, CoreWeave, Venice, Chutes, DeepInfra (fp8), Crusoe, Friendli, NovitaAI and 6 more. Requests are routed to the best available provider, with automatic failover to the others, and you can pin or exclude providers with provider routing.
Gemma 4 31B was released on April 2, 2026.