impulse

Gemma 4 31B

Open weights
API id gemma-4-31b
Input / 1M
$0.99
at Cerebras
Output / 1M
$1.49
at Cerebras
Context window
131K
tokens
Max output
41K
tokens per reply
Hosts
3
4 listings
Released
-
date not published

Pricing

List prices at Cerebras, in US dollars per million tokens.

TierInput / 1MOutput / 1M
Standard$0.99$1.49

What it costs a month

At Cerebras list prices, 30 days.

  • Chat assistant5,000 requests a day, 2K in / 0.5K out$409
  • RAG over documents2,000 requests a day, 8K in / 0.6K out$529
  • Coding agent1,000 requests a day, 40K in / 2K out$1,277
  • Overnight batch20,000 requests a day, 4K in / 0.4K out$2,734
Use your own numbers

Where to run it

3 hosts serve Gemma 4 31B. The comparison is on blended price, 3 parts input to 1 part output.

HostIn / out per 1M
Mantle
google.gemma-4-31b
$0.14 / $0.40
−82% vs headline
gemma-4-31b
$0.164 / $0.469
−78% vs headline
CerebrasInference
gemma-4-31b
$0.99 / $1.49
Show 1 more listings: regions, snapshots and variants
Amazon Bedrock
us-gov-west-1 · Mantle
google.gemma-4-31b
$0.168 / $0.48
−78% vs headline

Capabilities

Core

  • Streaming
  • Function calling
  • JSON mode
  • Structured outputs

Multimodal

  • Vision
  • Image input
  • Audio
  • Image generation
  • Video

Advanced

  • Reasoning
  • Tool calling
  • MCP
  • Prompt caching
  • Batch API
  • Embeddings
Takes in
TextImages
Produces
Text
Features
Parallel tool calls
Open weights
License: Gemma License
Runtimes: Ollama, llama.cpp, vLLM

Cheaper alternatives

Current models that cost less and keep most of what this one can do: tools, vision, reasoning, structured output, caching and enough context.

Same model, cheaper host

  • Amazon Bedrock
    Mantle
    $0.14 / $0.40
    82% less
  • Kyma API
    gemma-4-31b
    $0.164 / $0.469
    78% less
  • Amazon Bedrock
    us-gov-west-1 · Mantle
    $0.168 / $0.48
    78% less

Smaller Google models

Other frontier labs

  • GPT-5.4 Nano
    OpenAI · on OpenAI
    $0.20 / $1.25
    Has every key capability
    59% less
  • Claude Haiku 5.5
    Anthropic · on Anthropic
    $0.10 / $0.50
    Has every key capability
    82% less
  • GPT-6 Luna
    OpenAI · on OpenAI
    $0.10 / $0.50
    Has every key capability
    82% less
  • GPT-4o Mini
    OpenAI · on OpenAI
    $0.15 / $0.60
    Lacks reasoning
    76% less

Open-weight picks

  • Kimi K2.7 Code
    Moonshot AI · on CLF AI Gateway
    $0.38 / $1.60
    Has every key capability
    39% less
  • Inkling Small
    Independent · on DeepInfra
    $0.45 / $1.20
    Has every key capability
    43% less
  • DeepSeek Flash
    DeepSeek · on DeepSeek
    $0.30 / $1.20
    Has every key capability
    53% less
  • Qwen3.7 Plus
    Alibaba Qwen · on Replicate
    $0.276 / $1.10
    Has every key capability
    57% less

Call it

Using Cerebras's API.

Python
from litellm import completion

response = completion(
    model="cerebras/gemma-4-31b",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Quick answers

How much does Gemma 4 31B cost?

On Cerebras, Gemma 4 31B costs $0.99 per million input tokens and $1.49 per million output tokens. The cheapest host is Amazon Bedrock (Mantle), at $0.14 per million input tokens and $0.40 per million output tokens.

Which APIs offer Gemma 4 31B?

Gemma 4 31B runs on 3 APIs: Amazon Bedrock, Kyma API and Cerebras.

What is Gemma 4 31B's context window?

131K tokens, with up to 41K tokens in one reply.

Is Gemma 4 31B being retired?

No retirement date is scheduled for it on any API we track.

What are cheaper alternatives to Gemma 4 31B?

Models that cost less and keep most of what it can do: Gemini 3.5 Flash Lite on Google AI Studio (24% less), GPT-5.4 Nano on OpenAI (59% less), Claude Haiku 5.5 on Anthropic (82% less) and Kimi K2.7 Code on CLF AI Gateway (39% less). Gemma 4 31B itself costs 82% less on Amazon Bedrock (Mantle). Savings are on a mix of 3 input tokens to 1 output token.

What is Gemma 4 31B's API model id?

Use gemma-4-31b with Cerebras. Other hosts use their own ids: google.gemma-4-31b on Amazon Bedrock.

Sources

Raw catalog entry for gemma-4-31b on Cerebras
{
  "input_cost_per_token": 9.9e-7,
  "litellm_provider": "cerebras",
  "max_input_tokens": 131072,
  "max_output_tokens": 40960,
  "mode": "chat",
  "output_cost_per_token": 0.00000149,
  "source": "https://api.cerebras.ai/public/v1/models/gemma-4-31b",
  "supports_function_calling": true,
  "supports_parallel_function_calling": true,
  "supports_reasoning": true,
  "supports_response_schema": true,
  "supports_tool_choice": true,
  "supports_vision": true
}