Skip to main content
Watch: Stop Building Apps. Build Tools for AI Agents

Open-weight API pricing - last verified

Gemma 4 31B: where to run it and what it costs

6 offers from 5 providers list Gemma 4 31B at a per-token price. The lowest listed input price is $0.09 per 1M input tokens at DeepInfra (gemma-4-31B-it-turbo), with output at $0.34. No first-party API row is listed for this model. Prices are as listed on October 18, 2026; they change often and are not a benchmark.

31.3B, dense. Native context 262,144 tokens, per our local-models record (from the HF API).

Every offerQuotesRun it yourselfAll open-weight models

Offers
6
Providers
5
Lowest listed input
$0.09
First-party input
None listed

Per-token prices

Every Gemma 4 31B offer, sorted by input price

Each row is one build as the provider lists it, with its own model ID: dated snapshots, Fast and turbo builds and regional rows are never merged. Sorted by listed input price in USD per 1M input tokens; every price is in that same unit. Not stated means the provider's page does not say.
6 hosted offers for Gemma 4 31B, sorted by listed input price in USD per 1M input tokens
Provider and model IDInputUSD per 1M tokensOutputUSD per 1M tokensCached inputUSD per 1M tokensContext servedas the provider lists itQuantizationStatusSource
DeepInfragoogle/gemma-4-31B-it-turboQuotes for this row$0.09$0.34$0.05256kInferred from an unlabelled tagNot statedNot stateddeepinfra.com
Novitagoogle/gemma-4-31b-itListed as: Gemma 4 31BQuotes for this row$0.14$0.40Not stated256Kbf16Not statednovita.ai
Amazon BedrockNo API model ID on the pricing pageListed as: Gemma 4 31BQuotes for this row$0.14$0.40Not statedNot statedNot statedUS East (N. Virginia), US East (Ohio) and US West (Oregon)aws.amazon.com
DeepInfragoogle/gemma-4-31B-itQuotes for this row$0.20$0.40Not stated256kInferred from an unlabelled tagNot statedNot stateddeepinfra.com
SambaNovagemma-4-31B-itQuotes for this row$0.38$1.15Not stated128k tokensBelow native 262,144Not statedPreviewPreviewcloud.sambanova.ai
Together AINo API model ID on the pricing pageListed as: Gemma 4 31BQuotes for this row$0.39$0.97Not statedNot statedNot statedServerless Inferencetogether.ai
First-party
The model's own developer selling its API.
Peak-hour price
DeepSeek's listed price during its peak hours; off-peak is half, per its page. Alibaba's busy-hour rows work the same way.
Card shows N% off
A discount tag sits beside the price on the provider's catalog card. The number is the discounted one and may be temporary.
Inferred
Our reading, not the page's words: a name-only model match, a region taken from table order, or a context figure from an unlabelled tag.
Below native
The provider serves a shorter context than the model's native window in our local-models data.
Preview
The provider lists the model as a preview, for evaluation rather than production.

Context

Served below the native context window

Gemma 4 31B's native context is 262,144 tokens. These offers list a shorter one.

Evidence

The quote behind every value

Each value is copied from the provider's own page; one quote that backs several values shows once.

DeepInfra

gemma-4-31B-it-turbo

Model ID

“deepinfra.com/google/gemma-4-31B-it-turbo”
deepinfra.com

Variant, Input, Output, Cached input

“gemma-4-31B-it-turbo 256k $0.09 / $0.05 cached $0.34”
deepinfra.com

Context served

“gemma-4-31B-it-turbo 256k”
deepinfra.com
  • Inferred from an unlabelled tag. Context inferred from an unlabelled tag: the quoted pricing row carries "256k" with no Context label.

Not stated

  • Batch: No per-model batch price listed on the pricing page.
  • Quantization: Quantization not stated on the pages used.
  • Status: No availability tier or release-stage label stated for this offer on the pages used.

Source notes: DeepInfra does not state on this page what differs in the turbo build.

Novita

Gemma 4 31B

Model ID

“Gemma 4 31B google/gemma-4-31b-it”
novita.ai

Variant, Input, Output

“Gemma 4 31B 256K $0.14 /Mt $0.4 /Mt”
novita.ai

Context served

“Gemma 4 31B 256K $0.14”
novita.ai

Quantization

“Provider Google Quantization bf16”
novita.ai

Not stated

  • Cached input: No cached-input price listed for this model on the pricing page.
  • Batch: No per-model batch price listed; the pricing page states batch inference is at an introductory 50% discount for supported models.
  • Status: No availability tier or release-stage label stated for this offer on the pages used.

Amazon Bedrock

Gemma 4 31B

Variant, Input, Output, Status

“Google On-Demand pricing Regions: US East (N. Virginia), US East (Ohio) and US West (Oregon) Google models Price per 1M input tokens Price per 1M output tokens Gemma 4 31B $0.14 $0.40”
aws.amazon.com

Not stated

  • Model ID: No API model ID string on the pricing page.
  • Cached input: No cached-input price listed for this model on the pricing page.
  • Batch: No per-model batch price listed on the pricing page.
  • Context served: Served context length not stated on the pages used.
  • Quantization: Quantization not stated on the pages used.

Source notes: Europe (Frankfurt): $0.17 / $0.48.

DeepInfra

gemma-4-31B-it

Model ID

“$0.20 in, $0.40 out / 1M”
deepinfra.com

