Skip to content
WRAITHERIXDocsENRU

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)
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)
  • System prompts (string or text blocks)
  • Streaming (message_start, content_block_delta, message_stop events)
  • Tool use (tools, tool_choice, tool_result blocks)
  • 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.