Introduction
Claude Opus 5 is Anthropic's flagship chat model, served here on one OpenAI-compatible endpoint at /v1/chat/completions. A 1,000,000-token window carries the whole prior exchange verbatim, and one reply can run to 128,000 tokens.
Reasoning effort takes low, medium or high, with medium as the default. The model fixes its own sampling, so temperature and top_p are not accepted; message content is text and images, up to 128 tools can be defined per request, and replies stream over Server-Sent Events.
Key features & highlights
Memory measured in turns, not paragraphs
Thirty turns in, does the character still know where she came from, what she promised and what she said she would never do? With 1,000,000 tokens of input the answer depends only on what you send: put the full history in the request and the model reads the original lines, not a paraphrase of them.
A reply ceiling of 128,000 tokens
One answer can hold a full chapter, a long report or a complete refactor plan. max_tokens defaults to 4,096 and reasoning is billed as output too, so raise the cap deliberately and leave headroom above the visible answer you expect.
Sampling fixed by the model
temperature and top_p are not part of this request, which keeps a request body portable between runs. The setting you steer is reasoning effort: low for quick conversational turns, high when planted details and established facts must be reconciled first.
Request parameters
| Parameter | Required | Description |
|---|---|---|
messages | Yes | Ordered conversation turns. Content is a string, or an array of text and |
max_tokens | No | Caps the reply at 128,000 - an eighth of the read window. Default 4,096; raise it before writing a chapter. |
reasoning_effort | No | low, medium or high, medium by default. Move to high when you want planted details and established facts reconciled before the model writes. |
stop | No | Up to 4 sequences, as a string or an array. The reply ends as soon as the model writes one of them, and the matched text itself is left out. at least 1 characters · at least 1 items · at most 4 items |
tools | No | Up to 128 function definitions per request. at most 128 items |
parallel_tool_calls | No | true or false, default true: the model may request several tool calls in one turn. Default: |
tool_choice | No | auto, none, required, or an object naming one function. |
Pricing
Input $4.50 / Output $22.50 per 1 million tokens
Use cases
A persona held across dozens of turns
Send the conversation as written and the character still knows, thirty turns later, where she came from, what she agreed to and what she refuses to do. Most long exchanges need no summarisation layer at all.
Agents on long task chains
Hand over the repository, the specification and the discussion so far in one request and let the model decide what to read first. The faculty a long roleplay tests is the one a multi-step engineering task needs: at step ten, does it still remember the decision from step one?
Reports that must quote their sources
Load the full set of documents and ask for findings that cite the passage each one rests on. Nothing was chunked away before the model saw it, so a missing citation points to a gap in the material rather than in the pipeline.
Prompt guide & pro tips
Send the whole history, oldest first
The window is usually larger than the summariser someone was about to build. Put every earlier message into the messages array in order and let the model read what was actually said.
Persona, setting and limits in the system message
The system message is the one slot that never scrolls away in a long exchange. Origin, speech habits, hard limits, narrative person and tense belong there; the user message carries only the current turn.
Force a tool call for machine-readable output
There is no response_format on this endpoint, and a conversation cannot end on an assistant message to prefill the reply. Define a tool whose parameters are the JSON schema you want, set tool_choice to that function and validate the arguments; max_tokens above 128,000 and video and audio parts are rejected.
API quick start
curl --fail-with-body -sN https://api.spicyapi.ai/v1/chat/completions \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "anthropic/claude-opus-5/chat",
"messages": [
{
"role": "user",
"content": "Summarise the following release notes into three bullet points."
}
],
"stream": true
}' \
| jq --unbuffered -Rrj 'select(startswith("data: ")) | .[6:] | select(. != "[DONE]") | fromjson | if .error then "\n[error] \(.error.message)\n" else (.choices[0].delta.content? // empty) end'
See the API reference for authentication, the complete schema, polling, and error handling.














