# Reasoning

Turn thinking down or off with reasoning_effort, and size max_tokens for thinking plus the reply.


A reasoning model thinks before it answers. Thinking tokens are output tokens: they count in `usage` and in your bill. Two settings control them.

## Set reasoning effort

On chat completions, set `reasoning_effort` to disable or tune thinking:

```json
{
  "model": "deepseek/deepseek-v4.1-flash-1017",
  "messages": [{ "role": "user", "content": "Reply with only the answer: 17 × 23" }],
  "reasoning_effort": "low"
}
```

Values: `none`, `low`, `medium`, `high`. Leave it unset for the model default. The setting survives failover to a standby.

On Responses, put the same value inside the standard object: `"reasoning": { "effort": "none" }`.

## Size max_tokens for thinking and the reply

`max_tokens` may go up to the model's [context length](https://inference.boundless.network/models). Prompt and completion share that window.

A reasoning model spends the same budget on thinking as on its reply. Size `max_tokens` for both. A budget sized for the answer alone comes back empty, with `length` as the finish reason.

On the Anthropic Messages API, `max_tokens` is required and must cover thinking plus reply. Give reasoning models 1024 or more. See [API Compatibility](https://inference.boundless.network/docs/api-compatibility#anthropic-messages-api).

## Limits and cost

Your team's [tokens-per-minute limit](https://inference.boundless.network/docs/rate-limits) is charged on what a request actually used, minus any prompt tokens served from cache. A long request is not refused for its size. It uses up the window, and the requests after it wait.

Thinking tokens appear in `usage`, so you can [recompute any charge](https://inference.boundless.network/docs/pricing). See [Streaming](https://inference.boundless.network/docs/streaming) to read them from the last chunk.
