output_config.effort (effort level) and thinking (adaptive thinking).
For channels, billing, and basic onboarding, see the Claude API Basics page first.
Applicable models: Claude Opus 4.8 / 4.7 / 4.6, Sonnet 4.6, etc. This page uses Opus 4.8 as the example.
Online testing tool
Don’t want to write code? Try the APIYI online reasoning tester first: pick a model and an effort level, set Max Tokens, check “return thinking summary”, and compare how each effort level reasons — right in the browser.Reasoning Tester · APIYI Online Tool
Run Claude (plus GPT / Gemini) reasoning tests directly in the browser — no code required, just paste your APIYI key.

Request structure
Endpoint and headers
When APIYI routes to Bedrock, the client still uses the Anthropic native format (
x-api-key + /v1/messages); the gateway handles translation to Bedrock’s bedrock-2023-05-31 internally. You do not need to set anthropic_version: bedrock-2023-05-31.Minimal request body
effort levels
effort controls how many tokens Claude is willing to spend to produce a result, trading off thoroughness against speed/cost. It affects all token consumption: the answer, tool calls, and extended thinking.
Request body with effort
Level overview
Which levels each model supports
Not every model supports every level.xhigh was added on Opus 4.7, and max is not supported on Sonnet:
Adaptive thinking
Opus 4.7 / 4.8 use adaptive thinking: the model decides when and how much to think, with effort controlling depth.thinking.type: "adaptive"— enables adaptive thinking (omit it and the model won’t think).thinking.display: "summarized"— returns thinking summary blocks in the response; drop it if you don’t need to surface them.- How effort relates to thinking:
high/xhigh/maxalmost always think deeply;low/mediummay skip thinking on simple problems. - The
displaydefault differs by model: Opus 4.6 defaults tosummarized, while Opus 4.7 / 4.8 default toomitted(the thinking block still exists but itsthinkingtext is empty, which shows up as a pause before the answer). Setdisplay: "summarized"explicitly to reliably get summaries. - There is no
-thinkingsuffix model in the native API. Whether the model thinks is controlled by thethinkingparameter, not a model-name suffix; anyxxx-thinkingis a third-party alias — just use the base model ID plus thethinkingparameter.
What the thinking summary actually is (important)
- The summary is generated by Anthropic (the model/serving layer) — not the gateway and not a separate model. The raw chain of thought is never returned verbatim; what you get is the official summary.
- You cannot style the thinking summary via the system prompt.
systemshapes how the model thinks and the style of the final answer; the summary is just a readable rendering of internal reasoning. Put tone, formatting, and style requirements into the constraints on the final answer so they show up in thetextblock. - Don’t prompt the model to output its internal reasoning verbatim in the answer — it can trigger a refusal (
stop_reason: "refusal", withstop_details.categorypossiblyreasoning_extraction). To see reasoning, read thedisplay: "summarized"summary instead.
When continuing a multi-turn conversation on the same model, pass the thinking blocks from the previous turn back unchanged (including the signature and empty-text blocks) — the API rejects modified thinking blocks. Displaying the summary is fine; editing it before passing it back is not.
Parsing the response
The responsecontent is an array of blocks, distinguished by type:
usage field:
If
stop_reason is max_tokens, the output was truncated by max_tokens (thinking can easily fill the budget at high effort), and the answer text may be empty — just raise max_tokens.thinking fields under streaming (stream)
Withstream: true, thinking content does not come through delta.text — it’s a dedicated event sequence:
The answer text still comes through
delta.type = "text_delta" → delta.text. With display: "omitted", the thinking block still appears but delta.thinking is an empty string.
Full runnable example
Notes for the Bedrock route
Troubleshooting
"thinking.type.enabled" is not supported for this model
The most common 400 when calling Opus 4.7 / 4.8 through the AWS (Bedrock) route:
thinking: { "type": "enabled", "budget_tokens": N }. Opus 4.7 / 4.8 (and newer models) have removed it and support adaptive thinking only; the AWS upstream returns a ValidationException 400. This matches the note in the Adaptive thinking section above.
Fix: drop type: "enabled" and budget_tokens, and use adaptive + output_config.effort to control thinking depth.
To run without thinking: Opus 4.7 / 4.8 accept
thinking: { "type": "disabled" }, or simply omit the thinking field (no field = no thinking).References
- Anthropic — Effort docs:
platform.claude.com/docs/en/build-with-claude/effort - AWS Bedrock — Adaptive thinking:
docs.aws.amazon.com/bedrock/latest/userguide/claude-messages-adaptive-thinking.html - AWS Bedrock — Claude Opus 4.8:
docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-opus-4-8.html