The Claude Opus 5 API is the same Messages API you already know, with one model ID and a handful of defaults worth knowing before you ship. This is the short version of what actually changes for a developer.
The essentials
| Model ID | claude-opus-5 |
| Endpoint | Messages API (/v1/messages) |
| Context | 1M tokens, default and maximum |
| Max output | 128K tokens |
| Official SDKs | Python, TypeScript, Java, Go, Ruby, C#, PHP |
Model IDs carry no date suffix — claude-opus-5 is complete as written. On Amazon Bedrock the same model takes an anthropic. prefix.
Four defaults that catch people out
- Thinking is on by default. Omitting the
thinkingparameter runs adaptive thinking, unlike Opus 4.8 where omitting it meant no thinking. Since your max-token budget covers thinking and response text together, a tightly-sized limit can now truncate. - Disabling thinking is capped at
higheffort. Combining disabled thinking withxhighormaxreturns a 400, and the check runs on every request. - Sampling parameters are gone.
temperature,top_p, andtop_kare rejected. Steer behaviour with prompting and the effort level instead. - No assistant prefill. Ending your messages array with an assistant turn returns a 400. Use structured outputs or a system-prompt instruction to control response format.
Parameters worth setting deliberately
output_config.effort—lowthroughmax, defaulting tohigh. This is the main quality-versus-cost dial.max_tokens— stream anything above roughly 16K to avoid HTTP timeouts; 128K is the ceiling.cache_control— caches from 512 tokens up on this model, half the previous minimum.speed: "fast"— fast mode, at double the price, on the Claude API only.
Handle refusals before reading content
Opus 5 ships with elevated safety classifiers that can decline a request. A refusal returns a normal HTTP 200 with stop_reason: "refusal" and an empty or partial content array — so code that reads content[0] unconditionally will break rather than fail cleanly.
Check stop_reason first. The API also offers a server-side fallback option that re-runs a declined request on another model automatically, which is worth enabling by default for production traffic: cyber-category refusals route to Opus 4.8.
More on Claude Opus 5
Start with the complete Claude Opus 5 guide for the overview, or go deeper:
Ready to go deeper?
Read the full Claude Opus 5 guideFrequently Asked Questions
What is the model ID for Claude Opus 5?
`claude-opus-5` on the Claude API, Google Cloud Vertex AI, and Microsoft Foundry. On Amazon Bedrock it is `anthropic.claude-opus-5`. There is no date suffix — the ID is complete as written.
Why does my Claude Opus 5 request return a 400?
The most common causes are parameters that were removed: `temperature`, `top_p`, `top_k`, and the old `budget_tokens` thinking configuration all return 400. Two others are specific to Opus 5 — an assistant-turn prefill, and disabling thinking while requesting `xhigh` or `max` effort.
Do I need to change my code to migrate from Opus 4.8?
Usually only the model ID string. The bigger risks are behavioural: thinking is now on by default, which changes how your max-token budget is consumed, and prompts that instruct the model to verify its own work now cause redundant effort.


