How should I tune thinking and effort for a Claude API workload?
Start with the documented thinking mode and default effort for your exact model, then change one supported control at a time on the same evaluation set.
PUBLIC BETA OFFER
Save 50% off on an Eligible Learning PlanValid for 1-month plan, 3-month plan, 12-month plan · Code LPXBETA50 · Ends Dec 6, 2026
852 published articles
Start with the documented thinking mode and default effort for your exact model, then change one supported control at a time on the same evaluation set.
Use Claude JSON outputs when downstream code needs a defined response shape. Use strict tool use when Claude proposes arguments for a registered tool.
For developer-defined client tools, retain the complete assistant turn containing the tool_use blocks. Then send the next user message with one tool_result for each client call.
Reserve an application operation record for the approved business action before dispatch, and check the tool's authoritative downstream state if a timeout leaves the outcome uncertain.
Keep static Claude API keys in a controlled server-side secret system and provide them only to the workload authorized to call the configured service.
Monitor the chain from authenticated request and selected data through validation, approval, execution, and confirmed effects.
Authenticate the caller, authorize the task and records, and remove unnecessary fields before building the Claude request.
Treat user input and external content as untrusted, and limit what the model can access or cause even if it follows an embedded instruction.
Record the current prompt template and rendered failing case, identify the ambiguous instruction or example, and change one suspected component where possible.
Claude prompt caching can reduce total cost when a sufficiently long, eligible prefix is reused enough times before expiration. Keep stable instructions, tool definitions, or shared reference materials ahead of request-specific content.
Use the Claude API token counting endpoint to estimate input size before sending a request, then reconcile the estimate with the message's actual usage and the current price schedule for the exact model and provider.
Define the task, permitted inputs, expected evidence, output format, and missing-data behavior before drafting the prompt.