Compute Comparison
Google/Gemma 4EfficientOpen Weights

gemma-4-31b

costspeedvision
gemma-4-31b Pricing per 1M tokens
Input$0.140
Output$0.400
View Google
Context Window
256K
tokens
gemma-4-31b Max Output
8K
tokens
gemma-4-31b Throughput
180
tokens/sec
gemma-4-31b Latency P50
280ms
time to first token
gemma-4-31b Parameters
31B
Parameters
About gemma-4-31b

gemma-4-31b is a efficient-tier language model from Google with 31B parameters. gemma-4-31b is an open-weights model, meaning the weights are publicly available for self-hosting, fine-tuning, and deployment on your own infrastructure — not just through Google's API. Gemma 4 is Google's newest open-weights family, featuring a 26B model with vision support and a 256K context window — competitive with much larger proprietary models on many benchmarks.

gemma-4-31b is priced at $0.14/1M input tokens and $0.4/1M output tokens. Output tokens are 2.9× more expensive than input tokens — this ratio reflects the sequential nature of autoregressive generation, which requires a separate forward pass per output token versus parallel processing of all input tokens simultaneously. At a typical usage pattern of 1,000 input tokens and 500 output tokens per call, gemma-4-31b costs approximately $0.34 per 1,000 API calls. Google does not publish a prompt caching rate for this model, so repeated long contexts are billed at the standard $0.14/1M input rate.

Its 256K-token context window is in the top tier for production models, enabling full-document analysis, long multi-turn conversations, and large codebase understanding without chunking. Median latency (P50 time-to-first-token) is approximately 280ms — fast enough for real-time interactive applications. Throughput is approximately 180 tokens/second — fast enough to stream responses at reading speed with headroom for concurrent requests. Maximum output length is 8K tokens — adequate for most generation tasks including essays, code functions, and detailed responses.

gemma-4-31b is best suited to cost, speed, vision. Supported capabilities include vision inputs (images alongside text), function calling / tool use for agentic workflows, streaming token output for real-time UIs. Vision support enables document analysis, screenshot understanding, diagram interpretation, and visual question answering — images are converted to tokens at the standard input rate based on resolution. Function calling support makes it suitable for building AI agents, structured data extraction pipelines, and any workflow requiring the model to invoke external APIs or return typed JSON. When evaluating this model for a specific workload, the most important factors are: context window (does your input fit?), output price (how long are your generations?), and latency (is this interactive or batch?). The pricing table above shows how gemma-4-31b compares to similar models across these dimensions.

gemma-4-31b sits in the efficient tier — optimized for speed and cost while maintaining solid quality, ideal for high-volume or latency-sensitive workloads. As an open-weights model, gemma-4-31b can be self-hosted on GPU compute (see the GPU rental comparison on this site) to eliminate per-token API costs entirely — the break-even point versus API pricing depends on your volume and the GPU hourly rate. When comparing gemma-4-31b to alternatives, use the similar models section on this page to find models at comparable price points with different capability tradeoffs. The intelligence score (76/100) reflects aggregate benchmark performance — a useful proxy for general capability, though real-world performance varies significantly by task type. Always test with your specific prompts and use case before committing to a model for production.

gemma-4-31b Intelligence Score
76/100
76

Composite quality score based on reasoning, coding, and instruction-following benchmarks.

gemma-4-31b Pricing vs Efficient Tier
CheapestThis modelMost expensive
$0.030$0.140$1.50

Input price vs 217 efficient models tracked. Avg: $0.321/1M.

gemma-4-31b Capabilities
Vision / Images✓
Function Calling✓
Streaming✓
Prompt Caching✗
Reasoning / CoT✗
Open Weights✓
Computer Use✗
Web Search✗
gemma-4-31b Full Specifications
Model IDgemma-4-31b
ProviderGoogle
Model FamilyGemma 4
TierEfficient
Context Window256,000 tokens (256K)
Max Output Tokens8,192 tokens
Input Price$0.14 / 1M tokens
Output Price$0.4 / 1M tokens
Cached Input PriceNot available
Throughput180 tokens/sec
Latency (P50)280ms
Intelligence Score76/100
LiveBench Score—
Cost per Task (LiveBench)—
Data Confidence—
HLE Score—
GPQA Diamond—
SWE-bench Score—
OSWorld Score—
BrowseComp Score—
Terminal-Bench Score—
AutoBench Score—
Parameters31B
Vision SupportYes
Function CallingYes
StreamingYes
Reasoning ModelNo
Open WeightsYes
Data SourceStatic (verified)
Last Updated2026-07-01

Similar Models by Intelligence Score

gemma-4-31b Frequently Asked Questions