# Google: Gemma 4 31B It

Google's Gemma 4 31B is a dense open-weight model of 30.7B parameters, the largest in the Gemma 4 family. Licensed under Apache 2.0, it reads text and images, writes text, supports tool use for agents, and can think before answering.

- **Model id:** `opencheap/gemma-4-31b`
- **Price per 1M tokens:** $0.012 input / $0.036 output
- **Cached input:** $0.0063 per 1M tokens
- **Context:** 262K tokens, 235K max output

## Providers

21 providers. Prices are per 1M tokens. As of 2026-12-04 11:57 UTC.

| Provider | Input price | Cache price | Output price | Latency | Speed | Uptime | Context | Max output |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Surplus · quantization unknown | $0.012 | $0.0063 | $0.036 | 0.59 s | 171 tok/s | 100 % | 256K | 128K |
| Qubax · quantization unknown | $0.032 | $0.013 | $0.11 | 2.06 s | 97 tok/s | 100 % | 256K | 128K |
| Hugging Face · coreweave · fp4 | $0.10 | $0.10* | $0.34 | 1.87 s | 55 tok/s | 100 % | 262K | — |
| CoreWeave · fp4 | $0.10 | $0.10 | $0.36 | 0.47 s | 83 tok/s | 99.9 % | 262K | 235K |
| KT · quantization unknown | $0.10 | $0.10 | $0.36 | 0.64 s | 131 tok/s | 99.7 % | 262K | 235K |
| NanoGPT · quantization unknown | $0.11 | $0.05 | $0.33 | 1.24 s | 87 tok/s | 100 % (success rate) | 262K | 131K |
| Venice · fp4 | $0.13 | $0.052 | $0.38 | 0.62 s | 49 tok/s | 100 % | 256K | 16K |
| Chutes · fp4 | $0.13 | $0.013 | $0.39 | 2.97 s | 24 tok/s | 100 % | 131K | 65K |
| NextBit · fp4 | $0.13 | $0.079 | $0.36 | 0.49 s | 92 tok/s | 100 % | 262K | 235K |
| DeepInfra · Route 1 · fp4 | $0.14 | $0.079 | $0.54 | 0.41 s | 64 tok/s | 100 % | 262K | 16K |
| DeepInfra · Route 2 · fp8 | $0.17 | $0.17* | $0.34 | 1.47 s | 26 tok/s | 99.9 % | 262K | 235K |
| DeepInfra · Route 3 · fp8 | $0.21 | $0.21* | $0.42 | 0.65 s | 25 tok/s | 99.7 % | 262K | 16K |
| DeepInfra · Route 4 · fp8 | $0.32 | $0.32* | $0.63 | 0.52 s | 23 tok/s | 99.7 % | 262K | 235K |
| Crusoe · quantization unknown | $0.15 | $0.15 | $0.42 | 0.51 s | 73 tok/s | 100 % | 259K | 233K |
| Friendli · quantization unknown | $0.15 | $0.15* | $0.42 | 0.35 s | 97 tok/s | 100 % | 262K | 8.1K |
| Parasail · fp8 | $0.16 | $0.063 | $0.42 | 0.69 s | 45 tok/s | 100 % | 262K | 235K |
| Greenference · quantization unknown | $0.18 | $0.07 | $0.51 | — | — | 0 % (success rate) | 131K | 8.1K |
| AiHubMix · quantization unknown | $0.20 | $0.20* | $0.40 | 0.98 s | 47 tok/s | 100 % (success rate) | 262K | 131K |
| PrimeIntellect · fp8 | $0.21 | $0.10 | $0.35 | 0.42 s | 62 tok/s | 96.4 % | 262K | 16K |
| Infercom SCS · quantization unknown | $0.21 | $0.21* | $0.37 | 1.45 s | 598 tok/s | 100 % (success rate) | 131K | 131K |
| Modal · quantization unknown | $0.36 | $0.10 | $0.10 | 0.26 s | 185 tok/s | 99.9 % | 131K | 117K |
| SambaNova · quantization unknown | $0.40 | $0.40* | $1.21 | 1.49 s | 55 tok/s | 77.4 % | 131K | 117K |
| OpenInference · bf16 | $0.10 | $0.10 | $0.36 | — | — | Unavailable | 65K | 65K |
| SiliconFlow · fp8 | $0.79 | $0.26 | $1.05 | — | — | Unavailable | 262K | 235K |

\* No cache discount from this provider: cached tokens cost the input price.

