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

# Control reasoning

> Set reasoning effort, see which levels each model supports, leave room for the final answer, and inspect reported reasoning usage.

Use reasoning effort to adjust how much work a supported model does before answering. Higher effort can increase latency and output-token cost. Omit the control to use the model's default.

```bash theme={null}
curl --fail-with-body https://api.impossibl.com/v1/chat/completions \
  -H "Authorization: Bearer $IMPOSSIBL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5-mini",
    "messages": [{"role": "user", "content": "Compare two ways to deduplicate events in a queue."}],
    "reasoning_effort": "medium",
    "max_completion_tokens": 2048
  }'
```

Chat Completions' `reasoning_effort` and the Responses API's `reasoning.effort` accept `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. `max` reaches Claude's highest level; on a model without it, the request runs at the model's highest level instead. The gateway translates the value for the model and the route serving it: an effort level, a reasoning-token budget, or an on/off switch.

Keep enough output budget for both reasoning and the visible answer. A small budget can end in `finish_reason: "length"` with little or no answer text.

## Levels a model doesn't have

Models support different levels. When you ask for one a model doesn't have, the gateway uses the nearest level it does have instead of rejecting the request:

* A missing level moves to the closest supported one. `xhigh` on a model that tops out at `high` runs at `high`.
* Ties go to the **lower** level, so a substitute never spends more than you asked for. `medium` on a model with only `low` and `high` runs at `low`.
* `none` is never the substitute. Asking for some reasoning never turns reasoning off.
* On a token-budget model, each level is a share of `max_completion_tokens` (or of the model's own reasoning ceiling when you send no limit).
* On an on/off model, every level above `none` means on.

## See what a model supports

Every text model in [`GET /v1/models`](https://impossibl.com/docs/models#discover-models-through-the-api) has a `reasoning` field, or `null` when the model has no reasoning control and ignores `reasoning_effort`:

```json theme={null}
"reasoning": {
  "kind": "effort",
  "levels": ["low", "medium", "high", "xhigh", "max"],
  "off": false,
  "default": "medium"
}
```

* `kind`: `effort` (a ladder of levels), `budget` (levels mapped to a thinking-token budget), or `toggle` (on or off only).
* `levels`: the levels that make a difference on this model. Any other level moves to one of these. Show only these in a level picker.
* `off`: whether `none` turns thinking off. When `false`, `none` moves to the lowest level or leaves the model at its default.
* `default`: the level an omitted `reasoning_effort` means, where the model's vendor documents it, otherwise `null`.

A model can be served from more than one route. The field describes what **every** route supports, so a level means the same thing if a request fails over.

The table below is generated from the same data.

| Model | Control | Levels | `none` turns it off | Omitted means |
| - | - | - | - | - |
| `openai/gpt-6-astra` | Effort levels | `low`, `medium`, `high`, `xhigh`, `max` | No | Provider default |
| `openai/gpt-6.1-sol` | Effort levels | `low`, `medium`, `high`, `xhigh` | No | Provider default |
| `openai/gpt-6.1-terra` | Effort levels | `low`, `medium`, `high`, `xhigh` | No | Provider default |
| `openai/gpt-6-sol` | Effort levels | `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `openai/gpt-6-luna` | Effort levels | `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `openai/gpt-5.6-sol` | Effort levels | `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `openai/gpt-5.6-luna` | Effort levels | `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `openai/gpt-5.6-terra` | Effort levels | `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `openai/gpt-5.5` | Effort levels | `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `openai/gpt-5.5-pro` | Effort levels | `medium`, `high`, `xhigh` | No | Provider default |
| `openai/gpt-5.4` | Effort levels | `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `openai/gpt-5.4-mini` | Effort levels | `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `openai/gpt-5.4-nano` | Effort levels | `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `openai/gpt-5.4-pro` | Effort levels | `medium`, `high`, `xhigh` | No | Provider default |
| `openai/gpt-5.3-codex` | Effort levels | `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `openai/gpt-5.1` | Effort levels | `low`, `medium`, `high` | Yes | Provider default |
| `openai/gpt-5.2` | Effort levels | `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `openai/gpt-5.2-codex` | Effort levels | `low`, `medium`, `high`, `xhigh` | No | Provider default |
| `openai/gpt-5.1-codex` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `openai/gpt-5.1-codex-mini` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `openai/gpt-5` | Effort levels | `minimal`, `low`, `medium`, `high` | No | Provider default |
| `openai/gpt-5-pro` | Effort levels | `high` | No | Provider default |
| `openai/gpt-5-codex` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `openai/gpt-5-mini` | Effort levels | `minimal`, `low`, `medium`, `high` | No | Provider default |
| `openai/gpt-5-nano` | Effort levels | `minimal`, `low`, `medium`, `high` | No | Provider default |
| `openai/o3` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `openai/gpt-oss-120b` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `openai/gpt-oss-20b` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `anthropic/claude-opus-5` | Effort levels | `low`, `medium`, `high`, `xhigh`, `max` | Yes | `high` |
| `anthropic/claude-opus-5-5` | Effort levels | `low`, `medium`, `high`, `xhigh`, `max` | No | `medium` |
| `anthropic/claude-fable-5-2` | Effort levels | `low`, `medium`, `high`, `xhigh`, `max` | No | `high` |
| `anthropic/claude-fable-5-1` | Effort levels | `low`, `medium`, `high`, `xhigh`, `max` | No | `high` |
| `anthropic/claude-fable-5` | Effort levels | `low`, `medium`, `high`, `xhigh`, `max` | No | `high` |
| `anthropic/claude-opus-4-8` | Effort levels | `low`, `medium`, `high`, `xhigh`, `max` | Yes | `high` |
| `anthropic/claude-opus-4-7` | Effort levels | `low`, `medium`, `high`, `xhigh`, `max` | Yes | `high` |
| `anthropic/claude-opus-4-6` | Token budget | `minimal`, `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `anthropic/claude-sonnet-5-5` | Effort levels | `low`, `medium`, `high`, `xhigh`, `max` | No | `high` |
| `anthropic/claude-sonnet-5` | Effort levels | `low`, `medium`, `high`, `xhigh`, `max` | Yes | `high` |
| `anthropic/claude-sonnet-4-6` | Token budget | `minimal`, `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `anthropic/claude-haiku-5-5` | Effort levels | `low`, `medium`, `high`, `xhigh`, `max` | Yes | `medium` |
| `anthropic/claude-haiku-4-5` | Token budget | `minimal`, `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `anthropic/claude-opus-4-5` | Token budget | `minimal`, `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `anthropic/claude-sonnet-4-5` | Token budget | `minimal`, `low`, `medium`, `high`, `xhigh` | Yes | Provider default |
| `google/gemini-4-carbon` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `google/gemini-4-argon` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `google/gemini-3.8-flash` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `google/gemini-3.7-flash` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `google/gemini-robotics-er-2-preview` | Effort levels | `minimal`, `low`, `medium`, `high` | No | Provider default |
| `google/gemini-3.6-flash` | Effort levels | `low`, `high` | No | Provider default |
| `google/gemini-3.5-flash` | Effort levels | `low`, `high` | No | Provider default |
| `google/gemini-3.5-flash-lite` | Effort levels | `low`, `high` | No | Provider default |
| `google/gemini-3.1-pro-preview` | Effort levels | `low`, `high` | No | Provider default |
| `google/gemini-3.1-flash-lite` | Effort levels | `low`, `high` | No | Provider default |
| `google/gemini-2.5-pro` | Token budget | `minimal`, `low`, `medium`, `high`, `xhigh` | No | Provider default |
| `google/gemini-2.5-flash` | Token budget | `minimal`, `low`, `medium`, `high`, `xhigh` | No | Provider default |
| `google/gemini-2.5-flash-lite` | Token budget | `minimal`, `low`, `medium`, `high`, `xhigh` | No | Provider default |
| `xai/grok-4.7` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `xai/grok-4.6` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `xai/grok-4.5` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `xai/grok-4.3` | Effort levels | `low`, `medium`, `high` | Yes | Provider default |
| `meta/muse-glimmer-30b` | Effort levels | `low`, `medium`, `high`, `xhigh` | No | Provider default |
| `mistral/mistral-large-4` | On/off | — | Yes | Provider default |
| `deepseek/deepseek-v4-flash-0731` | On/off | — | No | Provider default |
| `deepseek/deepseek-v4.1-flash` | Effort levels | `low`, `high`, `max` | Yes | Provider default |
| `deepseek/deepseek-v4.1-flash-1017` | Effort levels | `low`, `high`, `max` | Yes | Provider default |
| `deepseek/deepseek-v4-pro-0813` | On/off | — | No | Provider default |
| `nvidia/nemotron-3.5-lightning` | On/off | — | No | Provider default |
| `deepseek/deepseek-v4-flash` | On/off | — | No | Provider default |
| `deepseek/deepseek-v4-pro` | On/off | — | No | Provider default |
| `deepseek/deepseek-v3-2` | On/off | — | No | Provider default |
| `deepseek/deepseek-v3-2-speciale` | On/off | — | No | Provider default |
| `zai/glm-5.3` | Effort levels | `low`, `high`, `max` | No | Provider default |
| `zai/glm-5.3-fast` | Effort levels | `low`, `high`, `max` | No | Provider default |
| `zai/glm-5.3-flash` | Effort levels | `low`, `high`, `max` | No | Provider default |
| `zai/glm-5.3-flashx` | Effort levels | `low`, `high`, `max` | No | Provider default |
| `zai/glm-5.3-flashx-legal` | Effort levels | `low`, `high`, `max` | No | Provider default |
| `zai/glm-5.2` | On/off | — | No | Provider default |
| `zai/glm-5.1` | On/off | — | Yes | Provider default |
| `zai/glm-5` | On/off | — | Yes | Provider default |
| `zai/glm-5-turbo` | On/off | — | Yes | Provider default |
| `zai/glm-4.7` | On/off | — | Yes | Provider default |
| `zai/glm-4.6` | On/off | — | Yes | Provider default |
| `zai/glm-4.5` | On/off | — | Yes | Provider default |
| `zai/glm-4.5-air` | On/off | — | Yes | Provider default |
| `moonshotai/kimi-k3` | On/off | — | No | Provider default |
| `moonshotai/kimi-k3.1-pro` | Effort levels | `low`, `high`, `max` | Yes | `max` |
| `moonshotai/kimi-k3.1-pro-highspeed` | Effort levels | `low`, `high`, `max` | Yes | `max` |
| `fireworks/ember-1` | On/off | — | Yes | Provider default |
| `qwen/qwen3.7-max` | On/off | — | Yes | Provider default |
| `qwen/qwen3.7-plus` | On/off | — | No | Provider default |
| `qwen/qwen3.6-27b` | On/off | — | Yes | Provider default |
| `qwen/qwen3.6-flash` | On/off | — | Yes | Provider default |
| `qwen/qwen3.8-max` | On/off | — | Yes | Provider default |
| `qwen/qwen3.8-27b` | On/off | — | Yes | Provider default |
| `qwen/qwen3.8-2.4t-a95b` | Effort levels | `low`, `medium`, `xhigh` | No | Provider default |
| `xiaomi/mimo-v2.5` | On/off | — | Yes | Provider default |
| `minimaxai/minimax-m3.1-flash` | Effort levels | `low`, `medium`, `high`, `xhigh`, `max` | No | Provider default |
| `minimaxai/minimax-m3` | On/off | — | No | Provider default |
| `tencent/hy3` | Effort levels | `low`, `medium`, `high` | Yes | Provider default |
| `tencent/hy4` | Effort levels | `high` | Yes | Provider default |
| `tencent/hy4-preview` | Effort levels | `high` | Yes | Provider default |
| `stepfun/step-5-preview` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `stepfun/step-3.7-flash` | Effort levels | `low`, `medium`, `high` | No | Provider default |
| `meta/muse-wonder` | Effort levels | `minimal`, `low`, `medium`, `high`, `xhigh`, `max` | No | Provider default |
| `meta/muse-spark-open` | Effort levels | `minimal`, `low`, `medium`, `high`, `xhigh`, `max` | No | Provider default |
| `meta/muse-spark-1.3` | Effort levels | `minimal`, `low`, `medium`, `high`, `xhigh`, `max` | No | Provider default |
| `meta/muse-spark-1.3-contributor` | Effort levels | `minimal`, `low`, `medium`, `high`, `xhigh` | No | Provider default |
| `qwen/qwen3.8-flash` | On/off | — | Yes | Provider default |
| `qwen/qwen3.7-flash` | On/off | — | Yes | Provider default |
| `nvidia/nemotron-3-ultra-550b-a55b` | On/off | — | Yes | Provider default |
| `xiaomi/mimo-v2.6-pro` | On/off | — | Yes | Provider default |
| `xiaomi/mimo-v2.6-flash` | On/off | — | Yes | Provider default |

