Anthropic Messages API

ozeye also serves the Anthropic Messages API at POST https://ozeye.ai/v1/messages, so Anthropic's own clients run on EU-hosted open models: Claude Desktop and Cowork, Claude Code, and the Anthropic SDKs. Same account, same keys, same billing as every other request. This page is the protocol reference; the setup guides live under coding agents.

Base URL for Anthropic clients: https://ozeye.ai (no /v1). The clients append /v1/messages and /v1/models themselves.

Claude Code (terminal)

export ANTHROPIC_BASE_URL=https://ozeye.ai
export ANTHROPIC_AUTH_TOKEN=oz_your_key_here
export ANTHROPIC_MODEL=glm-5.3                          # main model
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash-0731  # haiku tier and background tasks
claude

Claude Code uses its stock claude-* model names unless you set the two variables above (ANTHROPIC_DEFAULT_HAIKU_MODEL replaces the deprecated ANTHROPIC_SMALL_FAST_MODEL). Those names still work: a claude-opus-* id runs on the opus tier default, claude-sonnet-* on sonnet, claude-haiku-* on haiku (tiers below). The context meter uses count_tokens, which ozeye answers with a free estimate.

Claude Desktop and Cowork

An organisation on Claude Desktop can point Chat, Cowork and Code at a self-hosted gateway through managed settings. Set the provider to gateway, the base URL to ozeye, and either list model ids or let the app discover them:

# managed settings (MDM / JSON policy)
{
  "inferenceProvider": "gateway",
  "inferenceGatewayBaseUrl": "https://ozeye.ai",
  "inferenceGatewayAuthScheme": "x-api-key",
  "inferenceModels": ["claude-opus-ozeye-g53", "claude-sonnet-ozeye-d41f", "claude-haiku-ozeye-d4f"]
}

Auto-discovery reads GET /v1/models and only lists gateway models that carry an Anthropic family tier. ozeye assigns these:

opusglm-5.3 (default), kimi-k2.6Strongest tool use and long-horizon agentic work.
sonnetdeepseek-v4.1-flash (default)Balanced coding and reasoning at flash speed; the everyday choice.
haikudeepseek-v4-flash-0731 (default), glm-5.3-flashFast and cheap; used for quick turns and summaries.

Every other model on the models page is usable too when you list its id in inferenceModels. The auth scheme can be x-api-key (above) or the default bearer token; both read the same ozeye key.

Anthropic SDKs and curl

from anthropic import Anthropic

client = Anthropic(base_url="https://ozeye.ai", api_key="oz_your_key_here")

with client.messages.stream(
    model="kimi-k2.6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
) as stream:
    for text in stream.text_stream:
        print(text, end="")
curl https://ozeye.ai/v1/messages \
  -H "x-api-key: $OZEYE_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.3",
    "max_tokens": 512,
    "stream": true,
    "messages": [{"role": "user", "content": "Summarise the GDPR in two sentences."}]
  }'

What is translated

  • system (string or blocks), text and image blocks, tool_use / tool_result loops with parallel calls, thinking blocks replayed as the model's reasoning history.
  • tools with an input_schema and every tool_choice. Anthropic built-in server tools (bash, text editor, web search, computer use) are not available; define them as client tools.
  • thinking maps to the model's reasoning controls by budget (under 4k tokens low, under 16k medium, otherwise high); disabled turns thinking off where the deployment supports it.
  • max_tokens, stop_sequences, temperature, top_p, top_k, metadata.user_id.
  • Streams follow the Anthropic event order (message_start, content blocks, message_delta with cumulative usage, message_stop) with ping events while the model is quiet.

What is accepted and ignored

cache_control breakpoints, service_tier, output_format, context_management, mcp_servers and beta headers are accepted so clients never fail on them, and dropped. Prompt caching still happens automatically on hosts that cache identical prefixes (DeepSeek, Kimi, GLM): the usage block reports cache_read_input_tokens where the host reports them, and cached tokens bill at the cached rate.

Billing

Requests on /v1/messages are chat requests: the same models, prices, credit holds, key spend limits and logs as /v1/chat/completions. They appear in Dashboard → Usage under the model that served them.