Introduction
Claude Opus 4.5 is an Opus-tier chat model from Anthropic, served here on one OpenAI-compatible endpoint at /v1/chat/completions. A 198,000-token window holds dozens of turns of history verbatim, and a single reply can run to 32,768 tokens - long enough for a full scene or a short chapter.
It accepts temperature (0 to 1, default 1) and top_p alongside reasoning effort at low, medium or high. Message content is text and images, up to 128 tools can be attached to a request, and replies stream over Server-Sent Events when you ask for it.
Key features & highlights
A 198,000-token window, read as written
Thirty turns into a roleplay, what slips first is memory, not prose: where the character came from, what she agreed to, the line she said she would not cross. 198,000 tokens keeps that history in the request verbatim, so the model reads the original lines rather than a summary that has already dropped the ones that mattered.
Sampling you can still tune
temperature runs from 0 to 1 with a default of 1, and top_p from 0.01 to 1. Lower the temperature for a continuity pass that must not invent anything new, and leave it at 1 for dialogue that should surprise you. Reasoning effort is a separate setting at low, medium or high.
Structured output through a forced tool call
There is no response_format on this endpoint, so machine-readable output goes through tools: up to 128 function definitions per request, with tool_choice set to auto, none, required or one named function. Put the JSON schema in a tool's parameters, force that tool and validate the arguments that come back.
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 32,768 - about a sixth of the read window. Default 4,096; raise it before writing a chapter. |
reasoning_effort | No | low, medium or high, medium by default. Raise it when the answer has to reconcile details 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 |
temperature | No | 0 to 1, default 1. Hold it at 0 whenever the reply is parsed by code, and leave it alone once a work has settled on a voice. |
top_p | No | 0.01 to 1. Adjust this or temperature, never both in the same comparison. |
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
Character chat that stays in character
Send the character sheet in the system message and the running transcript as messages. Dozens of turns later the model can still quote what was promised in turn three, because turn three is still in the request.
Scene-length continuations
32,768 tokens is roughly a long scene or a short chapter. Ask for the next scene with max_tokens raised from the 4,096 default and it arrives as one piece instead of three fragments joined by hand.
Story state your app can store
Define a tool such as update_story_state with fields for location, relationships and open threads, force it every few turns and save the arguments in your app. The prose and the state come from the same context, so they do not contradict each other.
Prompt guide & pro tips
Keep persona and limits in the system message
Origin, speech habits, hard limits, narrative person and tense belong in the system message, which never scrolls out of the request. Keep the user message for the current turn only, so a later trim cuts transcript, never character.
Raise max_tokens before you ask for length
The default of 4,096 tokens covers a few pages. For a full scene, set max_tokens explicitly, up to 32,768; a reply cut off mid-paragraph is harder to rescue than one that was planned to be short.
Know where the window ends
At roughly six tokens read for every one written, a request that asks the model to reproduce a long input hits the reply cap first, and max_tokens above 32,768 fails validation. Video and audio parts are rejected, and the 198,000 tokens cover the system prompt, the history and every tool result together.
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-4.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.