## See what was applied

When a Chat Completions request sets `reasoning_effort`, or a Responses request sets `reasoning.effort`, the response carries an `x-impossibl-reasoning` header saying what the serving route actually received:

```text theme={null}
x-impossibl-reasoning: requested=xhigh applied=high route=openai
```

`applied` is one of:

* the level sent, after moving down to one the model has;
* `none`, when an off switch was sent;
* `on`, for an on/off model;
* `budget:<tokens>`, for a token-budget model;
* `custom`, when your own `providerOptions` sent a value outside the levels above;
* `omitted`, when nothing reached the backend and it ran at its own default.

Your own `providerOptions` win over the translated level, and the header reports what was actually sent. For example, `reasoning_effort: "high"` with `providerOptions.openai.reasoningEffort: "low"` reports `applied=low`.

`route` names the provider that served the request. A streamed response's headers are sent before any backend answers, so on a stream the header describes the first route tried; if the request fails over, the route that finally serves it can differ.

## Leaving the field out

Without `reasoning_effort`, the model runs at its vendor's default:

* **Anthropic** documents `high` for every Claude that takes effort, except Claude Opus 5.5 and Claude Haiku 5.5, which default to `medium`.
* **OpenAI-family** models publish no default here. Measured through the gateway on 2026-10-12, an omitted level behaved close to `medium`.
* Other models use whatever their provider defaults to. Where the vendor documents it, the `default` column above says so.

