Google Cloud logo

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

USD
Input
$0.13 /1M
Output
$0.37 /1M
Hosted by
Geodd Novita DigitalOcean Together AI EcoHash 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.

Every provider serving Gemma 4 31B, with its price per 1M input and output tokens and what the volume above would cost
Provider Input /1M Output /1M Cached input /1M Cost at 10M in + 2M out Link
Geodd logo Geodd Cheapest $0.13 $0.37 $2.04 Visit website
Novita logo Novita $0.14 $0.40 $2.20 Visit website
DigitalOcean logo DigitalOcean $0.18 $0.50 $0.036 $2.80 Visit website
Together AI logo Together AI $0.39 $0.97 $5.84 Visit website
EcoHash logo EcoHash $0.50 $0.50 $6.00 Visit website
Google Cloud logo Google Cloud Creator 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.

Single node ≤ 8
What it costs to self-host Gemma 4 31B at each precision: the memory it needs, the cheapest rental that holds it, that rental's month and the API volume it pays off at
Precision Memory Cheapest fit (32K context) Cost /mo Break-even vs API
4-bit INT4 / FP4 24 GB Nvidia logo 4× GTX 1070 $144 847M tokens /mo
8-bit FP8 / INT8 38 GB Nvidia logo 4× RTX 3060 $202 1B tokens /mo
16-bit FP16 / BF16 69 GB Nvidia logo 8× RTX 3060 $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.

Models priced nearest Gemma 4 31B per 1M tokens, each at its cheapest provider
Model Blended /1M Input /1M Output /1M Context Cutoff vs Gemma 4 31B
Alibaba Cloud Qwen3.5-Flash Alibaba Cloud $0.15 $0.10 $0.40 1M −12%
Meta Llama 3.2 11B Vision Meta $0.1535 $0.049 $0.676 128K Dec 2023 −10%
Nvidia Nemotron 3 Super 120B A12B Nvidia $0.1583 $0.09 $0.50 1M Jun 2025 −7%
Xiaomi MiMo MiMo-V2.6-Flash Xiaomi MiMo $0.1633 $0.14 $0.28 1M −4%
OpenAI GPT-6 Luna OpenAI $0.1667 $0.10 $0.50 1M May 2026 −2%
Google Cloud Gemma 4 31B This model Google Cloud $0.17 $0.13 $0.37 256K Jan 2025
Alibaba Cloud Qwen3-235B-A22B Instruct (2507) Alibaba Cloud $0.1717 $0.09 $0.58 262K +1%
Meta Llama 3.3 70B Meta $0.175 $0.13 $0.40 128K Dec 2023 +3%
Alibaba Cloud Qwen3.5-27B Alibaba Cloud $0.1863 $0.086 $0.688 262K +10%
Tencent Hy3 Tencent $0.198 $0.132 $0.528 262K +16%
Mistral Ministral 3 14B Mistral $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?

Hosted, unless you push serious volume. Geodd charges $0.13 in / $0.37 out per 1M tokens. The cheapest rental that fits is 4x GTX 1070 at $144 a month, which costs the same as about 847M tokens a month on that API.

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