> ## Documentation Index
> Fetch the complete documentation index at: https://docs.antarah.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Reasoning

> Control how much a model thinks before it answers, and read its reasoning.

Models with `supports_reasoning: true` think before answering. Set the effort with the field your API uses; the values a model accepts are in its `reasoning_efforts` (`GET /v1/models`).

| Endpoint | Field | Values |
| - | - | - |
| Chat Completions | `reasoning_effort` | `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, limited to the model's list |
| Responses | `reasoning.effort` | Must be in the model's list |
| Messages | `output_config.effort`, or `thinking` | `thinking: {"type": "enabled", "budget_tokens": N}` maps to an effort; `{"type": "disabled"}` means `none`. `output_config.effort` wins when both are sent |

An effort the model doesn't list gets `400 unsupported_parameter`, and the message lists the supported ones. Chat Completions also accepts `reasoning` (an object with `effort` or `max_tokens`) and `thinking` (`true` / `false`). An effort derived from a token budget is clamped to the model's list instead: the highest one not above it, else the model's lowest.

A token budget (Messages `thinking.budget_tokens`, or Chat Completions `reasoning.max_tokens`) maps to an effort like this:

| Budget | Effort |
| - | - |
| 0 (Chat Completions `reasoning.max_tokens` only; `budget_tokens` starts at 1) | `none` |
| 1–4,095 | `low` |
| 4,096–16,383 | `medium` |
| 16,384–65,535 | `high` |
| 65,536 or more | `max` |

## Reading the reasoning

| Endpoint | Where it appears |
| - | - |
| Chat Completions | `message.reasoning_content` (stream: `delta.reasoning_content`) |
| Responses | `reasoning` output items |
| Messages | `thinking` content blocks, before the text |

Send `include_reasoning: false` to strip reasoning from the output. The model still reasons, and you're still billed for it.

## Tokens and billing

Reasoning tokens are output tokens: they're billed at the output price and count toward `max_tokens`. On Chat Completions they're also reported in `usage.completion_tokens_details.reasoning_tokens`.

> [!WARNING]
>
> A small `max_tokens` can be spent entirely on reasoning, leaving the answer empty with `finish_reason: "length"` (`stop_reason: "max_tokens"`). Leave room for the answer, or lower the effort.

Long reasoning can leave a stream quiet for a while; Antara sends [keepalives](https://docs.antarah.dev/guides/streaming.md#keepalives) so the connection stays open.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.