Gemma 4 31B
The largest dense model in Google's Gemma 4 family at 30.7B parameters, tuned for consumer GPUs. Apache 2.0 license.
- Params
- 30.7B
- Context
- 256K tokens
- Cutoff
- Released
- License
- Apache 2.0
Hosted API price
Cheapest via Geodd · per 1M tokens
- Input
- $0.13 /1M
- Output
- $0.37 /1M
- Hosted by
-
6 providers
Hosted API pricing
How we price
Order
Providers are listed cheapest input rate first, then by output rate, a tie going to the creator's own listing. A provider that lists the model without a published rate sits at the end.
Prices
Base-tier, on-demand rates in USD per 1M tokens, converted at ECB reference rates where a provider publishes in another currency. Cached-input and batch rates show only where a provider publishes them. "Cheapest" marks the one provider with the lowest input and output pair; a tie wears no badge.
Cost
Input rate times the input tokens plus output rate times the output tokens, at the monthly volume set above the table. Cached-input, batch, long-context and reasoning-token billing are not modelled.
Transparency and funding
- Affiliates: Affiliate links are marked. We may earn a commission if you click them, but commissions never affect the order.
Every provider serving Gemma 4 31B, cheapest input first. Set your monthly volume to see what each would bill.
| Provider | Input /1M | Output /1M | Cached input /1M | Cost at 10M in + 2M out | Link |
|---|---|---|---|---|---|
|
|
$0.13 | $0.37 | $2.04 | Visit website | |
|
|
$0.14 | $0.40 | $2.20 | Visit website | |
|
|
$0.18 | $0.50 | $0.036 | $2.80 | Visit website |
|
|
$0.39 | $0.97 | $5.84 | Visit website | |
|
|
$0.50 | $0.50 | $6.00 | Visit website | |
|
|
Open weights, no hosted price | Visit website | |||
Heads up: Base-tier, on-demand rates per 1M tokens; cached, batch and long-context tiers excluded. A provider may serve a shorter context or a quantized build than the creator's release. Verify before provisioning. More on how we price.
Estimated cost to self-host
Gemma 4 31B needs about 24 GB of GPU memory at 4-bit with 32K context. The cheapest rental that fits is 4× GTX 1070 at about $144 a month.
That costs the same as roughly 847M tokens a month on Geodd's API. Self-hosting is more expensive below that volume.
| Precision | Memory | Cheapest fit (32K context) | Cost /mo | Break-even vs API |
|---|---|---|---|---|
| 4-bit INT4 / FP4 | 24 GB |
|
$144 | 847M tokens /mo |
| 8-bit FP8 / INT8 | 38 GB |
|
$202 | 1B tokens /mo |
| 16-bit FP16 / BF16 | 69 GB |
|
$403 | 2B tokens /mo |
Estimates based on median on-demand rates for Nvidia GPUs. Memory is weights plus KV cache for one request, using FP8 KV cache where supported and FP16/BF16 otherwise. Break-even assumes a 5:1 input-to-output ratio. No guarantee of runtime support, usable performance, or that a matching quantized build exists. Pricing methodology.
Similarly priced models
The models nearest Gemma 4 31B by blended rate, each at its own cheapest provider.
| Model | Blended /1M | Input /1M | Output /1M | Context | Cutoff | vs Gemma 4 31B |
|---|---|---|---|---|---|---|
|
|
$0.15 | $0.10 | $0.40 | 1M | −12% | |
|
|
$0.1535 | $0.049 | $0.676 | 128K | Dec 2023 | −10% |
|
|
$0.1583 | $0.09 | $0.50 | 1M | Jun 2025 | −7% |
|
|
$0.1633 | $0.14 | $0.28 | 1M | −4% | |
|
|
$0.1667 | $0.10 | $0.50 | 1M | May 2026 | −2% |
|
|
$0.17 | $0.13 | $0.37 | 256K | Jan 2025 | |
|
|
$0.1717 | $0.09 | $0.58 | 262K | +1% | |
|
|
$0.175 | $0.13 | $0.40 | 128K | Dec 2023 | +3% |
|
|
$0.1863 | $0.086 | $0.688 | 262K | +10% | |
|
|
$0.198 | $0.132 | $0.528 | 262K | +16% | |
|
|
$0.20 | $0.20 | $0.20 | 256K | +18% |
USD per 1M tokens at each model's cheapest listed provider. Blended is the cost of 10M input plus 2M output tokens, spread over the 12M.
Capabilities
What Gemma 4 31B accepts and can do, as published by Google Cloud.
- Text Accepts and generates natural-language text.
- Image Accepts images as input alongside text.
- Reasoning Thinks before it answers, always on or as a switchable mode.
- Function calling Connect to external tools, APIs, and systems.
- Structured output Return responses in structured formats like JSON.
Common questions
What is Gemma 4 31B good for?
Self-hosted text and image work at the heavy end of the Gemma 4 dense models. Apache 2.0 weights, tuned to fit a single consumer GPU.
When is Gemma 4 31B not a good fit?
Audio or video input, and hosted tools like web search or code execution. It is the heaviest Gemma 4 model to serve, and no maximum output is published.
What is the cheapest way to run Gemma 4 31B?
Can I self-host Gemma 4 31B?
Yes. The weights are Apache 2.0 licensed. At 4-bit it needs about 24 GB of GPU memory, which starts at roughly $144 a month on the cheapest rental that fits.
More from Google Cloud
-
Gemini 2.5 Flash-Lite
1M context · cutoff Jan 2025
From $0.10 / $0.40 /1M in / out at the cheapest provider -
Gemma 4 26B A4B
Open weights
256K context · cutoff Jan 2025
From $0.10 / $0.30 /1M in / out at the cheapest provider -
Gemma 3 27B Instruct
Open weights
128K context · cutoff Aug 2024
From $0.10 / $0.30 /1M in / out at the cheapest provider -
Gemini 3.1 Flash-Lite
1M context · cutoff Jan 2025
From $0.25 / $1.50 /1M in / out at the cheapest provider -
Gemma 3 12B Instruct
Open weights
128K context · cutoff Aug 2024
From $0.05 / $0.10 /1M in / out at the cheapest provider -
Gemini 3.5 Flash-Lite
1M context · cutoff Mar 2026
From $0.30 / $2.50 /1M in / out at the cheapest provider -
Gemini 2.5 Flash
1M context · cutoff Jan 2025
From $0.30 / $2.50 /1M in / out at the cheapest provider -
Gemini 3 Flash Preview
1M context · cutoff Jan 2025
From $0.50 / $3.00 /1M in / out at the cheapest provider