Variant, Input, Output

“gemma-4-31B-it 256k $0.20 $0.40”
deepinfra.com

Context served

“gemma-4-31B-it 256k”
deepinfra.com
  • Inferred from an unlabelled tag. Context inferred from an unlabelled tag: the quoted pricing row carries "256k" with no Context label.

Not stated

  • Cached input: No cached-input price listed for this model on the pricing page.
  • Batch: No per-model batch price listed on the pricing page.
  • Quantization: Quantization not stated on the pages used.
  • Status: No availability tier or release-stage label stated for this offer on the pages used.

Source notes: DeepInfra also lists gemma-4-31B-it-turbo (recorded separately) and gemma-4-31B-it-Ultra (128k, $0.27 / $0.76); variants not merged.

SambaNova

gemma-4-31B-it

Model ID, Context served

“Google gemma-4-31B-it 128k tokens Text, Image, Video”
docs.sambanova.ai

Variant, Input, Output

“gemma-4-31B-it N/A 0.38 USD 1.15 USD”
cloud.sambanova.ai

Input column, Output column

“Model Cached Input Tokens Input (per 1M tokens) Output (per 1M tokens)”
cloud.sambanova.ai

Status

“Preview models are intended for evaluation purposes and developer experimentation only”
docs.sambanova.ai
  • Below native context. Served 128k tokens; the model's native context is 262,144 tokens per HF API.

Not stated

  • Cached input: Cached input listed as N/A for this model.
  • Batch: No per-model batch price listed on the pricing page.
  • Quantization: Quantization not stated on the pages used.

Together AI

Gemma 4 31B

Variant, Input, Output

“Gemma 4 31B $0.39 $0.97”
together.ai

Status

“Serverless Inference Most teams start with serverless inference”
together.ai

Not stated

  • Model ID: No API model ID string stated on the pages used.
  • Cached input: No cached-input price listed for this model on the pricing page.
  • Batch: No per-model batch price listed on the pricing page.
  • Context served: Served context length not stated on the pages used.
  • Quantization: Quantization not stated on the pages used.

Source notes: Listed on the pricing page; not present in the serverless-models docs table, so no API string, context or quantization recorded.

Coverage

Not listed on the pages read

  • Fireworks AI: only the headline-model price table is covered; models outside it fall under size-based pricing and are not listed on the pages read.
  • Cerebras: the pay-as-you-go Developer tier lists only GPT OSS 120B and Qwen 3.8 27B; other models are Dedicated Inference by quote.
  • Cloudflare Workers AI: no Kimi K3, DeepSeek V4.1 Flash, Gemma 4 31B, MiniMax-M3 or Nemotron 3.5 rows on the pages read.
  • Google Vertex AI: Gemma 4 is listed only as Gemma 4 26B, so no Gemma 4 31B row.
  • Novita says batch inference is at an introductory 50% discount for supported models, with no per-model batch prices.
  • Together AI shows a Batch API price toggle but lists no per-model batch figures.
  • Amazon Bedrock says Flex tier and Batch pricing is at 50% discount to Standard tier pricing; per-model batch prices are listed only for gpt-oss, in the Asia Pacific (Sydney) table.

Alternatives

Run Gemma 4 31B yourself, or compare its first-party API

FAQ

How much does the Gemma 4 31B API cost?

Listed input prices run from $0.09 to $0.39 per 1M input tokens across 6 offers on October 18, 2026, and output from $0.34 to $1.15 per 1M output tokens. The lowest listed input price is at DeepInfra (gemma-4-31B-it-turbo). No first-party API row is listed.

Which providers serve Gemma 4 31B?

Together AI, DeepInfra, Novita AI, SambaNova Cloud and Amazon Bedrock. DeepInfra lists more than one build (a dated snapshot, a Fast or turbo build, or a second deployment); each is its own row on this page, under the provider's own model name.

Do all providers serve Gemma 4 31B's full context window?

Gemma 4 31B's native context is 262,144 tokens in our local-models data. Served below that: SambaNova Cloud (gemma-4-31B-it) at 128k tokens. Not stated by 2 offers.

Is there a batch price for Gemma 4 31B?

No per-model batch price for Gemma 4 31B is listed on the pages read. Novita says batch inference is at an introductory 50% discount for supported models, with no per-model batch prices. Together AI shows a Batch API price toggle but lists no per-model batch figures. Amazon Bedrock says Flex tier and Batch pricing is at 50% discount to Standard tier pricing; per-model batch prices are listed only for gpt-oss, in the Asia Pacific (Sydney) table.

Sources

Last verified from each provider's own pages (6 sites). This is a directory of listed prices and what each provider states about the model it serves, not a benchmark. Prices change often; check the provider's page before you commit. Speed figures appear only where a provider states them, labelled Vendor-stated.

Newsletter

Know when open-weight API prices move

One email per week. New model releases, price changes and where to run them, and what they mean for what you build.

Read more about Gemma 4 31B

Other open-weight models: DeepSeek V4 Pro, DeepSeek V4.1 Flash, Qwen3.8-27B, Kimi K3, GLM-5.3, MiniMax-M3, gpt-oss-120b, gpt-oss-20b, Llama 4 Maverick, Mistral Large 3, NVIDIA Nemotron 3.5 Super VL 120B-A12B.

Providers on this page: Together AI, DeepInfra, Novita AI, SambaNova Cloud, Amazon Bedrock.