Skip to main content
TokenCost logoTokenCost

Gemma 4 31B

Pricing as of October 2026

$0.120/1M input · $0.360/1M output · 262K context · Google

Gemma 4 31B is listed at $0.120 per 1M input tokens and $0.360 per 1M output tokens from Google, with a 262K-token context window. A typical chat reply (1,500 tokens in, 400 out) costs $0.0003, or $3.24 per 10,000 requests. On that workload it is cheaper than 154 of the 175 other buyable models tracked here.

Count Tokens

—
Tokens
—
Input Cost
—
Output Cost

Estimate Monthly Cost

Monthly Cost Estimator

Quick:
<$0.0001/mo

Pick a preset above or enter custom usage

What Gemma 4 31B Costs Per Request

At $0.120 per 1M input and $0.360 per 1M output tokens, before caching or batch discounts.

WorkloadInput / output tokensPer requestPer 10,000 requests
Chat reply1,500 / 400$0.0003$3.24
RAG answer over retrieved docs8,000 / 600$0.0012$11.76
Coding-agent step30,000 / 2,000$0.0043$43.20

Gemma 4 31B vs Similarly Priced Models

Nearest buyable models by price, with the RAG answer above (8,000 in / 600 out) priced on each.

ModelInput /1MOutput /1MContextRAG answer
Gemma 4 31B Google$0.120$0.360262K$0.0012
Gemini 2.5 Flash-Lite Google$0.100$0.4001.0M$0.0010
GLM-4.7-FlashX Zhipu$0.070$0.400200K$0.0008
GPT-5 Nano OpenAI$0.050$0.400400K$0.0006

Alternatives to Gemma 4 31B

Pricing Details

GoogleOpen-weight (Apache 2.0). Dense 30.7B params. Native reasoning mode, vision, video. Google publishes no per-token rate for Gemma on ai.google.dev/gemini-api/docs/pricing — the weights are free and the figure here is a third-party host's rate via OpenRouter, so it can never be stamped against a Google page and moves with whoever is serving it. Flagged unverified on August 24, 2026 for the same reason the gpt-oss rows are.
Input / 1M tokens
$0.12
Output / 1M tokens
$0.36
Context Window
262K
Max Output
33K

Unverified rate. Google has not published a price for Gemma 4 31B. Treat these figures as indicative and confirm with Google before relying on them.

Price History

No price change recorded since 2026-08-11, when this site started tracking this model; it launched on 2026-04-02.

Frequently Asked Questions

Common questions about Gemma 4 31B pricing and usage

How much does Gemma 4 31B cost?
Gemma 4 31B costs $0.12 per 1 million input tokens and $0.36 per 1 million output tokens. This pricing is set by Google.
What tokenizer does Gemma 4 31B use?
Gemma 4 31B uses the cl100k_base tokenizer. This tokenizer has a vocabulary of ~100,000 tokens and is widely used across many models.
What is Gemma 4 31B's context window?
Gemma 4 31B supports a context window of 262K tokens (262,144 tokens). The maximum output length is 33K tokens.
How does Gemma 4 31B compare to other models?
On an 8,000-token-in, 600-token-out RAG answer, Gemma 4 31B costs $0.0012 per request. The nearest-priced alternatives cost: Gemini 2.5 Flash-Lite (Google) $0.0010, GLM-4.7-FlashX (Zhipu) $0.0008, GPT-5 Nano (OpenAI) $0.0006. The table above lists their full rates and context windows.
How do I count tokens for Gemma 4 31B?
Use the token counter at the top of this page or visit the homepage calculator. Paste your text and it will show the exact token count and cost for Gemma 4 31B using the cl100k_base tokenizer.

Read More About Gemma 4 31B