Best Claude API Settings (2026 Guide): Temperature, Effort & Thinking

The two most important Claude API settings are temperature (randomness in the output) and effort level (how much the model reasons before responding). They can't both be tuned in the same call — pick the right one for your task. In Claude Code, the claude code effort level defaults to high on Fable 5.1 and Sonnet 5.5, and medium on Opus 5.5 and Haiku 5.5.

Works with OpenAI, Anthropic, Google Gemini, Groq, AWS Bedrock & Ollama • No prompt content stored

Last verified: October 2026. The current Claude generation is the 5.x series (Haiku 5.5, Sonnet 5.5, Opus 5.5, Fable 5.1). All 5.x models use adaptive thinking — Fable 5.1 and Opus 5.5 have thinking always on, so temperature is not applicable on those models. Effort defaults now vary by model: high on Fable 5.1 & Sonnet 5.5; medium on Opus 5.5 & Haiku 5.5. Parameter support varies by model and changes over time — if anything here doesn't match what you see, check Anthropic's current API docs.

Choosing a Model: Four Tiers

TierBest forTrade-off
Fast & low-cost (Haiku 5.5)Routing, classification, simple Q&A, high-volume callsLowest cost and latency; less depth on hard problems
Balanced (Sonnet 5.5)Most production work — coding, agents, analysisBest all-round cost/quality/latency balance
Agentic & knowledge work (Opus 5.5)Long-running agentic coding, deep knowledge tasks; Anthropic's recommended default for most workloadsHigher cost; thinking always on; default effort is medium
Maximum reasoning (Fable 5.1)Hardest reasoning, long-horizon agentic work where Opus 5.5 falls short; thinking always onHighest cost & latency — reserve for demanding tasks

Anthropic recommends starting with Opus 5.5 for most workloads and escalating to Fable 5.1 only for demanding reasoning. Model names and capabilities change often — check Anthropic's models overview for the current lineup.

Temperature vs. Effort Level — Which Claude API Setting to Use?

Use this table to decide which Claude API setting fits your task. Only one can be active per request.

TemperatureEffort Level (Claude Code & API)
What it controlsRandomness in the visible outputHow much internal reasoning before answering
Parametertemperature (0.0–1.0)effort: low / medium / high / max
Default1.0 (if omitted)Varies by model: high on Fable 5.1 & Sonnet 5.5; medium on Opus 5.5 & Haiku 5.5
Best forCreative writing, varied output, brainstormingHard reasoning, coding, debugging, agentic tasks
Cost impactIndirect — higher temp can produce longer outputsDirect — higher effort = more thinking tokens billed as output tokens
Model supportHaiku 5.5 & Sonnet 5.5. Not applicable on Fable 5.1 / Opus 5.5 (always-on thinking)All 5.x models. Use thinking: {"type": "adaptive"} on Sonnet 5.5 / Haiku 5.5; Fable 5.1 & Opus 5.5 have thinking always on
Mutually exclusive?Yes — set one or the other, never both in the same API call

The claude code effort level controls reasoning depth in both Claude Code CLI and the API. Defaults vary by model — set it explicitly if you want a different level. See Anthropic's models overview for per-model parameter support.

Set Temperature or Effort via API (copy-paste)

import anthropic

client = anthropic.Anthropic()

response = client.messages.create(
    model="claude-sonnet-5-5",   # current balanced model
    max_tokens=1024,
    temperature=0.7,  # balanced creativity
    messages=[{"role": "user", "content": "Give 10 brand names for a coffee app"}]
)
print(response.content[0].text)

Quick Check: Effort & Cost Impact

Thinking tokens are billed as output tokens, so lowering effort on routine tasks directly lowers cost on those calls. Estimate the impact per 100 calls.

Want this tracked automatically? Open the demo →

Privacy: We never store prompt or output content—telemetry only (token counts, timings, success). Works out of the box with OpenAI, Anthropic, Google Gemini, Groq, AWS Bedrock & Ollama. DoCoreAI captures thinking/effort token usage as part of cost telemetry automatically, and paces your budget regardless of which settings you use.

Claude API settings can influence how your application behaves, but controlling production AI spend requires looking beyond individual model parameters. Learn how to reduce LLM API costs →

Claude API Settings — Frequently Asked Questions

What is the claude code effort level?
The claude code effort level controls how much internal reasoning the model does before answering. It accepts low, medium, high, or max. Default effort varies by model: high for Fable 5.1 and Sonnet 5.5; medium for Opus 5.5 and Haiku 5.5. Set it explicitly if you want a different level. Higher effort produces more thinking tokens, which are billed as output tokens.
What are the main Claude API settings?
The two most important Claude API settings are temperature (controls output randomness, range 0.0–1.0) and effort level (controls reasoning depth: low, medium, high, max). They are mutually exclusive — you can only use one per API call.
What's the difference between temperature and effort/thinking?
Temperature controls randomness in the visible output — how varied the wording is. Effort and adaptive thinking control how much internal reasoning the model does before answering, which mainly affects quality on hard tasks, latency, and cost.
Can I use temperature and extended thinking together?
No — they're mutually exclusive on a single request. Choose temperature for creative/varied output tasks, or effort/thinking for reasoning-heavy tasks. Note: models with always-on thinking (Fable 5.1 and Opus 5.5) do not accept a temperature parameter at all — on those models, use effort instead.
Which Claude model should I use?
Anthropic recommends starting with Claude Opus 5.5 for most workloads and escalating to Claude Fable 5.1 only for demanding reasoning or long-horizon agentic tasks where Opus 5.5 falls short. Claude Sonnet 5.5 is the best speed/intelligence balance, and Claude Haiku 5.5 suits high-volume, low-latency tasks like routing and classification. Check Anthropic's current model list, since names and capabilities update frequently.
Are thinking tokens billed separately?
No — thinking tokens are billed as output tokens. A higher effort level can increase your bill on a call even if the final visible response is short.
Do these settings affect my DoCoreAI cost tracking?
Yes. DoCoreAI captures token usage — including thinking/effort tokens — as telemetry automatically, so changes to these settings show up in your cost and budget-pacing views without any extra configuration.

Related Guides

AI Cost Governance
-->
Scroll to Top