> ## 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, 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 accepts `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. The gateway translates the value for the model and serving route: a supported effort level, a reasoning-token budget, or an on/off control. Models without a working reasoning control may ignore it; `none` is not a universal guarantee of zero reasoning tokens.

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.

<Accordion title="Use the Responses API">
  Send `reasoning.effort` and `max_output_tokens` instead. Responses forwards effort on OpenAI-shaped backends; it does not provide the same cross-provider translation as Chat Completions:

  ```json theme={null}
  {
    "model": "openai/gpt-5-mini",
    "input": "Compare two ways to deduplicate events in a queue.",
    "reasoning": {"effort": "medium"},
    "max_output_tokens": 2048
  }
  ```

  `reasoning.summary` accepts `auto`, `concise`, or `detailed` and is forwarded to backends that support it. It does not guarantee a summary in the gateway response. `reasoning.context` is accepted for client compatibility but has no effect. Responses remains stateless; send conversation history in `input`.
</Accordion>

<Accordion title="Read usage and preserve tool context">
  When reported by the backend, Chat Completions includes `usage.completion_tokens_details.reasoning_tokens`. It is a **subset** of `completion_tokens`; do not add it again when calculating usage.

  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](/docs/tool-calling#gemini-thought-signatures).
</Accordion>
