---
title: "Reasoning tokens"
description: "Set how much a model reasons, and read how many tokens it used."
---

# Reasoning tokens

Send a `reasoning` object on chat completions:

| Field | Type | Meaning |
|---|---|---|
| `effort` | string | One of the model's `reasoning.supported_efforts` in [GET /models](../api/models.md), for example `low`, `medium` or `high`. |
| `max_tokens` | integer | A token budget for reasoning, for hosts that take a budget. |
| `exclude` | boolean | `true` leaves the reasoning text out of the answer. Its tokens are still charged. |

```sh
curl https://api.plaingateway.com/api/v1/chat/completions \
  -H "Authorization: Bearer $PLAINGATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "openai/gpt-5.6-luna", "messages": [{"role": "user", "content": "Is 221 prime?"}], "reasoning": {"effort": "low"}}'
```

Reasoning tokens count as output tokens. Leave room for them in `max_tokens`, or the answer can stop with `finish_reason: "length"`.
`usage.completion_tokens_details.reasoning_tokens` counts them when the host reports it.
On `/messages`, send Anthropic's `thinking` object instead. It is translated to `reasoning.max_tokens` for a non-Anthropic host.
