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

# Reasoning

> Ask a capable model to think before it answers, and control effort and summaries.

Reasoning is a per-model capability: check `supports_reasoning` in `GET /v1/models`. It trades tokens, cost, and latency for quality on hard problems.

## Turn It On

```json wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "model": "moonshotai/kimi-k3",
  "messages": [
    {"role": "user", "content": "A bat and a ball cost $1.10. The bat costs $1.00 more than the ball. How much is the ball?"}
  ],
  "reasoning": { "enabled": true, "effort": "medium" }
}
```

| Field | Values | Meaning |
| - | - | - |
| `enabled` | boolean | Turn reasoning on. |
| `effort` | `low`, `medium`, `high` | How hard the model thinks. Default `low`. |
| `summary` | `auto`, `concise`, `detailed` | How much thinking is summarized back. Default `auto`. |
| `max_tokens` | integer | Cap on reasoning tokens. |
| `exclude` | boolean | Reason, but omit the reasoning output from the response. |

Clients that can only set `model` can use a suffix: `z-ai/glm-5.2?reasoning_effort=high`, or `?reasoning_summary=none`. Body and suffix must agree or the request fails with `400`. See [Model ID Convention](/models/model-id-convention).

```shellscript wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl https://app.trynito.ai/v1/chat/completions \
  -H "Authorization: Bearer $NITO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "moonshotai/kimi-k3",
    "messages": [
      {"role": "user", "content": "Prove that the square root of 2 is irrational."}
    ],
    "reasoning": { "enabled": true, "effort": "high", "summary": "detailed" }
  }'
```

## Output

`choices[].message.reasoning_details` is an array of the model's thinking, each entry with `type`, `summary`, `id`, `format`, and `index`. It is a summary governed by the `summary` setting, not a verbatim transcript. `usage.reasoning_tokens` counts the tokens spent thinking, separate from `completion_tokens`.

```json wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Assume sqrt(2) = a/b in lowest terms ...",
        "reasoning_details": [
          { "type": "reasoning.summary", "summary": "Set up a proof by contradiction.", "id": "reasoning-0", "format": "text", "index": 0 }
        ]
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 18,
    "completion_tokens": 140,
    "reasoning_tokens": 320,
    "total_tokens": 478
  }
}
```

With `exclude: true`, the model still reasons and you still pay for the reasoning tokens, but `reasoning_details` is omitted. On a stream, `reasoning_details` deltas arrive ahead of the content. See [Streaming](/api/features/streaming).

## Cost

Reasoning tokens count toward usage on top of prompt and completion tokens. Higher `effort` means more of them. Cap them with `max_tokens` on the `reasoning` object, and save reasoning for problems that need it.

## Privacy

Works at Anonymous, Private, and Confidential on models that advertise `supports_reasoning`. At [Encrypted](/api/api-reference/chat-and-text/encrypted), reasoning is accepted when the route advertises visible reasoning support.

## Related

<CardGroup cols={3}>
  <Card title="Chat Completions" icon="message-captions" href="/api/features/chat-completions">
    The endpoint.
  </Card>

  <Card title="Streaming" icon="signal-stream" href="/api/features/streaming">
    Token by token.
  </Card>

  <Card title="Tool Calling" icon="screwdriver-wrench" href="/api/features/tool-calling">
    Function calls.
  </Card>

  <Card title="Privacy Levels" icon="file-lock" href="/privacy/levels">
    The four levels.
  </Card>

  <Card title="Chat Completions Endpoint" icon="message-captions" href="/api/api-reference/chat-and-text/chat-completions">
    Schema reference.
  </Card>
</CardGroup>


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