## Claude

* **Thinking text.** On Chat Completions, the gateway asks Claude to return a summary of its thinking, so `reasoning_content` carries text rather than an empty string. On the Responses API it does so when you set `reasoning.summary`. To choose for yourself, send `providerOptions.anthropic.thinking` and the gateway keeps yours.
* **Output limit.** If you send no `max_completion_tokens`, Claude Opus 5, Opus 5.5, Sonnet 5, Sonnet 5.5, and Haiku 5.5 get their full 128K output limit rather than a 4,096-token default. Thinking counts toward this limit.
* **Turning thinking off.** `none` turns thinking off on Claude Opus 5, Sonnet 5, and Haiku 5.5. Claude Opus 5.5, Sonnet 5.5, Fable 5, and Fable 5.1 always think, so `none` leaves the field out rather than failing the request.

> [accordion] Use the Responses API
>
> Send `reasoning.effort` and `max_output_tokens` instead. The level is translated for every route the same way as Chat Completions' `reasoning_effort`, Claude included, and moves down to a level the model has. `max` is accepted too, and runs at the model's highest level when it has no `max`:
>
> ```json theme={null}
> {
>   "model": "openai/gpt-5-mini",
>   "input": "Compare two ways to deduplicate events in a queue.",
>   "reasoning": {"effort": "medium", "summary": "auto"},
>   "max_output_tokens": 2048
> }
> ```
>
> When the model reasons, `output` starts with a `reasoning` item, before the `message` and any `function_call` items:
>
> ```json theme={null}
> {
>   "type": "reasoning",
>   "id": "rs_...",
>   "summary": [{"type": "summary_text", "text": "The two approaches differ in where state lives..."}]
> }
> ```
>
> `summary` holds text only when you set `reasoning.summary` (`auto`, `concise`, or `detailed`); without it the item is still there, with `"summary": []`. On Claude, setting it is what asks the model for a summary of its thinking. Each reasoning block the model returned is one `summary_text` part. Some models return no reasoning text even when asked, and their item has an empty summary too. When streaming, the item arrives first, with `response.reasoning_summary_part.*` and `response.reasoning_summary_text.*` events; see [streaming](https://impossibl.com/docs/streaming.md#responses-api).
>
> The item has no `encrypted_content`. If you send a `reasoning` item back in `input`, the gateway accepts it and drops it; it is not passed to the model. `reasoning.context` is accepted for client compatibility but has no effect. Responses remains stateless; send conversation history in `input`.

> [accordion] Read usage and preserve tool context
>
> When reported by the backend, Chat Completions includes `usage.completion_tokens_details.reasoning_tokens`, and the Responses API `usage.output_tokens_details.reasoning_tokens`, on a streamed response in `response.completed` or `response.incomplete`. It is a **subset** of `completion_tokens` (`output_tokens` on Responses); do not add it again when calculating usage. OpenAI-family backends report it directly. For Claude it comes from Anthropic's own thinking-token count, which Anthropic computes by re-tokenizing the reasoning, so it can differ from the exact count by a few tokens. The field is left out, not set to zero, when a backend reports no count.
>
> Some backends return `reasoning_content` with the assistant message or streaming delta. Keep the complete assistant message when sending tool results back: reasoning content and opaque signatures can be required for the next turn. See [tool calling](https://impossibl.com/docs/tool-calling.md#gemini-thought-signatures).


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