Anthropic Messages format
POST /v1/messages implements the Anthropic Messages API, so the official
Anthropic SDKs and tools such as Claude Code work
unchanged. Use it when you need Claude-specific features: extended thinking,
cache_control prompt caching and content blocks.
import anthropic, os
client = anthropic.Anthropic( base_url="https://api.wraitherix.com", # no /v1 — the SDK adds it api_key=os.environ["WRAITHERIX_API_KEY"],)
m = client.messages.create( model="claude-opus-5-5", max_tokens=1024, messages=[{"role": "user", "content": "Hello, Claude"}],)print(m.content[0].text)import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({ baseURL: "https://api.wraitherix.com", apiKey: process.env.WRAITHERIX_API_KEY,});
const m = await client.messages.create({ model: "claude-opus-5-5", max_tokens: 1024, messages: [{ role: "user", content: "Hello, Claude" }],});console.log(m.content);curl https://api.wraitherix.com/v1/messages \ -H "x-api-key: $WRAITHERIX_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-opus-5-5", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello, Claude"}] }'Streaming
Section titled “Streaming”with client.messages.stream( model="claude-opus-5-5", max_tokens=1024, messages=[{"role": "user", "content": "Count from 1 to 5."}],) as stream: for text in stream.text_stream: print(text, end="", flush=True)Supported features
Section titled “Supported features”- System prompts (string or text blocks)
- Streaming (
message_start,content_block_delta,message_stopevents) - Tool use (
tools,tool_choice,tool_resultblocks) - Image input (base64 and URL image blocks)
- Extended thinking
- Prompt caching with
cache_control
Not available: the Message Batches API, the Files API and /v1/messages/count_tokens.