EU Router

Anthropic-compatible API

Use your Anthropic SDK unchanged and run open models on EU infrastructure.

On this page

Anthropic SDK, EU models

Besides the OpenAI API, the Router also speaks the Anthropic API. Through /v1/messages you point your existing Anthropic client at HostYourAI with x-api-key authentication (an Authorization: Bearer header works too). You keep your tooling; inference runs on open models in the EU.

What is supported?

  • The /v1/messages shape of the Anthropic API, including count_tokens
  • Authentication via x-api-key or Authorization: Bearer
  • True token-by-token streaming (SSE), in the Anthropic event format
  • Tool calling: agents such as Claude Code, Cline and opencode can call tools
  • 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.

Je app
OpenAI · Anthropic
EU Router
één base URL
Qwen3-8B
warm
Loes (NL)
soeverein
Llama-3.3
warm

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.

Using it with Claude Code

Claude Code works directly on the Router. Set a few environment variables and pick a model from the catalog:

export ANTHROPIC_BASE_URL="https://hostyourai.com"
export ANTHROPIC_AUTH_TOKEN="hyai-rt-..."
export ANTHROPIC_MODEL="Qwen/Qwen3.6-27B-FP8"
export ANTHROPIC_SMALL_FAST_MODEL="Qwen/Qwen3.6-27B-FP8"
claude

Pick a model that supports tools, otherwise Claude Code cannot read files or run commands. GET /v1/models shows supports_tools per model and how much context is currently being served (served_context_length). Agentic coding uses a lot of context; if you want guaranteed large context for your coding sessions, email info@hostyourai.com. Other Anthropic tools such as Cline and opencode are set up the same way: base URL to HostYourAI, your own key and a model from the catalog. Everything about coding agents on our router is on HostYourAI Code.

What is supported, honestly

Anthropic featureStatus at HostYourAI
/v1/messages request and responseSupported
/v1/messages/count_tokensSupported (fast estimate)
x-api-key and Bearer authenticationSupported
System and user messagesSupported
StreamingToken by token, Anthropic event format
Tool callingSupported on models with tool support (see catalog)
Images in messagesNot yet, text-only

If you need multimodal input, use the OpenAI-compatible route on the same Router.

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?

Yes, token by token. The Router translates the stream live into the Anthropic event format, so streaming clients such as Claude Code just work.

Does Claude Code work on this?

Yes. Set ANTHROPIC_BASE_URL to https://hostyourai.com, use your HostYourAI key and pick a model from the catalog. See the example above.

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.

Everything you need for AI

From model hosting to a customer-facing API, it is built for developers and businesses who want their AI running on infrastructure they actually control, inside the EU.

100%
EU-hosted

Your data and your models stay on European GPUs. GDPR-friendly by design.

200+
Verified models, ready to serve

Llama, Qwen, DeepSeek, Mistral, FLUX and plenty more. Pick one and it is warm in minutes, with no DevOps on your end.

2 SDK
OpenAI & Anthropic compatible

Point your existing client at the Router and keep your tools. No rewrite, no lock-in.

From zero to a warm endpoint in minutes

No infra to manage. Pick a model, get an OpenAI-compatible URL, ship.

1

Pick a model

Choose from the Model Garden or paste any HuggingFace ID. Set the VRAM and pick an EU GPU.

2

Get your endpoint

We deploy vLLM, run readiness probes, and hand you a warm OpenAI- and Anthropic-compatible URL plus an API key.

3

Route and ship

Point your client at the Router. It auto-routes to a warm instance, idles GPUs when nobody is online, and logs every request.

Private by Default

HostYourAI keeps your models, prompts and data on European GPUs. It is built for teams that care about compliance, reliability and real control.

EU-hostedGDPR-friendlyOpenAI-compatiblevLLM-poweredNo lock-in
EU
Full data sovereignty

GPUs and data residency inside Europe. Your prompts never leave the EU.

Open
Models you can audit

Run open-weight models with no black boxes or hidden telemetry.

€0
Scale to zero

GPUs idle when nobody is online, so you only pay for what you run.

Yours
No vendor lock-in

Your infra, your keys, your models. Leave whenever you want.

Works with the tools you already use

The Router speaks the OpenAI and Anthropic APIs, so it drops straight into the clients and SDKs your team already runs. Just change the base URL.

Try HostYourAI for free
docker
anthropic
huggingface
langchain
python
nodedotjs
curl
ollama
jetbrains
jupyter
vercel
zapier
postman
n8n
Model garden

Works with 390+ open models

Text and image models on dedicated EU GPUs. Every model tested on our own hardware.

Related pages

Explore more about EU-hosted AI on HostYourAI.

Host. Route. Ship.

No credit card required. Pay as you go, cancel anytime.

Start Hosting Free Today