Thinking Mode
Claude Thinking mode lets the model perform internal reasoning before answering. It significantly improves accuracy on complex reasoning tasks such as math, code debugging, and multi-step planning, at the cost of more output tokens and latency.
Two Ways to Enable It
Method 1: Model Name Suffix (Recommended, available with any protocol)
Use the -thinking tier model directly, with no other parameters required:
claude-opus-4-6-thinkingclaude-sonnet-4-6-thinking
Method 2: Native thinking parameter (Claude native API)
{ "model": "claude-sonnet-5", "max_tokens": 16000, "thinking": { "type": "enabled", "budget_tokens": 8000 }, "messages": [{ "role": "user", "content": "Prove: among any 6 people, there must be 3 who all know each other or 3 who all do not know each other" }]}budget_tokens is the token budget for the thinking process, and must be less than max_tokens.
Output Parsing
In the response content, thinking and answer are returned in separate blocks:
{ "content": [ { "type": "thinking", "thinking": "First, convert the problem into graph coloring..." }, { "type": "text", "text": "This is the classic Ramsey number problem..." } ]}- When displayed in the UI, the
thinkingblock is collapsed or hidden, and only thetextblock is treated as the answer; - Thinking tokens are billed as output tokens, so setting the budget too high will significantly increase cost;
- In streaming mode, thinking is sent incrementally via
thinking_delta; see Streaming and Non-streaming Responses.
Selection Recommendations
- Use the standard tier for ordinary tasks; use the thinking tier for grading, auditing, and tackling hard problems;
- For comparisons with GPT/Gemini reasoning tiers, see Reasoning Model Output.