Reference

The memorizable facts, condensed. Everything here is original material summarizing Anthropic's public documentation — verify details against platform.claude.com/docs before relying on them in production.

Current models checked Oct 28, 2026

ModelAPI IDThinkingDefault effort$ / MTok in · out
Claude Fable 5.1claude-fable-5-1Adaptive, always onhigh10 · 50
Claude Opus 5.5claude-opus-5-5Adaptive, always onmedium4 · 20
Claude Sonnet 5.5claude-sonnet-5-5Adaptivehigh2 · 10
Claude Haiku 5.5claude-haiku-5-5Adaptivemediumfrom 0.10 · 0.50

All four: 1M-token context, 128K max output. Anthropic's default pick is Opus 5.5; Fable 5.1 is for the hardest reasoning and long-horizon agent work. Older models (Opus 5, Sonnet 5, the 4.x family) are still served. Source: models overview.

Changed in 2026

ChangeWhereDo this instead
thinking: {type: "enabled", budget_tokens} not acceptedModels after Opus 4.6 / Sonnet 4.6 (deprecated on those two)Adaptive thinking + output_config.effort
Effort levels low · medium · high · xhigh · maxCurrent models; default differs per model (table above)Set effort explicitly instead of trusting the default
thinking: {type: "disabled"} → 400Fable 5.1, Opus 5.5, Sonnet 5.5Lower effort; on Sonnet 5.5, {type: "between_tools"} turns off up-front thinking
tool_choice any / tool → 400Opus 5.5, Sonnet 5.5, Fable 5.1, Mythos 5.1auto + an instruction naming the tool, strict: true, or structured outputs
Last-assistant-turn prefill → 400Opus 4.6, Sonnet 4.6 and every later modelStructured outputs (output_config.format) or a system-prompt instruction
temperature, top_p, top_k removed → 400Every model on API version 2026-10-21Ask for variety in the prompt
output_format deprecatedMessages APIoutput_config: {format: …}
refusal carries stop_details.categoryOpus 4.7 and laterCheck stop_reason before reading content; optional server-side fallbacks

Check a tools array against these rules with the Claude Tool Schema Validator. Sources: define tools, API versions.

Stop reasons

stop_reasonMeaning / action
end_turnFinished naturally — exit the agent loop.
tool_useExecute requested tool(s), return tool_result blocks in one user message.
pause_turnServer-side tool loop paused — append assistant content, re-send; server resumes.
max_tokensOutput cap hit — raise max_tokens or stream.
model_context_window_exceededConversation too large — compact or trim.
stop_sequenceA custom stop string fired.
refusalDeclined for safety — read stop_details.category, surface it, don't blind-retry.

tool_choice

ValueBehavior
autoClaude decides (default).
anyMust use at least one tool. 400 on Opus 5.5, Sonnet 5.5, Fable 5.1, Mythos 5.1.
tool + nameMust use that specific tool. Same 400 on those four models.
noneTools visible, never called.
disable_parallel_tool_use: trueAdd to any value → max one call per response.

HTTP errors

CodeTypeRetry?
400invalid_request_errorNo — fix the request
401authentication_errorNo — fix the key
403permission_errorNo
404not_found_error (often a model-ID typo)No
413request_too_largeNo — shrink input
429rate_limit_errorYes — honor retry-after
500api_errorYes — backoff
529overloaded_errorYes — backoff

SDKs auto-retry 429/5xx with exponential backoff. Use typed exception classes, not string matching.

Prompt caching

FactValue
MechanismExact prefix match on rendered bytes — one changed byte invalidates everything after it
Render ordertools → system → messages
Max breakpoints4 per request
TTL5 min default, 1 h optional
Write cost≈1.25× base (5 min) / 2× (1 h)
Read cost0.1× base input (0.05× on Opus 5.5 and Sonnet 5.5, 0.025× on Fable 5.1)
Verifyusage.cache_read_input_tokens > 0
Classic invalidatorstimestamps/UUIDs in system prompt, unsorted JSON, varying tool set, model switch

Batches & tokens

FactValue
Batches discount50% off all token usage
Batch windowMost < 1 h, max 24 h; results kept 29 days
Token countingcount_tokens endpoint with your inference model — never tiktoken
Large outputsStream anything big — buffered requests hit HTTP timeouts

Claude Code files

PathPurpose
CLAUDE.md (root)Project memory, committed, team-shared; nested ones scope a subtree; @path imports files
~/.claude/CLAUDE.mdPersonal memory, all projects
.claude/settings.jsonProject settings, committed
.claude/settings.local.jsonPersonal overrides, git-ignored
.claude/commands/*.mdProject slash commands
.claude/agents/Custom subagent definitions
.mcp.jsonProject-scoped MCP servers, committed

Hook events

EventFires
PreToolUseBefore a tool call — can block or modify it
PostToolUseAfter a tool call completes
UserPromptSubmitWhen the user submits a prompt
SessionStartNew session begins
StopClaude finishes responding

Deterministic "every time X" rules → hooks. Conventions and context → CLAUDE.md.

MCP at a glance

ConceptDefinition
HostThe app (IDE, chat client) embedding MCP clients
ClientMaintains one connection to one server
ServerExposes capabilities
ToolsModel-invoked actions (side effects allowed)
ResourcesApplication-controlled data/context
PromptsUser-invoked templates
Transportsstdio (local) · streamable HTTP (remote)
Remote authOAuth at the client/host layer — never secrets in prompts

Independent community study resource — not affiliated with or endorsed by Anthropic. Claude is a trademark of Anthropic, PBC. All study material and practice questions here are original, written from Anthropic's public documentation. Everything runs in your browser; nothing you answer is stored or transmitted.