Reasoning
Reasoning
Reasoning models think before answering. reasoning_effort is the portable control — it is translated into each vendor's own dial, including Anthropic's thinking-token budget — and each vendor's native spelling is also accepted as sent.
| Parameter | Type | Required | Description |
|---|---|---|---|
| reasoning_effort | string | Optional | How much the model should think. One of:minimallowmediumhigh On Claude this becomes a thinking-token budget. |
| thinking | object | Optional | Anthropic's native control on Claude models: {type: "enabled"|"adaptive"|"disabled", budget_tokens}. On the Claude generations that set thinking depth with an effort level, a token budget is converted to one for you. |
import os from openai import OpenAI client = OpenAI( api_key=os.environ["OXYY_API_KEY"], base_url="https://api.oxyy.ai/v1" ) response = client.chat.completions.create( model="claude-opus-4-8", messages=[{"role": "user", "content": "Prove that sqrt(2) is irrational."}], reasoning_effort="high", # minimal | low | medium | high ) msg = response.choices[0].message print(msg.reasoning_content) # the model's thinking, when it emits any print(msg.content) print(response.usage.completion_tokens_details.reasoning_tokens)
# Anthropic-style thinking controls are accepted on Claude models. # Newer Claude generations get the budget as an effort level. curl https://api.oxyy.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $OXYY_API_KEY" \ -d '{ "model": "claude-opus-4-8", "messages": [{"role": "user", "content": "Plan a migration."}], "max_tokens": 8000, "thinking": {"type": "enabled", "budget_tokens": 4000} }'
| Field on the response | What it is |
|---|---|
message.reasoning_content | The thinking, as text, when the model emits any |
message.reasoning_details | Structured reasoning blocks. Send them back unmodified in a tool loop so signatures and encrypted reasoning survive. |
usage.completion_tokens_details.reasoning_tokens | Thinking tokens, counted inside completion_tokens and billed at the output rate |
