# Google: Gemma 4 31B It (free)

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:free`
- **Price:** Free (10 requests a minute and 200 a day per key)
- **Context:** 262K tokens

## API

Point the OpenAI SDK at OpenCheap and pass the model id `opencheap/gemma-4-31b:free`; 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:free", "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:free",
    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:free",
  messages: [{ role: "user", content: "Hi" }] });
console.log(r.choices[0].message.content);
```

## About Gemma 4 31B It (free)

Gemma 4 31B It (free) is free to call on OpenCheap (10 requests a minute and 200 a day per key). Its list price is $0.20 per 1M input tokens and $0.40 per 1M output tokens.

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 (free) 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 (free) API cost?

Gemma 4 31B It (free) is free to call on OpenCheap (10 requests a minute and 200 a day per key). Its list price is $0.20 per 1M input tokens and $0.40 per 1M output tokens.

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

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 (free) API?

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

## More from Google

- [Gemma 4 31B It](https://opencheap.si/models/gemma-4-31b) (`gemma-4-31b`): $0.012 / $0.036 per 1M · 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)

---

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