Gemma 4 31B

Open weights model

Released April 2026

Gemma 4 31B (Reasoning) API Provider Benchmarking & Analysis

Model Comparison

Analysis of API providers for Gemma 4 31B (Reasoning) across performance metrics including latency (time to first token), output speed (output tokens per second), price and others. API providers benchmarked include CoreWeave, Modular (NVFP4), GMI (FP8), Novita, Cerebras, Google (AI Studio), Parasail, DeepInfra, SiliconFlow (FP8), SambaNova, FriendliAI, Lightning AI, and Together AI (FP8).

Fastest

#1
CerebrasCerebras
1,404.6 t/s
#2
Modular (NVFP4)Modular (NVFP4)
241.7 t/s
#3
SambaNovaSambaNova
201.4 t/s
#4
Lightning AILightning AI
150.9 t/s
#5
FriendliAIFriendliAI
138.4 t/s

Output speed

Total 13 providers

Lowest Latency

#1
CerebrasCerebras
1.76 s
#2
Modular (NVFP4)Modular (NVFP4)
7.65 s
#3
SambaNovaSambaNova
11.02 s
#4
Lightning AILightning AI
12.38 s
#5
FriendliAIFriendliAI
13.83 s

Time to first answer token

Total 13 providers

Lowest Price

#1
Google (AI Studio)Google (AI Studio)
$0.00
#2
DeepInfraDeepInfra
$0.08
#3
ParasailParasail
$0.11
#4
CoreWeaveCoreWeave
$0.12
#5
SiliconFlow (FP8)SiliconFlow (FP8)
$0.16

Blended price (per 1M tokens)

Total 13 providers

Gemma 4 31B is available through 13 API providers, each offering different performance characteristics and pricing. Below is a comparison of the key metrics across providers.

  • For output speed, the top providers are Cerebras (1,404.6 t/s), Modular (NVFP4) (241.7 t/s), and SambaNova (201.4 t/s). Speed varies significantly across providers, with a 7919% difference between the fastest and slowest.
  • For latency, Cerebras (1.76s), Modular (NVFP4) (7.65s), and SambaNova (11.02s) offer the lowest time to first answer token.
  • For pricing, Google (AI Studio) (0.00), DeepInfra (0.08), and Parasail (0.11) offer the lowest blended prices per 1M tokens.
  • Cerebras offers the best performance with both the highest speed and lowest latency. For cost optimization, Google (AI Studio) provides the most competitive pricing.

Highlights

Output tokens per second · Higher is better
Seconds · Lower is better
USD per 1M tokens (blended) · Lower is better

Update: Default performance benchmarking workload has updated to 10k input tokens to better reflect production use cases. You can still select different workloads above.

Pricing

Pricing: Cache Hit, Input, and Output

Price (USD per M Tokens) · Lower is better · 10,000 input tokens

Price per token for cached prompts (previously processed), typically offering a significant discount compared to regular input price, represented as USD per million tokens. The values shown here are the cache hit price; cache write and cache storage are billed separately and vary by provider — see "Cache pricing by provider" for detail.

Pricing: Blended Price

Blended at 7:2:1 (cache-input-output) · USD per 1M tokens (blended) · Lower is better

Price per token, shown in USD per million tokens. Price is a blend of cache hit, input, and output token prices using the selected ratio (default 7:2:1 cache-input-output).

Pricing: Cache Discount

1 - (cache hit price / input price) · Higher is better

Reduction in input token cost due to cache hit relative to input price. Formula: 1 - (Cache Hit Price per Token / Input Token Price), where cache hit price is the first-party cache hit price or the median provider cache hit price. Note that this discount figure does not account for all costs associated with cache hits, such as cache write and storage costs.

Output Speed vs. Price

Blended at 7:2:1 (cache-input-output) · Output speed: output tokens per second · USD per 1M tokens (blended)
Most attractive quadrant
Pareto line

Tokens per second received while the model is generating tokens (ie. after first chunk has been received from the API for models which support streaming).

Speed

Measured by Output Speed (tokens per second)

Output Speed: Gemma 4 31B (Reasoning)

Output speed: output tokens per second · 10,000 input tokens

Tokens per second received while the model is generating tokens (ie. after first chunk has been received from the API for models which support streaming).

Figures represent performance of the model's first-party API (e.g. OpenAI for o1) or the median across providers where a first-party API is not available (e.g. Meta's Llama models).

Latency vs. Output Speed

Latency: seconds to first token received · Output speed: output tokens per second · 10,000 input tokens
Most attractive quadrant
Pareto line

Tokens per second received while the model is generating tokens (ie. after first chunk has been received from the API for models which support streaming).

Latency

Measured by Time (seconds) to First Token

Time to First Answer Token

Seconds to first token received · Lower is better · 10,000 input tokens

Time to first answer token received, in seconds, after API request sent. For reasoning models, this includes the 'thinking' time of the model before providing an answer. For models which do not support streaming, this represents time to receive the completion.

