Google: Gemma 4 31B

by Google

google/gemma-4-31b-it
HealthyRank #43Up 6 places on last weekOpen weights

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...

Context

262Ktokens

About 374 pages of text at once

Max output

16Ktokens

About 23 pages in one answer

Intelligence

—

No score published for this model.

Output speed

32tokens/s

A 500-word answer in about 21.6 s

From public market statistics for this model

First token

1.0s

Reasoning models start later

From public market statistics for this model

Health, 30 days

98.12%

11 of 30 days without a fault

IranRouter’s measurements

Price & cost

Every rate in Rial. A request pays only for the tokens it actually uses.

Input548,199IRR / 1M tokens
Output1,096,397IRR / 1M tokens
Reasoning tokensThe output rate1,096,397IRR / 1M tokens
Cache read274,099IRR / 1M tokens
Image input tokensThe input rate548,199IRR / 1M tokens

With prompt caching, the fixed part of your prompt is billed at the cache-read rate on later requests.

What would this model cost you a month?

Monthly cost

69.07MIRR

2.3M IRR a day, 1,151 IRR each request

30 days at today’s rate.

Rial price over 90 days

It moves with the exchange rate; the steps are the maker’s own price changes. Built at today’s margin, so approximate if the margin changed in the window.

InputOutput

Performance, 30 days

Health is measured by IranRouter itself: a day counts as healthy unless requests to this model failed on our side or it could not be served. First token and speed come from IranRouter’s traffic, and from public market statistics for this model on days without enough of it.

Daily health98.12%

Time to first token1.13 s

Output speed30 tokens/s

Place in the market

By usage across the global model market.

Daily rank#43

Share of the day’s tokens0.3%

Capabilities

Image inputYes
Audio inputNo
Tool callingYes
JSON outputYes
ReasoningYes
Web searchNo
Prompt cacheYes
Makes imagesNo
Open weightsYes
On the free planNo
Input
ImageTextVideo
Output
Text

Parameters it accepts

frequency_penaltyinclude_reasoninglogit_biaslogprobsmax_tokensmin_ppresence_penaltyreasoningrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_ktop_logprobstop_p

Other benchmarks

Coding index43
Agentic index4

Standard tests

  • GPQA DiamondScore: 82%Tasks: 1,584
  • τ-bench Verified AirlineScore: 75%Tasks: 400

Start in a minute

The official OpenAI and Anthropic SDKs; only the address and the key change.

Base URLhttps://iranrouter.com/v1
Model IDgoogle/gemma-4-31b-it
# pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://iranrouter.com/v1",
    api_key="ir-...",
)

r = client.chat.completions.create(
    model="google/gemma-4-31b-it",
    messages=[{"role": "user", "content": "Hello, introduce yourself"}],
)
print(r.choices[0].message.content)
The full guide in the docs: keys, streaming and errors

Peer models

Its family and models with a close score; the last column compares one message’s cost with this model.

No peer models found.

Technical specs

ID
google/gemma-4-31b-it
Maker
Google
Tokenizer
Gemma
Released
Apr 2, 2026
Added to IranRouter
Aug 25, 2026
Context
262,144 tokens
Max output
16,384 tokens
Weights
google/gemma-4-31B-it

Default parameters

top_k=64top_p=0.95temperature=1

Scores by Artificial Analysis, as of Oct 31, 2026

Google: Gemma 4 31BOne message about 1,640 IRRStart with this model