On this page
Anthropic SDK, EU models
Besides the OpenAI API, the Router also speaks the Anthropic API. Through a /v1/messages shim you point your existing Anthropic client at HostYourAI with x-api-key authentication. You keep your tooling; inference runs on open models in the EU.
What is supported?
- The
/v1/messagesshape of the Anthropic API - Authentication via
x-api-key - Text conversations with system and user messages
- The same open models as the OpenAI route
This lets you use one platform for both OpenAI- and Anthropic-based applications, without two separate vendors.
One Router, two APIs
Whether your team uses the OpenAI or the Anthropic SDK, both point at the same Router and the same EU GPUs. That simplifies your stack and keeps all your inference inside Europe.
Example in code
With the Anthropic SDK you set the base URL to the Router and use your key as x-api-key:
from anthropic import Anthropic
client = Anthropic(
base_url="https://hostyourai.com",
api_key="hyai-...",
)
msg = client.messages.create(
model="llama-3.3-70b",
max_tokens=512,
messages=[{"role": "user", "content": "Hello"}],
)
print(msg.content[0].text)
Prefer the OpenAI SDK? The same Router also runs our OpenAI-compatible API.
What is supported, honestly
| Anthropic feature | Status at HostYourAI |
|---|---|
/v1/messages request and response | Supported |
x-api-key authentication | Supported |
| System and user messages | Supported |
| Streaming | Buffered: the answer returns in one piece |
| Images in messages | Not yet, text-only |
If you need true token-by-token streaming or multimodal input, use the OpenAI-compatible route on the same Router; it supports both fully.
Questions about the Anthropic-compatible API
Why use this instead of the Claude API?
Because your code is already built on the Anthropic SDK and you want to move processing to the EU. You change the base URL and the key; your application stays the same. See also the Claude API alternative.
Am I running Claude models then?
No. You call open models such as Llama, Qwen and Mistral, served on European GPUs. The API shape is Anthropic; the models are open weights from the catalog.
Does streaming work?
Streaming requests are accepted but answered buffered: you receive the full answer in one piece. For token-by-token streaming, use the OpenAI route.
Can I mix OpenAI and Anthropic clients?
Yes. Both routes run over the same Router, the same API key and the same credit balance. Useful when different teams use different SDKs.
Where does my data run?
On GPUs in European datacenters. Your prompts never leave the EU, a Data Processing Agreement is available and there is no training on your data.
What does it cost?
The same as the OpenAI route: per token, per model class, from one prepaid balance. See the pricing page.