Gemma 4 31B

google/gemma-4-31b-it
by Google · 2026-04-02

Gemma 4 31B Instruct is Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output. Features a 256K token context window, configurable thinking/reasoning mode, native function...

p50 TTFT1.42 s
INPUT$0.13/ 1M tokens
OUTPUT$0.38/ 1M tokens
p50 TTFT1.42 s7d
p95 TTFT2.44 s7d
TRAFFIC151.7Ktokens / 7d

Google Gemma 4 31B is an instruction-tuned variant of the Gemma 4 family, developed by Google. It has approximately 31 billion parameters and is optimized for chat and instruction-following tasks.…

What exactly is Google Gemma 4 31B?

Who should use this model?

How does OrcaRouter deliver this model?

What is the significance of the GPQA Diamond score?

Code samples

Call from any SDK

OpenAI-compatible — keep the SDK you already use

  • OpenAI SDKhttps://api.orcarouter.ai/v1
from openai import OpenAI

client = OpenAI(
    base_url="https://api.orcarouter.ai/v1",
    api_key="$ORCAROUTER_API_KEY",
)

response = client.chat.completions.create(
    model="google/gemma-4-31b-it",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Pricing

Input / 1M tokens$0.130
Output / 1M tokens$0.380
Cache read / 1M$0.020
CurrencyUSD

Cost calculator

Tokens / month10MM
Input share70%%
Estimated / month $2.05 · With prompt caching $1.67

Estimate based on list price

Token & cost estimator

Input tokens: 20Cost per request: $0.000193

Estimate only — actual token counts depend on the provider's tokenizer.

Performance

p50 TTFT
1.42 s
Output speed
36.1 tok/s
p95 TTFT
2.44 s
Error rate
5.3%

Public benchmarks

61.9
AA Coding
Better than 89% of models compared
#12 of 106
59.9
AA Intelligence
Better than 84% of models compared
#18 of 110
65.9
AA Math
Better than 54% of models compared
#37 of 81
GPQA Diamond
59.9 index
Humanity's Last Exam
22.7
IFBench
75.6
Long-Context Recall
62.0
MMLU-Pro
72.9 index
SciCode
43.4
TerminalBench Hard
36.4
τ²-Bench
48.9 index
Source: artificialanalysis.ai

How it compares

Gemma 4 31BGemini 3.1 Pro PreviewGemini 3.1 Pro Preview Custom ToolsGemini 3 Flash Preview
Input $/M$0.13$2.00$4.00$0.50
Output $/M$0.38$12.00$18.00$3.00
Context1.0M1.0M1.0M
Quality10/1010/109/10
Compare side-by-sideCompare side-by-sideCompare side-by-sideCompare side-by-side

FAQ

What is the cost per token for Gemma 4 31B through OrcaRouter?
Input tokens cost $0.13 per 1 million tokens, and output tokens cost $0.38 per 1 million tokens. There is zero markup; this is the exact provider rate.
What is the context window size of Gemma 4 31B?
The context window size is not provided in the given facts. Please refer to Google's official documentation for the exact maximum token count.
What are the main strengths of Gemma 4 31B?
Based on the provided fact, it achieves a GPQA Diamond score of 85.7%, indicating strong graduate-level reasoning. It is also efficiently priced for a 31B parameter model.
How does Gemma 4 31B compare to other similar-sized models?
No direct benchmarks against other models are provided. However, its GPQA score suggests it is competitive for expert question answering. Users should test on their own tasks.
What data handling practices does OrcaRouter follow?
OrcaRouter's data handling is not detailed in the provided facts. For privacy and data retention policies, consult OrcaRouter's terms of service and privacy policy.
How can I call Gemma 4 31B using the OpenAI SDK?
Set the base URL to https://api.orcarouter.ai/v1, use your OrcaRouter API key, and specify model ID "google/gemma-4-31b-it". The SDK's chat completion method works directly.
Is there any caching or discount for repeated tokens?
No caching or volume discounts are mentioned in the provided facts. Check OrcaRouter's documentation for possible cost optimization features.
Why might I choose Gemma 4 9B over this 31B model?
If your tasks are simple and do not require the strong reasoning measured by GPQA Diamond, the 9B model is cheaper and faster. The 31B model is best for complex instruction following and expert-level questions.
Does OrcaRouter support streaming responses for this model?
Yes, OrcaRouter's OpenAI-compatible API supports streaming (set stream=True in the request). This works the same as with OpenAI models.

Embed this badge

Google: Gemma 4 31B$0.13/M in1416ms p50via OrcaRouter
HTML <a href="https://www.orcarouter.ai/models/google/gemma-4-31b-it" target="_blank"> <img src="https://www.orcarouter.ai/embed/google/gemma-4-31b-it.svg" alt="Google: Gemma 4 31B on OrcaRouter" /> </a>
Markdown [![Google: Gemma 4 31B](https://www.orcarouter.ai/embed/google/gemma-4-31b-it.svg)](https://www.orcarouter.ai/models/google/gemma-4-31b-it)

Model card as data

GET /api/public/models/google/gemma-4-31b-itOpen
Machine-readable:/llms.txt/llms-full.txt