Figures represent median (P50) measurement over the past 72 hours to reflect sustained changes in performance.

End-to-End Response Time

Seconds to output 500 tokens, calculated based on time to first token, 'thinking' time for reasoning models, and output speed

End-to-End Response Time

Seconds to output 500 tokens, including reasoning model 'thinking' time · Lower is better · 10,000 input tokens

Seconds to receive a 500 token response. Key components:

  • Input time: Time to receive the first response token
  • Thinking time (only for reasoning models): Time reasoning models spend outputting tokens to reason prior to providing an answer. Amount of tokens based on the average reasoning tokens across a diverse set of 60 prompts (methodology details).
  • Answer time: Time to generate 500 output tokens, based on output speed

Key Comparison Metrics & API Features

CoreWeave logoCoreWeave
262k
Open
--
36
1.94
64.29
48.41
Modular logoModular
262k
Open
--
242
0.46
9.72
7.18
GMI logoGMI
262k
Open
$0.04
--
--
--
--
Novita logoNovita
262k
Open
$0.04
18
7.92
135.58
99.11
Cerebras logoCerebras
131k
Open
$0.24
1,405
0.52
2.11
1.24
Google logoGoogle
262k
Open
$0.00
36
1.11
64.09
48.90
Parasail logoParasail
262k
Open
$0.02
55
1.34
42.01
31.58
DeepInfra logoDeepInfra
262k
Open
$0.01
42
1.24
53.96
40.93
SiliconFlow logoSiliconFlow
262k
Open
$0.03
57
3.61
43.01
30.60
SambaNova logoSambaNova
131k
Open
$0.10
201
2.39
13.50
8.62
FriendliAI logoFriendliAI
256k
Open
$0.04
138
1.29
17.45
12.54
Lightning AI logoLightning AI
131k
Open
$0.04
151
0.88
15.70
11.50
Together AI logoTogether AI
262k
Open
$0.10
54
1.34
43.00
32.35

Frequently Asked Questions

Common questions about Gemma 4 31B (Reasoning) providers

Gemma 4 31B (Reasoning) is available through 13 API providers: CoreWeave, Modular (NVFP4), GMI (FP8), Novita, Cerebras, Google (AI Studio), Parasail, DeepInfra, SiliconFlow (FP8), SambaNova, FriendliAI, Lightning AI, and Together AI (FP8). Each provider offers different performance characteristics and pricing.

Gemma 4 31B (Reasoning) is currently available through 13 API providers that we benchmark and track.

The fastest providers for Gemma 4 31B (Reasoning) by output speed are Cerebras (1,404.6 t/s), Modular (NVFP4) (241.7 t/s), and SambaNova (201.4 t/s). Output speed measures how quickly tokens are generated after the model starts responding.

The providers with the lowest time to first answer token for Gemma 4 31B (Reasoning) are Cerebras (1.76s), Modular (NVFP4) (7.65s), and SambaNova (11.02s). Lower latency means faster initial response time.

The most affordable providers for Gemma 4 31B (Reasoning) by blended price are Google (AI Studio) ($0.00 per 1M tokens), DeepInfra ($0.08 per 1M tokens), and Parasail ($0.11 per 1M tokens). Blended price uses a 7:2:1 cache hit/input/output token ratio.

The providers with the lowest input token pricing for Gemma 4 31B (Reasoning) are Google (AI Studio) ($0.00 per 1M input tokens), CoreWeave ($0.10 per 1M input tokens), and DeepInfra ($0.13 per 1M input tokens).

The providers with the lowest output token pricing for Gemma 4 31B (Reasoning) are Google (AI Studio) ($0.00 per 1M output tokens), CoreWeave ($0.34 per 1M output tokens), and DeepInfra ($0.38 per 1M output tokens).

Output speed for Gemma 4 31B (Reasoning) varies significantly across providers. Cerebras is the fastest at 1,404.6 t/s, which is 80.2x faster than Novita at 17.5 t/s.

12 of 13 providers support JSON mode for Gemma 4 31B (Reasoning): CoreWeave, GMI (FP8), Novita, Cerebras, Google (AI Studio), Parasail, DeepInfra, SiliconFlow (FP8), SambaNova, FriendliAI, Lightning AI, and Together AI (FP8).

All 13 providers of Gemma 4 31B (Reasoning) support function calling (tool use).

For Gemma 4 31B (Reasoning), Cerebras offers the best performance with highest speed and lowest latency. For cost optimization, Google (AI Studio) provides the most competitive pricing.

When choosing a provider for Gemma 4 31B (Reasoning), consider: output speed (for throughput-intensive tasks), latency (for interactive applications requiring quick first responses), pricing (for cost-sensitive workloads), and API features like JSON mode or function calling.

Yes, provider performance can vary over time due to infrastructure changes, load balancing, and updates. We continuously benchmark all providers and display historical performance trends in the "Over Time" charts.

For information about Gemma 4 31B (Reasoning)'s intelligence, capabilities, modalities, and how it compares to other models, see the model overview page. View model overview