Google model
Gemma 4 31B API cost calculator
Gemma 4 31B costs $0.10 per 1M input tokens and $0.34 per 1M output tokens on the Google API, with a 262K-token context window. A typical request (2K input, 500 output tokens) costs $0.0004 — about $11.10/month at 1,000 requests per day. Use the calculator below to model your exact workload.
Find me a cheaper modelWhat real workloads cost on Gemma 4 31B
| Workload | Tokens (in / out) | Per request | Per 1K requests |
|---|---|---|---|
| Chatbot message | 500 / 300 | $0.0002 | $0.15 |
| RAG query with context | 4,000 / 500 | $0.0006 | $0.57 |
| Document summarization | 20,000 / 1,000 | $0.0023 | $2.34 |
| Agent coding session | 100,000 / 5,000 | $0.01 | $11.70 |
Gemma 4 31B vs other Google models
| Model | Input /1M | Output /1M | Context |
|---|---|---|---|
| Gemma 4 31B | $0.10 | $0.34 | 262K |
| Gemini 3.7 Flash | $0.38 | $1.88 | 1.0M |
| Gemini 3.6 Flash | $0.75 | $3.75 | 1.0M |
| Gemini 3.5 Flash Lite | $0.30 | $2.50 | 1.0M |
| Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image) | $0.25 | $1.50 | 66K |
Frequently asked questions
How much does Gemma 4 31B cost per 1M tokens?
According to current pricing data, Gemma 4 31B costs $0.10 per 1M input tokens and $0.34 per 1M output tokens. Processing 1M tokens each way costs $0.44.
What does a typical API request to Gemma 4 31B cost?
A typical request with 2,000 input tokens and 500 output tokens costs $0.0004. At 1,000 requests per day that is $0.37 daily, or about $11.10 per month.
What is Gemma 4 31B's context window?
Gemma 4 31B supports a 262K-token context window (262,144 tokens).
Does Gemma 4 31B support prompt caching?
Yes. Cached input tokens cost $0.10 per 1M — a 0% discount versus the standard input rate, which matters for agents and chat apps that resend the same system prompt.
What is a cheaper alternative to Gemma 4 31B?
Ling-2.6-flash from Inclusionai is currently the cheapest comparable option at $0.01 per 1M input tokens versus $0.10 for Gemma 4 31B — roughly 10x cheaper on input.
Prices may differ from Google's official pricing page for batch, tiered, or fine-tuned usage. Compare all current prices on the live model pricing dashboard, see Gemma 4 31B vs Ling-2.6-flash pricing, or run Gemma 4 31B head-to-head against other models in the side-by-side comparison playground.
Pricing data via the OpenRouter models API.