Mastering Claude’s Effort Parameter: Balance Performance and Cost Like a Pro
Learn how to use Claude's effort parameter to control token spending, optimize response thoroughness, and reduce costs across all API interactions.
This guide explains Claude's effort parameter, which lets you trade off between response thoroughness and token efficiency. You'll learn how to set effort levels (low, medium, high, xhigh, max) in API calls, when to use each level, and how to combine effort with adaptive thinking for optimal results.
Introduction
Claude’s effort parameter is a powerful new tool that gives you fine-grained control over how much Claude “thinks” before responding. By adjusting the effort level, you can dial in the perfect balance between response quality, speed, and cost — all without switching models.
Whether you’re building a simple chatbot, a complex agentic system, or a high-throughput API service, understanding effort is essential for getting the most out of Claude.
What Is the Effort Parameter?
The effort parameter controls how eager Claude is about spending tokens when generating a response. It affects all tokens in the output — including text, tool calls, and extended thinking. This means you can reduce token consumption across the board, not just in the thinking phase.
Key benefits:
- No need to enable thinking to use effort (though it works great with thinking).
- Affects tool calls — lower effort means fewer and shorter tool calls.
- Works on all supported models without beta headers.
- Claude Mythos Preview
- Claude Opus 4.7
- Claude Opus 4.6
- Claude Sonnet 4.6
- Claude Opus 4.5
Note: For Opus 4.6 and Sonnet 4.6, effort replaces the deprecatedbudget_tokensparameter. Whilebudget_tokensstill works, it will be removed in a future release.
Effort Levels Explained
Claude offers five effort levels, each suited to different use cases:
| Level | Description | Best For |
|---|---|---|
low | Most efficient. Significant token savings with some capability reduction. | Simple tasks, high-volume chat, subagents |
medium | Balanced approach with moderate token savings. | Agentic tasks needing speed and cost balance |
high | High capability. Equivalent to not setting the parameter. | Complex reasoning, coding, agentic tasks |
xhigh | Extended capability for long-horizon work. | Long-running agentic/coding tasks (>30 min) |
max | Absolute maximum capability with no constraints. | Deepest reasoning, most thorough analysis |
How to Use Effort in the API
Using the effort parameter is straightforward. Add it to your request body when calling the Messages API.
Python Example
import anthropic
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=4096,
effort="medium", # <-- Set effort level here
messages=[
{"role": "user", "content": "Explain quantum entanglement in simple terms."}
]
)
print(response.content[0].text)
TypeScript Example
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic();
const response = await client.messages.create({
model: 'claude-sonnet-4-20250514',
max_tokens: 4096,
effort: 'medium',
messages: [
{ role: 'user', content: 'Explain quantum entanglement in simple terms.' }
]
});
console.log(response.content[0].text);
Combining Effort with Adaptive Thinking
For the best experience, combine effort with adaptive thinking. This lets Claude dynamically decide how much to think based on the problem complexity, while still respecting your effort preference.
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=8192,
thinking={"type": "adaptive"}, # Enable adaptive thinking
effort="medium", # Set effort level
messages=[
{"role": "user", "content": "Design a scalable microservices architecture for an e-commerce platform."}
]
)
Recommended Effort Levels for Sonnet 4.6
Sonnet 4.6 defaults to high effort. To avoid unexpected latency and cost, explicitly set effort when using this model:
- Medium effort (recommended default): Best balance for most applications — agentic coding, tool-heavy workflows, code generation.
- Low effort: For high-volume or latency-sensitive workloads — chat, non-coding use cases where speed matters most.
When to Use Each Effort Level
Low Effort
- Use for: Simple Q&A, classification, data extraction, high-throughput chatbots.
- Example: A customer support triage bot that routes tickets to the right department.
- Trade-off: Faster responses, lower cost, but may miss nuance on complex queries.
Medium Effort
- Use for: Agentic tasks, tool-using workflows, code generation, summarization.
- Example: An AI coding assistant that writes and debugs functions.
- Trade-off: Good balance of speed, cost, and quality.
High Effort
- Use for: Complex reasoning, multi-step planning, detailed analysis.
- Example: A research assistant analyzing scientific papers and synthesizing findings.
- Trade-off: Higher token usage, longer response times, but excellent quality.
Xhigh Effort (Opus 4.7 only)
- Use for: Long-running agentic tasks (30+ minutes) with token budgets in the millions.
- Example: An autonomous agent that builds an entire software project from scratch.
- Trade-off: Maximum capability for extended work; higher cost.
Max Effort
- Use for: The absolute hardest problems requiring deepest reasoning.
- Example: Mathematical theorem proving, complex legal analysis, strategic planning.
- Trade-off: No constraints on token spending; use sparingly.
Practical Tips
- Start with medium effort for most applications, then adjust based on observed performance.
- Monitor token usage — lower effort should reduce both input and output tokens.
- Combine with adaptive thinking for dynamic depth control.
- Test with your actual workload — effort affects different tasks differently.
- Remember: Lower effort doesn’t mean “dumb” — Claude still reasons, just more efficiently.
Common Pitfalls
- Assuming low effort = no thinking: Claude will still think on hard problems, just less.
- Forgetting to set effort on Sonnet 4.6: It defaults to high, which may be overkill for simple tasks.
- Using effort without monitoring: Always track token consumption to validate cost savings.
Conclusion
The effort parameter is a game-changer for Claude API users. It gives you unprecedented control over the cost-performance trade-off, all within a single model. By choosing the right effort level for each task, you can dramatically reduce costs without sacrificing quality where it matters most.
Start experimenting with effort today — your wallet (and your users) will thank you.
Key Takeaways
- Effort controls token spending across text, tool calls, and thinking — not just thinking depth.
- Five levels (low, medium, high, xhigh, max) let you fine-tune the balance between speed, cost, and capability.
- Combine with adaptive thinking for optimal results on dynamic workloads.
- Explicitly set effort on Sonnet 4.6 to avoid unexpected latency and cost.
- Effort is a behavioral signal, not a strict budget — Claude still reasons deeply on hard problems at lower levels.