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.66s | 134 tok/s | ||
| $0.100 | $0.340 | $0.100 | 0.38s | 62 tok/s | ||
| $0.150 | $0.400 | $0.060 | 0.49s | 83 tok/s | ||
| $0.135 | $0.510 | $0.075 | 0.47s | 53 tok/s | ||
| $0.140 | $0.400 | $0.050 | 1.09s | 35 tok/s | ||
| $0.200 | $0.400 | -- | 0.69s | 26 tok/s | ||
| $0.300 | $0.600 | -- | 0.66s | 28 tok/s | ||
| $0.750 | $1.000 | $0.250 | 1.21s | 54 tok/s | ||
| $0.140 | $0.400 | -- | 0.40s | 152 tok/s | ||
| $0.120 | $0.360 | $0.090 | 0.72s | 42 tok/s | ||
| $0.150 | $0.400 | $0.060 | 0.61s | 36 tok/s | ||
| $0.340 | $0.100 | $0.100 | 0.52s | 110 tok/s | ||
| $0.200 | $0.335 | $0.100 | 1.47s | 57 tok/s | ||
| $0.140 | $0.400 | -- | 0.76s | 28 tok/s | ||
| $0.120 | $0.370 | $0.012 | 3.43s | 26 tok/s | ||
| $0.140 | $0.400 | $0.140 | 0.60s | 42 tok/s | ||
| $0.380 | $1.150 | -- | 6.73s | 60 tok/s | ||
Not used in Standard routing:Why these endpoints are not used | ||||||
| $0.160 | $0.320 | -- | 0.93s | 24 tok/s | ||
- Input $0.10 / Output $0.34134 tok/s99.27% uptime
- Input $0.10 / Output $0.3462 tok/s100.00% uptime
- Input $0.15 / Output $0.4083 tok/s100.00% uptime
Input $0.135 / Output $0.5153 tok/s100.00% uptimeTurbo- Input $0.14 / Output $0.4035 tok/s90.16% uptime
Input $0.20 / Output $0.4026 tok/s99.62% uptime
Input $0.30 / Output $0.6028 tok/s99.58% uptimePriority- Input $0.75 / Output $1.0054 tok/s98.96% uptime
- Input $0.14 / Output $0.40152 tok/s99.97% uptime
- Input $0.12 / Output $0.3642 tok/s99.97% uptime
- Input $0.15 / Output $0.4036 tok/s100.00% uptime
- Input $0.34 / Output $0.10110 tok/s99.92% uptime
- Input $0.20 / Output $0.33557 tok/s99.61% uptime
- Input $0.14 / Output $0.4028 tok/s96.23% uptime
- Input $0.12 / Output $0.3726 tok/s98.50% uptime
- Input $0.14 / Output $0.4042 tok/s99.92% uptime
- Input $0.38 / Output $1.1560 tok/s85.84% uptime
- Not used in Standard routing:Why these endpoints are not used
Input $0.16 / Output $0.3224 tok/s99.88% 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.0558 | $0.3692 | 59.4% | 1.0% | ||
| $0.0979 | $0.3985 | 57.8% | 6.2% | ||
| $0.0999 | $0.3384 | 35.9% | 17.3% | ||
| $0.0999 | $0.3383 | 23.2% | 23.8% | ||
| $0.1071 | $0.3572 | 42.6% | 1.1% | ||
| $0.1086 | $0.5083 | 43.9% | 17.9% | ||
| $0.1098 | $0.3981 | 33.4% | 0.2% | ||
| $0.1298 | $0.3990 | 22.3% | 6.9% | ||
| $0.1398 | $0.3980 | 0.0% | 0.6% | ||
| $0.1399 | $0.3987 | 26.1% | 2.9% | ||
| $0.1399 | $0.3993 | 13.2% | 11.8% | ||
| $0.1502 | $0.3345 | 49.7% | 0.7% | ||
| $0.1999 | $0.3986 | 0.0% | 6.1% | ||
| $0.2766 | $0.0991 | 26.3% | 1.7% | ||
| $0.2998 | $0.5980 | 0.0% | 0.6% | ||
| $0.3692 | $1.0000 | 76.1% | 1.1% | ||
| $0.3799 | $1.1496 | 0.0% | 0.2% | ||
Not used in Standard routing:Why these endpoints are not used | |||||
| $0.1597 | $0.3187 | 0.0% | 0.0% | ||
- Effective in $0.0558 / Effective out $0.3692Token share1.0%
- Effective in $0.0979 / Effective out $0.3985Token share6.2%
- Effective in $0.0999 / Effective out $0.3384Token share17.3%
- Effective in $0.0999 / Effective out $0.3383Token share23.8%
- Effective in $0.1071 / Effective out $0.3572Token share1.1%
- Effective in $0.1086 / Effective out $0.5083TurboToken share17.9%
- Effective in $0.1098 / Effective out $0.3981Token share0.2%
- Effective in $0.1298 / Effective out $0.3990Token share6.9%
- Effective in $0.1398 / Effective out $0.3980Token share0.6%
- Effective in $0.1399 / Effective out $0.3987Token share2.9%
- Effective in $0.1399 / Effective out $0.3993Token share11.8%
- Effective in $0.1502 / Effective out $0.3345Token share0.7%
- Effective in $0.1999 / Effective out $0.3986Token share6.1%
- Effective in $0.2766 / Effective out $0.0991Token share1.7%
- Effective in $0.2998 / Effective out $0.5980PriorityToken share0.6%
- Effective in $0.3692 / Effective out $1.0000Token share1.1%
- Effective in $0.3799 / Effective out $1.1496Token share0.2%
- Not used in Standard routing:Why these endpoints are not used
- Effective in $0.1597 / Effective out $0.3187FlexToken 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. 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 15 providers on OpenRouter: KT, CoreWeave, Venice, Chutes, DeepInfra (fp8), DekaLLM, Crusoe, Friendli and 7 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.