Core concepts

Extended thinking

Give models room to reason before answering, controlled by effort.

Extended thinking lets a model reason through a problem before it responds, which improves results on hard tasks (complex reasoning, math, multi-step agentic work).

Enabling it

On the Anthropic Messages API, extended thinking is requested with a thinking object carrying a token budget:

curl https://api.spoofzone.com/v1/messages \
-H "x-api-key: $SPOOF_API_KEY" \
-H "content-type: application/json" \
-d '{
  "model": "claude-opus-4-8",
  "max_tokens": 4096,
  "thinking": { "type": "enabled", "budget_tokens": 2048 },
  "messages": [{ "role": "user", "content": "Prove that sqrt(2) is irrational." }]
}'
bash · 9 lines

Newer models express this as an effort control rather than a fixed token budget. Spoof adapts a legacy thinking request to the target model's effort automatically, so the same request keeps working across models. Anything adjusted is reported in the x-spoof-repaired-params response header (see the note on Messages).

Billing

Thinking tokens are output tokens and are billed at the model's output rate. Set a budget that fits the task, and keep max_tokens high enough to hold both the thinking and the final answer.

Extended thinking | Spoof