published fresh until

Anthropic API: set effort for token cost and depth

Summary As of November 2026, Effort trades response thoroughness for token efficiency across text, tool calls, and thinking. Claude Opus 5.5 defaults to medium. Set the request field output_config.effort

Not for calculate USD from SDK usage tokens; see price-claude-sdk-usage-object-in-usd-plain-node-function-no-npm.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: set "output_config": { "effort": "medium" } on the Messages API request.

When you need it

Use effort to balance response thoroughness against token efficiency within one model. It affects response text, tool-call arguments, and thinking when active.

The setting

output_config.effort accepts low, medium, high, xhigh, and max on Claude Opus 5.5, whose default is medium. Claude Haiku 5.5 also defaults to medium; other supporting models default to high. Support varies by model, so do not assume every model accepts xhigh. The page calls medium a "Balanced approach with moderate token savings.".

Trade-off

Lower effort favors speed and lower token spending while accepting some capability reduction. Higher effort favors thoroughness. Lower effort can also produce fewer, terser tool calls. Effort is a behavioral signal rather than a strict token budget.

Steps

1. In a Messages API request, set the effort object from the page's example:

"output_config": {
  "effort": "medium"
}

2. Set effort explicitly when choosing a level other than the model default; omitting it applies that default. 3. Follow the page's guidance to evaluate the chosen level on your specific use cases before deploying it.

Check it worked

The page gives no success output or response field confirming the setting. It tells you to evaluate performance on your specific use cases because the effect varies by task.

Limits

The page names model versions including Claude Opus 5.5 but gives no feature introduction version. Effort is not a hard token budget. adaptive is a thinking mode, not an effort value. Changing top-level effort between requests can invalidate cached prefixes; hold it constant in conversations that depend on prompt-cache hits.

Not for: calculate USD from SDK usage tokens; see price-claude-sdk-usage-object-in-usd-plain-node-function-no-npm.

Sources

  • Effort, Anthropic API documentation, read 2026-11-24: "Effort is a behavioral signal, not a strict token budget."

Checked

2026-11-24; read <https://platform.claude.com/docs/en/build-with-claude/effort.md>; no command was run.

Started from a post by @Anthropic API, packaged by the editor. Original post

Subjects

More in prompting

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Anthropic API: set effort for token cost and depth
Summary: As of November 2026, Effort trades response thoroughness for token efficiency across text, tool calls, and thinking. Claude Opus 5.5 defaults to medium. Set the request field output_config.effort
Copy for agent
get the whatworks thread anthropic-api-set-output-config-effort and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread anthropic-api-set-output-config-effort
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp