Which Claude model to use: Sonnet, Opus or Fable?
Sonnet for everyday work, Opus for long agentic coding, Fable for the hardest jobs. How the three Claude models compare on speed, cost and fit.
Use Sonnet for most work: it is 5abeer's default model, the fastest of the three and the lowest priced. Move to Opus for long, demanding agentic coding and large refactors. Keep Fable for the hardest reasoning and for agent sessions that run for hours, where the extra cost pays off.
Which Claude model fits which task?#
Anthropic's current Claude line has three main models that trade speed for capability: Sonnet, Opus and Fable. Anthropic also makes a smaller, faster family, Haiku, covered in the questions below. This table uses the wording of Anthropic's own model guide:
| Your task | Model | Why |
|---|---|---|
| Everyday coding, writing, data analysis, agents that call tools | Sonnet | "The best combination of speed and intelligence", and the fastest of the three |
| Multihour coding agents, large refactors, complex systems work, computer use | Opus | Built "for long-running agentic coding and knowledge work" |
| Agent sessions that run for hours, multistep deep research, a finished report, spreadsheet or deck | Fable | Anthropic's "most capable model open to all customers" |
The rule that follows from it is simple: start with Sonnet, and move up only when a task needs more than Sonnet gives.
Sonnet: the everyday model#
Anthropic recommends Sonnet for "speed and capability for everyday coding, agent, and enterprise workloads": code generation, data analysis, content creation, visual understanding and agentic tool use. It answers fastest and costs the least per token of the three.
The current Sonnet is claude-sonnet-5.5, our default model. Its price per million tokens, ours next to the official one:
Official price from the provider's page, checked October 19, 2026.
Opus: for long, demanding work#
Anthropic positions Opus for "complex agentic coding and enterprise work": multihour autonomous coding agents, large-scale refactoring, complex systems engineering, vision-heavy workflows and computer use. It is slower than Sonnet and costs more per token, so it earns its price on long or hard tasks, not on quick questions.
Anthropic's own advice is to start with Opus when you are unsure which model to use. If cost matters to you, starting with Sonnet and moving to Opus for the tasks that need it usually spends less, because most everyday requests don't need the larger model.
The current Opus is claude-opus-5.5:
Official price from the provider's page, checked October 19, 2026.
Fable: for the hardest jobs#
Fable is the most capable model Anthropic offers to everyone. Anthropic suggests it for "demanding reasoning and long-horizon agentic work": agent sessions that run for hours, multistep deep research, and analysis carried through to a finished document, spreadsheet or deck. It is the slowest and the highest priced of the three.
Anthropic's guidance is to reach for Fable when Opus at a higher effort level still falls short. For a quick edit or a short question, it only adds wait time and cost.
The current Fable is claude-fable-5.1:
Official price from the provider's page, checked October 19, 2026.
Sonnet or Opus for coding?#
The practical line is how much of the work you hand over. If you work turn by turn and review each change, Sonnet's speed and lower price suit that loop. If you hand over a whole task, such as a refactor across the codebase, a feature built from a plan, or an agent that runs on its own for a long time, that is the work Anthropic built Opus for.
Claude Code also has a mixed mode, opusplan: it uses Opus in plan mode, then switches to Sonnet to carry out the plan. Each switch is a model change, so it restarts the prompt cache, as the cost section below explains.
Try a higher effort level before a bigger model#
Anthropic notes that "tuning effort is often a better lever than switching models". Effort sets how much the model reasons before it answers. In Claude Code's words, "lower effort is faster and cheaper for straightforward tasks, while higher effort provides deeper reasoning for complex problems".
In Claude Code you set it with /effort, the --effort flag or the CLAUDE_CODE_EFFORT_LEVEL variable, at low, medium, high, xhigh or max. Anthropic warns that max "may show diminishing returns and is prone to overthinking", so test it before you use it widely. Anthropic's effort guide adds that higher levels use more tokens, and that on most workloads max "adds significant cost for relatively small quality gains".
Effort also matters for the cache. Switching models always starts a new cache. Changing effort doesn't on the newest Claude models: Claude Code's docs say that with an API key or a Claude subscription, the cache stays when you change effort.
What does each model cost for a real task?#
The price per token only tells you so much. Take one long coding session that sends two million input tokens and gets one hundred thousand back. On Sonnet:
2M input tokens and 100K output tokens
Official price from the provider's page, checked October 19, 2026.
The same session on Opus:
2M input tokens and 100K output tokens
Official price from the provider's page, checked October 19, 2026.
And on Fable:
2M input tokens and 100K output tokens
Official price from the provider's page, checked October 19, 2026.
These figures leave out caching. In a long conversation most of the input repeats, and cached input is billed at a fraction of the input price (Prompt caching). Each model has its own cache, so switching models mid-session means the next request reads the whole conversation again with no cache hits. Pick the model at the start of a task, not halfway through.
Use every model priced per token through the API for 70% less than its official price.
If you use Claude Code for hours every day, a plan may cost less than paying per token. The cheapest way to use Claude Code compares both routes.
How to pick a model in Claude Code#
To use Claude Code with a 5abeer key, set the base URL, your key and a model in Claude Code's settings file:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.5abeer.ai",
"ANTHROPIC_AUTH_TOKEN": "YOUR_5ABEER_API_KEY",
"ANTHROPIC_MODEL": "claude-sonnet-5.5"
}
}
~/.claude/settings.json
Claude Code uses the Anthropic base URL from this list:
https://api.5abeer.ai/v1Authorization: Bearer <KEY>https://api.5abeer.aix-api-key: <KEY>https://api.5abeer.ai/v1betax-goog-api-key: <KEY>As Claude Code's docs put it, "ANTHROPIC_BASE_URL changes where requests are sent, not which model answers them." The model comes from these settings, highest priority first:
/model <name>during a sessionclaude --model <name>at startup- The
ANTHROPIC_MODELenvironment variable - The
modelfield in your settings file ANTHROPIC_DEFAULT_MODEL, the default for new sessions
The config above sets ANTHROPIC_MODEL, so a /model switch lasts for that session. To change the model for every session, change that value.
Use full model ids, such as /model claude-opus-5.5, rather than the short aliases. Aliases such as opus point to the version Claude Code recommends for your provider and change over time, so a full id is the way to pin one version. To pin the aliases and opusplan to exact models, set ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_FABLE_MODEL to full ids. CLAUDE_CODE_SUBAGENT_MODEL sets the default model for subagents, so you can run the main session on Opus and its subagents on Sonnet.
Each new model needs a recent Claude Code version. If Claude Code doesn't recognize a model or a request for it fails, run claude update. The full setup is in Claude Code setup.
Switching models in your own code#
On the API, the model is one field in the request. The endpoint and the key stay the same for every Claude model, so moving from Sonnet to Opus means changing one value:
curl --request POST "https://api.5abeer.ai/v1/messages" \
--header "x-api-key: $KHABEER_API_KEY" \
--header "Content-Type: application/json" \
--header "anthropic-version: 2023-06-01" \
--data '{"model":"claude-sonnet-5.5","max_tokens":512,"messages":[{"role":"user","content":"Write a product idea in one sentence."}]}'{
"id": "msg_01Xh7",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-5.5",
"content": [
{
"type": "text",
"text": "Hello! How can I help you today?"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 21,
"output_tokens": 12
}
}The key is read from KHABEER_API_KEY, so it never appears in your code.
That also means your own code can send routine requests to Sonnet and harder ones to Opus. Every request is billed by its model and its token count.
Compatible with the Anthropic Messages API.
The full request format is in Messages, and prices for every Claude model are on Claude API.
FAQ#
Which Claude model is best for coding?#
For most coding, Sonnet: it is fast and costs the least per token. For long autonomous runs and large refactors, Opus. For coding agents that run for hours, Fable.
Is Opus always better than Sonnet?#
No. Opus is stronger on long, complex work, but on short and clear tasks Sonnet often gives the same result faster and for less. Try a higher effort level on Sonnet before you switch.
Is Fable worth its price?#
For the hardest work, it can be: hours-long agent sessions, multistep research, or a full report built from raw data. Try Opus at a higher effort level first. On everyday tasks, Fable adds cost and wait time.
Can I switch models in the middle of a conversation?#
Yes, with /model in Claude Code or the model field in your code. In Claude Code, the next request after a switch reads the whole conversation with no cache hits, so it costs more. Switch between tasks rather than inside one.
What about Haiku?#
Haiku is Anthropic's fastest and lowest-priced family, made for real-time apps and high-volume jobs such as classification and data extraction. Check the models page for which Haiku versions you can use with 5abeer today.
Does a cheaper model always mean a cheaper task?#
Not always. A cheaper model that needs several tries can cost more than a stronger one that gets it right the first time. Compare the cost of a finished task, not only the price per token.
Why is Sonnet the default model?#
It gives the best balance of speed and price for most requests. You can still choose any model by its id. The full list with prices is on the models page.
Get started#
Compare paying per token with a Claude plan in Claude API vs a Claude plan, or create a key and try the three models on your own tasks.
Sources#
Checked on 2026-11-01:
- Anthropic: Models overview
- Anthropic: Choosing the right model
- Anthropic: Effort
- Claude Code docs: Model configuration
- Claude Code docs: Prompt caching
Related guides
- The cheapest way to use Claude Code: a plan or an API key?What Claude Code costs on a Claude plan and on an API key, Anthropic's published cost per developer, and which route is cheaper for light and heavy use.
- Claude subscription vs API: Pro, Max or Ultra, or per token?Pay-per-token Claude API against a fixed Pro, Max or Ultra plan, with a worked cost example from current prices and when each one fits.
- Claude Pro vs Max: which one do you need?Anthropic's Claude Pro, Max and Ultra compared in its own words from its pricing and support pages: usage, 5-hour and weekly limits, Fable and Claude Code.
Ready to start?
Pick a plan that runs the official apps, or create an API key to use from your own code.