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
Loading the catalog…
Markdown
Context tokens
1.05M
Input / 1M
$0.30
Output / 1M
$2.50
Context tokens
262.14K
Input / 1M
$0.20
Output / 1M
$0.40
Context windows
Listed model capacity
Gemini 2.5 Flash
1.05M
Gemma 4 31B
262.14K

Catalog specifications

Catalog checked Nov 27, 2026Shared benchmarks unavailableRead the methodology

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 tokensGemini 2.5 FlashGemma 4 31B
Uncached input$0.30$0.20
Output$2.50$0.40
Cache read$0.03Unavailable
Cache write$0.0833Unavailable

Rates are a catalog snapshot. OpenRouter Models API

Estimate your workload

Enter total token counts. The estimate uses uncached input and output rates.

Gemini 2.5 Flash$0.925
Gemma 4 31B$0.30

Gemma 4 31B costs $0.625 less at this token mix.

Model specifications

Context, output limits, modalities, and supported API parameters from the catalog.

SpecificationGemini 2.5 FlashGemma 4 31B
Catalog statusListedListed
Catalog model IDgoogle/gemini-2.5-flashgoogle/gemma-4-31b-it
ProviderGoogleGoogle
Context window1,048,576 tokens262,144 tokens
Max output65,535 tokens16,384 tokens
Input modalitiesFile, Image, Text, Audio, VideoImage, Text, Video
Output modalitiesTextText
Reasoning controlsListedListed
Tool callingListedListed
Structured outputsListedListed
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 dateJun 17, 2025Apr 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

Explore Weave Router Read Weave Router benchmark results

Sources

Each benchmark links to its own result and test method when available.

MarkdownFull methodology