Reasoning
Reasoning models “think” before they answer: they generate internal reasoning that is not part of the main text but is billed as output. The depth of reasoning is set by the effort level: a higher level gives more accurate answers on hard tasks, at the cost of a longer wait and a more expensive request.
To check whether a model reasons, look in GET /v1/models: its capabilities.features includes reasoning. See Models.
Chat Completions
Section titled “Chat Completions”Set the level with the reasoning_effort field.
curl https://api.waibee.com/v1/chat/completions \ -H "Authorization: Bearer $WAIBEE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-5.4-mini", "reasoning_effort": "high", "messages": [{ "role": "user", "content": "What is 17*23? Answer with a number." }] }'| Value | Meaning |
|---|---|
none | Reasoning is off |
minimal | The minimum, for simple tasks |
low | A little |
medium | A reasonable trade-off |
high | A lot, for hard tasks |
xhigh | A great deal |
max | The highest level, on models that support it |
The available levels depend on the model. The router passes the value to the model as is; some models reject a level outside their list with 400 feature_not_supported and name the levels they accept. If the field is not passed, the model’s default behavior applies.
Model levels
Section titled “Model levels”The levels a model accepts are listed in the catalog: models with reasoning in capabilities.features have a reasoning field.
efforts: the levels the model accepts, from weakest to strongest.nonein the list means reasoning can be turned off. An empty list means the model always reasons and accepts no level.default: the level to pick by default. It isnoneif the model does not reason without a level, andnullif the provider does not say.
The provider may reject a level that is not in efforts with 400. For models without reasoning and for waibee/auto, the field is null.
Clients that send a reasoning object instead of a string also work: the router takes effort from it. The object’s other fields may not be applied, so reasoning_effort is more predictable.
Messages
Section titled “Messages”On POST /v1/messages, set the level with the effort field inside output_config.
curl https://api.waibee.com/v1/messages \ -H "x-api-key: $WAIBEE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "anthropic/claude-sonnet-5", "max_tokens": 2048, "output_config": { "effort": "high" }, "messages": [{ "role": "user", "content": "What is the probability of drawing two red balls in a row without replacement from 5 red, 3 blue, and 2 white?" }] }'The reasoning arrives in a separate thinking block before the response text:
{ "type": "message", "content": [ { "type": "thinking", "thinking": "..." }, { "type": "text", "text": "..." } ]}The thinking field in the request (Anthropic’s extended thinking configuration) is also passed to the model unchanged, but on newer Claude models output_config.effort is preferred.
Responses
Section titled “Responses”On POST /v1/responses, set the level with the effort field inside the reasoning object. The request goes to the model as is, and the router does not check the value. The reasoning arrives as a separate item in output; see Responses API.
Reasoning in a Chat Completions response
Section titled “Reasoning in a Chat Completions response”The format depends on the model, so the response can contain two fields:
| Field | Contents |
|---|---|
reasoning | The reasoning text as a string, if the model exposes it |
reasoning_details | An array of blocks in the model’s format: reasoning.text with the text, reasoning.summary with a summary of the reasoning, or reasoning.encrypted with an encrypted blob |
If the provider omits reasoning or sends an empty string, the router fills it by concatenating the text of reasoning.text blocks and the summary of reasoning.summary blocks in reasoning_details, without a separator. Encrypted blocks contribute no text. This also applies to streaming deltas.
Some model families do not expose their reasoning and send only encrypted blocks. You cannot read them, but you can pass them back in the next request if your client supports it. Plain text looks like this:
{ "message": { "role": "assistant", "content": "391", "reasoning": "17 * 20 = 340, plus 17 * 3 = 51, total 391.", "reasoning_details": [{ "type": "reasoning.text", "text": "...", "index": 0 }] }}When streaming, these fields arrive in fragments inside delta, like ordinary text.
DLP and reasoning
Section titled “DLP and reasoning”With DLP in mask mode, reasoning keeps the provider’s placeholders, including in streaming responses. Send signed reasoning back unchanged: editing it can invalidate its signature. DLP scans the readable reasoning you send back.
Tokens and cost
Section titled “Tokens and cost”Reasoning is billed as output and counts toward output tokens. Which usage field shows the amount on each endpoint: Tokens and usage.
What to keep in mind
Section titled “What to keep in mind”- The first token arrives later. At high levels the model is silent while it thinks: on hard requests that is tens of seconds or more. In interactive interfaces, turn on streaming so the connection does not look stuck, and do not set client timeouts too low.
- Pick the level for the task, not “just in case”. Data extraction, short answers, and tool calls usually do not improve with high effort, but they cost more.
max_tokensincludes the reasoning. A limit that is too tight cuts the response off before the model gets to the text.- Reasoning does not replace instructions. If the answer is consistently wrong, a more precise prompt helps more than a higher level.