Claude Sonnet 5 vs Opus 5: which one to run
Both carry a 1M-token context and the same 0.1× rate. Opus costs 1.67× as much on both input and output. Here is when that buys you anything.
The difference is price, not capability class
Sonnet 5 and Opus 5 share the specifications people usually compare first. Both take a 1,000,000-token context, both emit up to 128,000 tokens, both support tool use and extended thinking, and both route through /v1/messages. Neither is a cut-down version of the other.
They part on price. Official rates are $3 per million input tokens for Sonnet and $5 for Opus; output is $15 against $25. Both are billed at the 0.1× multiplier here, so the ratio is unchanged — Opus costs roughly 1.67× as much either way.
The practical consequence: on most coding work the two produce answers of the same shape, and the price difference is the whole difference. Where that stops being true is the subject of the next section.
What the price difference buys
On work Sonnet 5 already handles, the two return answers of the same shape, and the 1.67× is spent on nothing observable. That covers most editing, test-writing, and multi-step tool calling.
The gap shows up on long reasoning chains, where an early misstep propagates through every later step, and on work where a wrong answer costs more than the tokens do. Neither is a property of the task description — it is a property of your task, which is why the useful move is to run the same prompt through both ids and compare.
Both answer on the same endpoint with the same request shape, so switching is a one-field change and comparing costs you one extra call.
curl https://token-share.app/v1/messages \
-H "x-api-key: $TOKEN_SHARE_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Explain this stack trace."}]
}'What the 1M context does not do
A million tokens is room, not recall. Both models cost the same per token whether the window is nearly empty or nearly full, so pasting an entire repository into every request multiplies the bill without improving the answer.
Prompt caching is the lever that matters when a long prefix genuinely repeats — a system prompt, a file the conversation keeps returning to. Cached reads are billed separately from fresh input, so a stable prefix stops being charged at full rate on every turn.