Docs/Anthropic Messages
API

Anthropic Messages

Use the Anthropic SDK and Claude Code with Utopixel: base URL, headers, count_tokens, and calling any model through the Messages API.

Use the base URL https://utopixel.online/api with the Anthropic SDK. The SDK appends /v1/messages. The anthropic-version and anthropic-beta headers are supported, and /v1/messages/count_tokens is available for Claude Code. Any model in the catalog can be called this way: we translate the protocol both ways.

app.pypython
1import anthropic
2
3 client = anthropic.Anthropic(base_url="https://utopixel.online/api", api_key="sk-vb-...")
4 msg = client.messages.create(model="google/gemini-3.8-flash", max_tokens=1024,
5 messages=[{"role": "user", "content": "Hello"}])
Tip

The Anthropic SDK adds /v1/messages itself, so its base URL ends at /api. The OpenAI SDK base URL ends at /api/v1.

Claude Code:

terminalshell
1ANTHROPIC_BASE_URL=https://utopixel.online/api ANTHROPIC_AUTH_TOKEN=sk-vb-... claude