# Gemma 4 31B

State-of-the-art thinking model for complex reasoning in code, math, and STEM.

## Overview

- **Provider:** Google
- **Model ID:** `gemma-4-31b-it`
- **Type:** Chat
- **Canonical URL:** https://modelstack.cc/models/chat/gemma-4-31b-it
- **Version:** 4 31B
- **Best for:** Complex reasoning, coding, math, STEM, long-context analysis

## Pricing

| Usage | Price |
| --- | ---: |
| Input | $0.08 / 1M tokens |
| Output | $0.35 / 1M tokens |
| Cache read | $0.01 / 1M tokens |
| Cache write (5 minutes) | $0.08 / 1M tokens |

## Specifications

- **Context window:** 262K
- **Maximum output:** 16K
- **Released:** 2026-04

## Capabilities

- chat
- tool_use
- coding

## API usage

Use this model ID in a ModelStack API request:

```json
{
  "model": "gemma-4-31b-it"
}
```

For the rendered page, visit https://modelstack.cc/models/chat/gemma-4-31b-it.
