Claude Opus 5 API guide
Claude Opus 5 API: Call Claude Opus 5 through the Anthropic-compatible Messages interface. Use the invocation identifier below and native message fields; optional features and token limits depend on the selected model and your account access.
Model overview
Call Claude Opus 5 through the Anthropic-compatible Messages interface. Use the invocation identifier below and native message fields; optional features and token limits depend on the selected model and your account access.
API integration
| Documentation | Value |
|---|---|
| API invocation identifier | claude-opus-5 |
| Integration | LLM protocol |
Use this invocation identifier in API requests. Check your authorized model catalog for access. Follow the Quickstart for your first complete call.
The parameters below describe the selected protocol. Optional features and limits depend on this model and your account access. Check supported capabilities before enabling tool calls, caching, or large token limits.
Request parameters
Studio presets describe the form setup, not guaranteed server defaults. Send preset values explicitly to reproduce them.
Use the API invocation identifier shown in this guide, subject to access in your authorized protocol catalog.
Ordered conversation messages containing roles and content. Preserve role boundaries and the order of prior turns.
A positive limit for generated output. Choose a limit supported by the selected model.
When true, consume the native protocol stream incrementally and handle completion and errors separately.
No parameters match. Clear the search or reset the filters.
Model rules
Model behavior
- Messages requires max_tokens and a messages array. A successful response is a native message with content blocks; text and tool-use blocks must be handled by type.
- If this model supports cache controls, keep reusable content stable and separate it from the changing question. Confirm actual cache usage from response fields rather than assuming a marker guarantees a hit.
Request examples
Set MUSESPARK_API_KEY in your server environment. Python examples use requests; JavaScript examples use Node.js 20 or later.
Anthropic request
curl --fail-with-body 'https://api.musespark.ai/proxy/anthropic/v1/messages' \
-H "Authorization: Bearer $MUSESPARK_API_KEY" \
-H 'anthropic-version: 2023-06-01' \
-H 'Content-Type: application/json' \
-d '{
"model": "claude-opus-5",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain asynchronous APIs in one sentence."
}
],
"stream": false
}'Parameters used: model · max_tokens · messages · stream.
Output
Read the native anthropic response rather than a task envelope. See the protocol quickstart and streaming guide for parsing and interruption handling.
Troubleshooting
For rejected inputs, check the field type, accepted values, and conditional requirements in Request parameters and Model rules. Correct the affected fields before submitting again.
For authentication and permission errors, see LLM authentication. For interrupted streams, follow the anthropic streaming guide.
Related docs
The public input snapshot was exported on 2026-11-09. Current prices and availability are listed in the model center.