A request picks by price (`:floor`) or by speed (`provider.sort`, `:nitro`), or sets a floor on tokens per second. [How routing works](https://docs.opencheap.si/speed)

### Supported parameters

The parameters each provider supports on this model, from its published list and our own tests of whether answers show the parameter taking effect. A test is a snapshot, not a guarantee; `provider.require_parameters` sends a request only to providers that support every parameter it sets. [Required parameters](https://docs.opencheap.si/speed#require-parameters)

- **Surplus:** `temperature`, `top_p`, `seed`, `logit_bias`, `presence_penalty`, `response_format`, `structured_outputs`, `tools`, `tool_choice` (stop not confirmed)
- **Qubax:** `temperature`, `top_p`, `logit_bias`, `presence_penalty`, `response_format`, `structured_outputs`, `tools`, `tool_choice` (stop not confirmed)
- **Hugging Face · coreweave:** `temperature`, `top_p`, `top_k`, `seed`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`
- **CoreWeave:** `temperature`, `top_p`, `top_k`, `seed`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **KT:** `temperature`, `top_p`, `top_k`, `repetition_penalty`, `frequency_penalty`, `presence_penalty`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning` (stop not confirmed)
- **NanoGPT:** `temperature`, `top_p`, `top_k`, `seed`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Venice:** `temperature`, `top_p`, `top_k`, `presence_penalty`, `stop`, `response_format`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Chutes:** `temperature`, `top_p`, `top_k`, `seed`, `repetition_penalty`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **NextBit:** `temperature`, `top_p`, `seed`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **DeepInfra · Route 1 · fp4:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **DeepInfra · Route 2 · fp8:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `reasoning`, `include_reasoning` (tools not confirmed)
- **DeepInfra · Route 3 · fp8:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **DeepInfra · Route 4 · fp8:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `reasoning`, `include_reasoning` (tools not confirmed)
- **Crusoe:** `temperature`, `top_p`, `top_k`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Friendli:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `repetition_penalty`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Parasail:** `temperature`, `top_p`, `top_k`, `seed`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Greenference:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `repetition_penalty`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `tools`, `tool_choice`
- **AiHubMix:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`
- **PrimeIntellect:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Infercom SCS:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `repetition_penalty`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Modal:** `temperature`, `top_p`, `top_k`, `stop`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **SambaNova:** `temperature`, `top_p`, `top_k`, `stop`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **OpenInference:** `temperature`, `top_p`, `seed`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **SiliconFlow:** `temperature`, `top_p`, `top_k`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning` (stop not confirmed)

## Price history

Each provider's price over the last 24 hours, 7 days and 30 days is charted on [the page](https://opencheap.si/models/gemma-4-31b#price-history).

## API

Point the OpenAI SDK at OpenCheap and pass the model id `opencheap/gemma-4-31b`; the rest of your code stays the same.

```bash
curl https://api.opencheap.si/v1/chat/completions \
  -H "Authorization: Bearer $OPENCHEAP_API_KEY" -H "Content-Type: application/json" \
  -d '{ "model": "opencheap/gemma-4-31b", "messages": [{ "role": "user", "content": "Hi" }] }'
```

```python
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.opencheap.si/v1", api_key=os.environ["OPENCHEAP_API_KEY"])
r = client.chat.completions.create(model="opencheap/gemma-4-31b",
    messages=[{"role": "user", "content": "Hi"}])
print(r.choices[0].message.content)
```

```javascript
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.opencheap.si/v1", apiKey: process.env.OPENCHEAP_API_KEY });
const r = await client.chat.completions.create({ model: "opencheap/gemma-4-31b",
  messages: [{ role: "user", content: "Hi" }] });
console.log(r.choices[0].message.content);
```

## About Gemma 4 31B It

Gemma 4 31B It costs from $0.012 per 1M input tokens and $0.036 per 1M output tokens on OpenCheap, with cached input at $0.0063 per 1M tokens. Its list price is $0.20 per 1M input tokens and $0.40 per 1M output tokens, so on a typical 1 : 3 input-to-output mix it costs 91 % less here. At that price, a request with 10,000 input tokens and 1,000 output tokens costs about $0.00016, and 1,000 such requests about $0.16. It can also be called free as gemma-4-31b:free (10 requests a minute and 200 a day per key). Prices as of 2026-12-04 11:48 UTC.

21 providers serve Gemma 4 31B It on OpenCheap. Each request goes to the cheapest healthy provider of the model, and every answer reports what it cost in `usage.cost`. Its context window is 262K tokens (262,144), room for roughly 200,000 words of English in one request.

Gemma 4 31B It is one of [102 Google models](https://opencheap.si/models/lab/google) on OpenCheap. Every model on OpenCheap is called with one key at the same OpenAI-compatible endpoint, `https://api.opencheap.si/v1`.

## Pricing questions

### How much does the Gemma 4 31B It API cost per 1M tokens?

Gemma 4 31B It costs from $0.012 per 1M input tokens and $0.036 per 1M output tokens on OpenCheap, with cached input at $0.0063 per 1M tokens. Prices as of 2026-12-04 11:48 UTC.

### What does one Gemma 4 31B It request cost?

A request with 10,000 input tokens and 1,000 output tokens costs about $0.00016, and 1,000 such requests about $0.16. Every answer reports its own cost in usage.cost.

### Is Gemma 4 31B It cheaper on OpenCheap than its list price?

Its list price is $0.20 per 1M input tokens and $0.40 per 1M output tokens, so on a typical 1 : 3 input-to-output mix it costs 91 % less here.

### Is there a free version of Gemma 4 31B It?

Yes. It can be called free as gemma-4-31b:free (10 requests a minute and 200 a day per key).

### Which providers serve Gemma 4 31B It?

21 providers serve Gemma 4 31B It on OpenCheap. Each request goes to the cheapest healthy provider of the model; the table on this page lists every provider with its price, speed and uptime.

### What is the context window of Gemma 4 31B It?

Its context window is 262K tokens (262,144), room for roughly 200,000 words of English in one request.

### How do I call the Gemma 4 31B It API?

Point the OpenAI SDK at https://api.opencheap.si/v1 and pass the model id opencheap/gemma-4-31b. One OpenCheap key works for every model; the rest of your code stays the same.

## More from Google

- [Gemma 4 31B It (free)](https://opencheap.si/models/gemma-4-31b:free) (`gemma-4-31b:free`): Free · 262K context
- [Gemma 4 31B Thinking](https://opencheap.si/models/gemma-4-31b:thinking) (`gemma-4-31b:thinking`): $0.10 / $0.34 per 1M · 262K context
- [Gemma 4 26B A4B It](https://opencheap.si/models/gemma-4-26b-a4b) (`gemma-4-26b-a4b`): $0.01 / $0.03 per 1M · 262K context
- [google/gemma-3-27b-it](https://opencheap.si/models/gemma-3-27b) (`gemma-3-27b`): $0.02 / $0.05 per 1M · 131K context
- [Gemini 3.5 Flash](https://opencheap.si/models/gemini-3.5-flash) (`gemini-3.5-flash`): $1.50 / $9.00 per 1M · 1M context
- [DiffusionGemma](https://opencheap.si/models/diffusiongemma) (`diffusiongemma`): $0.05 / $0.15 per 1M · 262K context
- [Nano Banana (Gemini 2.5 Flash Image)](https://opencheap.si/models/gemini-2.5-flash-image) (`gemini-2.5-flash-image`): $0.32 / $2.63 per 1M · 32K context
- [Gemini 2.5 Flash Lite](https://opencheap.si/models/gemini-2.5-flash-lite) (`gemini-2.5-flash-lite`): $0.10 / $0.40 per 1M · 1M context

[All 102 Google models](https://opencheap.si/models/lab/google)

## Similar models

- [Qwen3.6 27B](https://opencheap.si/models/qwen3.6-27b): Qwen · 262K context · $0.0053 / $0.053 per 1M · [Compare with Gemma 4 31B It](https://opencheap.si/compare/gemma-4-31b-vs-qwen3.6-27b)
- [gpt-oss-120b](https://opencheap.si/models/gpt-oss-120b): OpenAI · 131K context · $0.0049 / $0.021 per 1M, 43 % cheaper · [Compare with Gemma 4 31B It](https://opencheap.si/compare/gemma-4-31b-vs-gpt-oss-120b)
- [Nvidia Nemotron 3 Super 120B A12B](https://opencheap.si/models/nemotron-3-super-120b-a12b): NVIDIA · 1M context · $0.0076 / $0.041 per 1M · [Compare with Gemma 4 31B It](https://opencheap.si/compare/gemma-4-31b-vs-nemotron-3-super-120b-a12b)
- [Kimi K2.5](https://opencheap.si/models/kimi-k2.5): Moonshot · 262K context · $0.017 / $0.083 per 1M · [Compare with Gemma 4 31B It](https://opencheap.si/compare/gemma-4-31b-vs-kimi-k2.5)
- [GLM 5.3](https://opencheap.si/models/glm-5.3): Zhipu · 1M context · $0.12 / $0.037 per 1M · [Compare with Gemma 4 31B It](https://opencheap.si/compare/gemma-4-31b-vs-glm-5.3)
- [mistral-nemo](https://opencheap.si/models/mistral-nemo): Mistral · 131K context · $0.018 / $0.024 per 1M, 25 % cheaper · [Compare with Gemma 4 31B It](https://opencheap.si/compare/gemma-4-31b-vs-mistral-nemo)

### Comparisons

- [Gemma 4 31B It vs Qwen3.6 27B](https://opencheap.si/compare/gemma-4-31b-vs-qwen3.6-27b)
- [Gemma 4 31B It vs google/gemma-3-27b-it](https://opencheap.si/compare/gemma-4-31b-vs-gemma-3-27b)

[Compare Gemma 4 31B It with any model](https://opencheap.si/compare)

---

Source: https://opencheap.si/models/gemma-4-31b · All models: https://opencheap.si/models · Prices as JSON: https://api.opencheap.si/v1/prices · Index for agents: https://opencheap.si/llms.txt
