- Organizations
- Gemma 4 31B
Gemma 4 31B: API Pricing, Context Window & Benchmarks
Gemma 4 31B is a language model from Google, released in April 2026, with multimodal input, a 262K-token context window, and pricing from $0.130/M input and $0.380/M output.
Gemma 4 31B is Google DeepMind's flagship dense multimodal model with 31 billion parameters and a 256K context window. Ranks #3 among open models on Arena AI. Built from the same research as Gemini 3, it features Per-Layer Embeddings,
Gemma 4 31B benchmarks
Capability tiers
Standing within each category, adjusted for leaderboard depth.
Real tasks performance
High-confidence performance for Gemma 4 31B across real-world prompt categories. Only 95% intervals at most 4 points wide are shown.
Performance by conversation depth
How Gemma 4 31B holds up as conversations get longer.
Quality Tracker
Gemma 4 31B Performance Across Datasets
Scores sourced from the model's scorecard, paper, or official blog posts
Gemma 4 31B pricing
Providers
Gemma 4 31B starts at $0.130 per million input tokens and $0.380 per million output tokens via DeepInfra. See all 4 providers below with their per-token pricing, latency, throughput, and modality support.
| Provider | Input $/M | Cached input $/M | Output $/M | Context in / out | TTFT p95 s | Output p5 c/s | Modalities in / out |
|---|---|---|---|---|---|---|---|
| $0.130 | — | $0.380 | 262.1K/131.1K | — | — | / | |
| $0.140 | — | $0.400 | 262.1K/131.1K | 22.43 | 23 | / | |
| $0.140 | — | $0.400 | 262.1K/131.1K | — | — | / | |
| $0.390 | — | $0.970 | 262.1K/131.1K | 22.88 | 6 | / |
Cached input is the discounted price for prompt tokens served from a provider cache. TTFT is time to first token. Output is characters per second; p5 is the sustained floor exceeded by 95% of observed requests.
Gemma 4 31B model size
Gemma 4 31B has 30.7 billion parameters. See how it compares to other models in the same parameter range.
Gemma 4 31B context window
Input and output token limits for Gemma 4 31B, plus how it ranks on long-context understanding.
Gemma 4 31B API
Run a request to see the response
Use it in your code
Billed at $0.13 input / $0.38 output per 1M tokens through the LLM Stats gateway.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://gateway.llm-stats.com/v1"
)
response = client.chat.completions.create(
model="gemma-4-31b-it",
messages=[
{"role": "user", "content": "What is machine learning?"}
]
)
print(response.choices[0].message.content)Need an API key? Create one above in the playground, or read the API documentation.
Gemma 4 31B latency
Gemma 4 31B time to first token, sustained output throughput, and failed-request rate from live API traffic over the trailing 7 days.
Provider operational metrics
Time to first token, output throughput, and failed-request rate from live API traffic
Gemma 4 31B examples
Recent arena outputs from Gemma 4 31B, picked from the highest-ranked matchups.
Gemma 4 31B license
Gemma 4 31B is released under the Apache 2.0 license, which permits commercial use, has 30.7B parameters, has a knowledge cutoff of January 2025.
- License
- Apache 2.0
- Commercial use allowed
- Parameters
- 30.7B
- Knowledge cutoff
- January 2025
Apache License 2.0 - allows commercial use
Gemma 4 31B resources
Official sources for Gemma 4 31B: api documentation, official playground, official launch post, model weights.
Gemma 4 31B vs other models
The most-compared alternatives to Gemma 4 31B are Claude Opus 4.6, Grok-3, LongCat-Flash-Thinking-2601. Open any pair side-by-side for benchmarks, pricing, context, and latency.
Models like Gemma 4 31B
Models ranked just above and below Gemma 4 31B by LLM Stats score.
FAQ
Common questions about Gemma 4 31B.