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

# Reasoning models.

> Many models in the catalog think before they answer. Reasoning is hidden unless you ask for it — here is how to ask, in each dialect, and what changes about budgeting when you do.

## Reasoning is off-surface by default

Every chat endpoint hides the model's chain-of-thought unless the request explicitly opted
in. That default is deliberate: an unsolicited thinking block breaks strict clients — Claude
Code with thinking disabled, for one — and a client that never asked for reasoning should
never have to parse it.

**Nothing changes about the model's behavior.** Reasoning models still reason. The flag
controls whether those tokens are surfaced to you, not whether they are produced.

## Asking for it

Each dialect has its own opt-in, and each returns the reasoning in that dialect's native
shape.

<CodeGroup>
  ```json Anthropic (/v1/messages) theme={null}
  {
    "model": "lx1-kimi-k2-thinking",
    "max_tokens": 2048,
    "thinking": { "type": "enabled" },
    "messages": [{ "role": "user", "content": "Prove it, step by step." }]
  }
  ```

  ```json OpenAI Chat (/v1/chat/completions) theme={null}
  {
    "model": "lx1-kimi-k2-thinking",
    "reasoning_effort": "medium",
    "messages": [{ "role": "user", "content": "Prove it, step by step." }]
  }
  ```

  ```json OpenAI Responses (/v1/responses) theme={null}
  {
    "model": "lx1-kimi-k2-thinking",
    "reasoning": { "effort": "medium" },
    "input": "Prove it, step by step."
  }
  ```
</CodeGroup>

| Dialect          | Opt-in field                                               | Where the reasoning comes back                       |
| ---------------- | ---------------------------------------------------------- | ---------------------------------------------------- |
| Messages         | `thinking: { "type": "enabled" }`                          | A `thinking` content block, before the `text` block. |
| Chat Completions | `reasoning_effort`                                         | `choices[].message.reasoning_content`.               |
| Responses        | `reasoning` (any value; `reasoning.effort` sets the level) | A reasoning output item.                             |

<Note>
  `reasoning_content` is the DeepSeek/GLM/OSS convention rather than anything OpenAI
  publishes, because OpenAI's own API does not return chain-of-thought at all. Read it
  defensively — treat a missing field as "no reasoning", never as an error.
</Note>

## Which models reason

Check the catalog rather than assuming: `capabilities.reasoning` on each
[`GET /v1/models`](/api/models-endpoint) entry, and the **Reasoning** capability tag on the
[Models](/models) page. It is a large slice of the catalog and it is not confined to one
tier — several workhorse models reason, and some frontier models do not surface it.

Asking a non-reasoning model to think is not an error. The opt-in is honored where it can
be; where the model has no reasoning mode, you get an ordinary answer and no reasoning
field.

## Budget for it

This is the part that surprises people:

* **Hidden reasoning still costs output tokens.** It is generated, so it is billed and it
  draws from your plan's included usage exactly like visible output.
* **It counts against `max_tokens`.** On a reasoning model, a tight output ceiling can be
  consumed entirely by thinking, leaving a truncated or empty answer with
  `finish_reason: "length"`. Budget generously — a ceiling that is comfortable on a
  non-reasoning model is often too small here.
* **`reasoning_effort` is a dial, not a switch.** Higher effort means more reasoning tokens
  and a slower, more expensive turn. Start at the low end and raise it only where the
  answers justify it.

```json title="A ceiling that leaves room to think" theme={null}
{
  "model": "lx1-kimi-k2-thinking",
  "max_tokens": 4096,
  "thinking": { "type": "enabled" },
  "messages": [{ "role": "user", "content": "..." }]
}
```

## Streaming

Reasoning streams like any other content. On the Messages dialect it arrives as a
`thinking` content block that opens, deltas, and closes before the text block starts — so a
UI can show "thinking…" and then swap to the answer. See [Streaming](/guides/streaming).

## Reasoning and caching

Reasoning output is not reusable context: it is regenerated each turn and is not what
prompt caching discounts. The savings on an agent loop come from the stable prefix — system
prompt, tool definitions, conversation history — which is unaffected by whether reasoning
is on. See [Prompt caching](/guides/prompt-caching).
