Reasoning
Models can produce internal reasoning (step-by-step thinking) before their final answer. Reasoning improves quality on hard problems but adds latency and output tokens, so it is off by default — you get fast, direct responses unless you opt in.
The control is the same on both endpoints and for every model.
Enable or disable per request
Section titled “Enable or disable per request”Add a thinking object to the request body:
{ "model": "kimi-k2.7", "messages": [{ "role": "user", "content": "..." }], "thinking": { "type": "enabled" }}| Value | Behavior |
|---|---|
{ "type": "enabled" } | The model reasons before answering. |
{ "type": "disabled" } | No reasoning (the default). |
| omitted | No reasoning (the default). |
This works identically on POST /v1/chat/completions and POST /anthropic/v1/messages.
If you use the OpenAI standard reasoning_effort parameter (low, medium, high), it is also honored as a request to reason.
Reading reasoning back
Section titled “Reading reasoning back”OpenAI endpoint (/v1/chat/completions) — reasoning is returned in reasoning_content, and its token count in usage.completion_tokens_details.reasoning_tokens:
{ "choices": [{ "message": { "role": "assistant", "reasoning_content": "First, I need to ...", "content": "The answer is ..." } }], "usage": { "completion_tokens": 320, "completion_tokens_details": { "reasoning_tokens": 256 } }}When streaming, reasoning arrives in delta.reasoning_content before the answer arrives in delta.content.
Anthropic endpoint (/anthropic/v1/messages) — reasoning is returned as a thinking content block, before the text block:
{ "content": [ { "type": "thinking", "thinking": "First, I need to ..." }, { "type": "text", "text": "The answer is ..." } ]}max_tokens and reasoning
Section titled “max_tokens and reasoning”Reasoning tokens count toward your output budget. With reasoning enabled and a small max_tokens, the model can spend the whole budget thinking and return little or no visible answer. When you enable reasoning, set a generous max_tokens.