Gemma 4 31B
Description
Google's Gemma 4 31B instruction-tuned model for heavier reasoning, coding, agentic workflows, and long-context multimodal understanding.
At a Glance
Key pricing and model details available for this model.
Input price
$0.11
per 1M tokens
Output price
$0.33
per 1M tokens
Context window
262K
tokens
Hallucination rate
0%
Token Pricing
Token pricing normalized to per-million-token rates.
Service tier
Set service_tier in your API request to choose throughput and pricing.
Input / 1M tokens
$0.11
Output / 1M tokens
$0.33
Cache Read / 1M tokens
$0.09
Token Pricing Details
Rates are shown per 1M tokens for easier comparison. Pass service_tier in your request to use the selected tier.
| Input / 1M tokens | $0.11 |
| Input unit | 1M tokens |
| Output / 1M tokens | $0.33 |
| Output unit | 1M tokens |
| Cache Read / 1M tokens | $0.09 |
| Cache Read unit | 1M tokens |
Feature Availability
Capabilities explicitly listed in the current payload.
LLM
Available
Vision
Available
Function calling
Available
Reasoning
Available
Service tiers
Available
Service Tiers
Available via the service_tier parameter.
Supported Parameters
Category Radar
Aggregated from the benchmark values present for reasoning, code, math, and accuracy.
Benchmark Breakdown
Detailed benchmark results drawn from the current payload.
GPQA
Graduate-level science questions designed to be difficult to shortcut.
85.7%
Reported score
HLE
A very hard expert-level exam across a wide range of subjects.
23.6%
Reported score
SciCode
Coding tasks drawn from real scientific workflows.
45.5%
Reported score
IFBench
Measures how precisely the model follows detailed instructions.
75.6%
Reported score
LCR
Tests long-context reasoning over large documents and conversations.
69.7%
Reported score
TerminalBench Hard
A harder coding-agent benchmark for complex multi-step terminal tasks.
36.4%
Reported score
Tau2
Evaluates realistic agent behavior in tool-using support workflows.
59.9%
Reported score
Code Samples
Quick start with the Routeway API
import OpenAI from 'openai';
const openai = new OpenAI({
baseURL: "https://api.routeway.ai/v1",
apiKey: "<YOUR_API_KEY>",
});
async function main() {
const completion = await openai.chat.completions.create({
model: "gemma-4-31b-it",
messages: [
{
role: "user",
content: "Explain quantum computing in simple terms"
}
]
});
console.log(completion.choices[0].message);
}
main();