# Gemma 4 31B IT

Gemma 4 31B IT costs $0.14 per 1M input tokens and $0.4 per 1M output tokens on LLM API, with a 262K-token context window.

Model ID: `gemma-4-31b-it` · Google · Text generation · Released April 2, 2026
Updated: 2026-10-13
Canonical: https://llmapi.ai/models/google-gemma-4-31b-it/

- Input: $0.14 per 1M tokens
- Output: $0.4 per 1M tokens
- Context: 262K tokens
- Max output: 4K tokens

## Pricing

Served by Novita AI, the only provider.

| Price | Amount | Per |
| --- | --- | --- |
| Input | $0.14 | per 1M tokens |
| Output | $0.4 | per 1M tokens |

**Volume pricing.** At higher monthly volume, Gemma 4 31B IT may cost less. Book a call and sales will quote a price for your usage. [Book a call with sales](https://meetings.hubspot.com/julia-andriienko/llmapi) or [Create an account first](https://app.llmapi.ai/signup).

## Features

- Tools: Yes
- Parallel tool calls: No
- Image input: Yes
- Reasoning: Yes
- Prompt caching: No
- Structured outputs: Yes
- JSON mode: Yes
- Streaming: Yes
- Web search: No

## Call Gemma 4 31B IT

### Chat Completions (`POST /v1/chat/completions`)

Set LLMAPI_KEY to your LLM API key.

```python
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.llmapi.ai/v1",
    api_key=os.environ["LLMAPI_KEY"],
)

response = client.chat.completions.create(
    model="gemma-4-31b-it",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
```

Docs: [Chat Completions docs](https://docs.llmapi.ai/api/v1/chat/completions)

## More from Google

- [Gemini 4 Argon](https://llmapi.ai/models/gemini-4-argon/): $2 / $10 per 1M input / output
- [Gemini 3.8 Flash](https://llmapi.ai/models/google-gemini-3-8-flash/): $0.6375 / $3.1875 per 1M input / output
- [Gemini 3.5 Flash Lite](https://llmapi.ai/models/google-gemini-3-5-flash-lite/): $0.255 / $2.125 per 1M input / output

Prices synced 2026-11-09.

Next step: [Get API key](https://app.llmapi.ai/signup)
