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.
| Tier | Best for | Trade-off |
|---|---|---|
| Fast & low-cost (Haiku 5.5) | Routing, classification, simple Q&A, high-volume calls | Lowest cost and latency; less depth on hard problems |
| Balanced (Sonnet 5.5) | Most production work — coding, agents, analysis | Best 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 workloads | Higher 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 on | Highest 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.
Use this table to decide which Claude API setting fits your task. Only one can be active per request.
| Temperature | Effort Level (Claude Code & API) | |
|---|---|---|
| What it controls | Randomness in the visible output | How much internal reasoning before answering |
| Parameter | temperature (0.0–1.0) | effort: low / medium / high / max |
| Default | 1.0 (if omitted) | Varies by model: high on Fable 5.1 & Sonnet 5.5; medium on Opus 5.5 & Haiku 5.5 |
| Best for | Creative writing, varied output, brainstorming | Hard reasoning, coding, debugging, agentic tasks |
| Cost impact | Indirect — higher temp can produce longer outputs | Direct — higher effort = more thinking tokens billed as output tokens |
| Model support | Haiku 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.
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)
import anthropic
client = anthropic.Anthropic()
# Effort + adaptive thinking are standard across the 5.x generation.
# Fable 5.1 and Opus 5.5 have thinking always on (no need to set type).
# Support and exact level names vary by model — see platform.claude.com/docs
response = client.messages.create(
model="claude-sonnet-5-5", # current balanced model
max_tokens=8000,
thinking={"type": "adaptive"},
effort="medium", # low | medium | high | max
messages=[{"role": "user", "content": "Review this function for race conditions and suggest a fix."}]
)
for block in response.content:
if block.type == "text":
print(block.text)
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 →
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.low, medium, high, max). They are mutually exclusive — you can only use one per API call.