Skip to content
AI Dev Toolkit.
Esc
  • Loading…

Google · Model

Gemma 4 31B API pricing, cost and context window

Gemma 4 31B costs $0.20 per million input tokens and $0.40 per million output tokens. It reads up to 262,144 tokens and writes up to 16,384 per reply. Prices checked 2026-11-28. By blended price it is number 2 of Google’s 9 current models here, counting from the cheapest.

Input / 1M
$0.20
Output / 1M
$0.40
Cached / 1M
–
Context
262,144
Max output
16,384
Released
2026-04-02

Estimate your cost with Gemma 4 31BCompare all Google modelsCount tokens for Gemma 4 31B

Pricing

How much does Gemma 4 31B cost per million tokens?

Price per 1M tokensInputOutput
Standard$0.20$0.40

Output costs 2.0× the input price; no cached-input price is published.

Work out your monthly Gemma 4 31B bill in the cost calculator

History

Has Gemma 4 31B’s price changed?

  1. Price increase, +64% blended

    Input
    from $0.09 to $0.20
    +122%
    Output
    from $0.34 to $0.40
    +18%

Gemma 4 31B has open weights, so this is the price of OpenRouter’s top-ranked host, which can move when hosts change rather than because Google changed its price. Every change across all models is in the AI pricing changes log.

Examples

How much does a typical Gemma 4 31B request cost?

WorkloadTokens in / outRequests/dayPer requestPer month
Support chatbot1,500 / 4001,000$0.00046$13.99
RAG app6,000 / 500500$0.0014$21.29
Coding agent40,000 / 2,000200$0.0088$53.53
Document summariser8,000 / 600300$0.00184$16.79

Change any number in the cost calculator.

Context

What is Gemma 4 31B’s context window and max output?

Gemma 4 31B accepts up to 262,144 tokens per request, roughly 196,608 English words or 393 pages, prompt and reply together; one reply is capped at 16,384 tokens.

Filling the whole window with one prompt costs about $0.0524 at list price.

Check whether your text fits Gemma 4 31B’s window.

Features

What can Gemma 4 31B do?

Image input
Yes
Tool / function calling
Yes
Reasoning mode
Yes
Prompt caching
No
Structured output
Yes
Open weights
Yes
Accepts
image, text, video
Knowledge cutoff
Not published

As declared by the provider’s API. It shows a feature exists, not how well it works.

API

What is the Gemma 4 31B API model ID?

OpenRouter
google/gemma-4-31b-it
Open weights
google/gemma-4-31B-it

Use the OpenRouter ID when calling it through OpenRouter; Google’s own API may name it differently. See the model ID reference for the providers we document. See how much VRAM Gemma 4 31B needs to run locally.

Google

Where does Gemma 4 31B sit in Google’s line-up?

Ranked by blended price (three parts input to one part output, $0.25 per 1M for Gemma 4 31B), it is number 2 of Google’s 9 current models here, counting from the cheapest. One step down, Gemma 4 26B A4B costs $0.1069 blended (57% less). One step up, Gemini 3.5 Flash Lite costs $0.85 (3.4× as much). Unlike Gemma 4 31B, it accepts files and audio, reads up to 1,048,576 tokens (262,144 here) and caps a reply at 65,536 tokens (16,384 here). See every Google model and price

Save

What are cheaper alternatives to Gemma 4 31B?

Keeping image input, tool calling, reasoning; by blended price.

Compare

Which models cost about the same?

FAQ

Gemma 4 31B questions

How much does Gemma 4 31B cost?

Gemma 4 31B costs $0.20 per million input tokens and $0.40 per million output tokens. A typical chatbot reply (1,500 tokens in, 400 out) costs about $0.00046. Use the LLM cost calculator for your own workload.

What is Gemma 4 31B’s context window?

262,144 tokens, about 196,608 English words or 393 printed pages, shared between your prompt and the reply. A single reply can be up to 16,384 tokens.

Does Gemma 4 31B support prompt caching and batch requests?

No cached-input price is published for it. No batch price is published for it.

What are cheaper alternatives to Gemma 4 31B?

With the same essentials (image input and tool calling), the cheapest options are Qwen3.5-9B (62% cheaper), Seed-2.0-Mini (30% cheaper), GPT-6 Luna (20% cheaper). Cheaper doesn’t mean equivalent, so test them on your own prompts.

What is the API model ID for Gemma 4 31B?

On OpenRouter it is google/gemma-4-31b-it. Google’s own API may use a different name, so check its model list before you deploy. Pass the ID as the model value in each request.

When was Gemma 4 31B released?

Gemma 4 31B was first listed on 2026-04-02. It is the first model in its line in our data. Release dates here are when our price source first listed each model.

Is Gemma 4 31B open source?

Yes, Gemma 4 31B has open weights, so you can run it yourself or choose between several hosting providers. The prices here are a typical hosted price.

Can I run Gemma 4 31B locally?

Yes, its weights are public. Gemma 4 31B needs about 21 GB of memory at Q4_K_M with an 8K context, which fits one 24 GB GPU such as the Radeon RX 7900 XTX. See the Gemma 4 31B VRAM requirements for every GPU, Mac and context length.

Prices checked · Page updated

Sources: OpenRouter models API and LiteLLM model prices and context windows, checked daily; open-weight prices are typical hosted prices. Confirm critical numbers on Google’s pricing page. Every price move is in the AI pricing changes log. See our methodology.

Keep exploring