/anthropic/v1/messages endpoint allows Claude models to deeply reason through complex tasks before producing answers. You control reasoning token expenditure via the thinking parameter object.
The thinking Parameter Rules
max_tokensMust Exceed Budget:max_tokensmust always be strictly greater thanbudget_tokensto ensure sufficient room for text completion.- Minimum Budget Limit: The minimum value for
budget_tokensis 1024 tokens. - Response Block Structure: Responses emit an ordered block list where
type: "thinking"precedestype: "text".