Skip to main content
Interleaved thinking allows the model to produce thinking blocks between tool calls across multiple turns. The model reasons before each action and again after receiving tool results, giving you visibility into its step-by-step thought process.
The Messages API (/v1/messages) is fully supported on the Enterprise plan using https://enterprise.blackbox.ai. On standard plans (https://api.blackbox.ai), this endpoint may not work as expected. For the best experience, use an Enterprise API key.
For Claude 4.6+ models, use {"type": "adaptive"}. The model automatically decides when and how much to think — no budget or beta header required.

Enabled with Budget Tokens (Legacy)

For pre-4.6 models or when you need explicit control over the thinking token budget. Requires the interleaved-thinking-2025-05-14 beta header and max_tokens must be greater than budget_tokens.
For Claude 4.6 models, {"type": "adaptive"} is recommended over {"type": "enabled", "budget_tokens": ...}. Adaptive thinking lets the model decide how much reasoning is needed, resulting in better performance and lower costs.

Adaptive Thinking Response

When using adaptive thinking, the response includes thinking blocks with a signature field alongside tool_use blocks:
The signature field on thinking blocks is used for verification when passing thinking blocks back in multi-turn conversations. Always include it when sending the assistant’s response back.
If the signature field gets corrupted (e.g. set to null by your ORM, truncated by a column limit, or modified during serialization), the API will reject the request with a 400 error. See Avoiding Invalid Thinking Signatures for common causes, reproduction examples, and fixes.

Legacy Thinking Response

With legacy thinking (budget_tokens), the model may produce longer reasoning. The response structure is the same but thinking content tends to be more detailed:

How Interleaved Thinking Works

When thinking is enabled with tool calling, the model produces thinking blocks between tool calls across multiple turns. The model reasons before each action and again after receiving tool results — this is what makes it “interleaved.”

Turn 1 — Think, then call a tool

The model receives the user’s question, thinks about its approach, and calls the first tool:
You then execute the tool and send back:

Turn 2 — Think again after tool result, then call another tool

After receiving the tool result, the model thinks again (this is the interleaving) and decides on the next step:

Turn 3 — Think and return final answer

The model thinks one final time after the last tool result and produces the answer:

Passing Thinking Blocks Back in Multi-Turn

When passing the assistant’s response back in multi-turn, include all content blocks — including thinking blocks with their signature field. The API expects the full content array exactly as returned. Omitting thinking blocks or signatures will result in errors.
Here’s how the full message array looks with thinking blocks included:

Thinking Configuration Reference

Tool Calling

Define tools and build multi-turn agentic loops

Best Practices

Avoid signature corruption, forced tool choice errors, and more

Messages API Overview

Headers, parameters, and supported models