AI model comparison
Gemini 2.5 Flash vs Gemma 4 31B
Compare benchmark results, pricing, and API capabilities for each model. Estimate the cost of your own token mix.
Change models
- Context tokens
- 1.05M
- Input / 1M
- $0.30
- Output / 1M
- $2.50
- Context tokens
- 262.14K
- Input / 1M
- $0.20
- Output / 1M
- $0.40
- Gemini 2.5 Flash
- 1.05M
- Gemma 4 31B
- 262.14K
The trade-offs
Start with the differences that affect how this model fits your workload.
- Token cost
- For 1 million input tokens and 250,000 output tokens, the listed rates estimate $0.925 for Gemini 2.5 Flash and $0.30 for Gemma 4 31B.
- Context window
- Gemini 2.5 Flash lists 1,048,576 tokens of context. Gemma 4 31B lists 262,144 tokens. Reserve space for the output before routing long inputs.
Benchmarks
Shared results come from the same published benchmark release. Reasoning effort and serving configuration can differ.
A shared benchmark result is unavailable for these model IDs.
Pricing and token cost
Listed OpenRouter prices in US dollars. Actual charges depend on the endpoint, tier, cache, and token mix.
| USD per million tokens | Gemini 2.5 Flash | Gemma 4 31B |
|---|---|---|
| Uncached input | $0.30 | $0.20 |
| Output | $2.50 | $0.40 |
| Cache read | $0.03 | Unavailable |
| Cache write | $0.0833 | Unavailable |
Rates are a catalog snapshot. OpenRouter Models API
Estimate your workload
Enter total token counts. The estimate uses uncached input and output rates.
Gemma 4 31B costs $0.625 less at this token mix.
Model specifications
Context, output limits, modalities, and supported API parameters from the catalog.
| Specification | Gemini 2.5 Flash | Gemma 4 31B |
|---|---|---|
| Catalog status | Listed | Listed |
| Catalog model ID | google/gemini-2.5-flash | google/gemma-4-31b-it |
| Provider | ||
| Context window | 1,048,576 tokens | 262,144 tokens |
| Max output | 65,535 tokens | 16,384 tokens |
| Input modalities | File, Image, Text, Audio, Video | Image, Text, Video |
| Output modalities | Text | Text |
| Reasoning controls | Listed | Listed |
| Tool calling | Listed | Listed |
| Structured outputs | Listed | Listed |
| Serving endpoints | /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses | /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses |
| Catalog listing date | Jun 17, 2025 | Apr 2, 2026 |
Use with Weave Router
Set a quality bar on your own coding tasks. Then compare cost per completed task and use the same harness when you change models.
Gemini 2.5 Flash
Weave Router availability is unverified for this model ID.
Gemma 4 31B
Weave Router availability is unverified for this model ID.
Catalog presence does not guarantee availability for a specific plan or account. Public Weave Router catalog · Nov 27, 2026
Sources
Each benchmark links to its own result and test method when available.
- OpenRouter Models API · token rates and catalog specifications
- Weave Router catalog · verified Router model IDs
- Gemini 2.5 Flash catalog entry
- Gemma 4 31B catalog entry
- Gemma 4 31B model repository