On this page
Drop-in compatible with OpenAI
HostYourAI exposes an OpenAI-compatible endpoint (/v1/chat/completions). Your existing OpenAI SDK keeps working: point the base URL at our Router and use your HostYourAI API key. Streaming, system prompts and parameters behave the way you expect.
What changes in your code?
Only the base URL and the API key. The rest of your integration stays identical, whether you use Python, Node or another language. You migrate in minutes instead of weeks.
- Same request and response format as OpenAI
- Streaming over server-sent events
- Open models such as Llama, Qwen, Mistral and DeepSeek
- Optional RAG context injection when you link a knowledge base
EU-hosted and privacy-first
The models run on European GPUs you control. Your data never leaves the EU, a Data Processing Agreement (DPA) is available and the subprocessor list is public. Open weights also mean no training on your data.
Example in code
Here is what a request looks like with the OpenAI SDK. Only the base URL and the key change, and streaming behaves the way you expect:
from openai import OpenAI
client = OpenAI(
base_url="https://hostyourai.com/api/v1",
api_key="hyai-...",
)
resp = client.chat.completions.create(
model="llama-3.3-70b",
messages=[{"role": "user", "content": "Hello"}],
stream=True,
)
for chunk in resp:
print(chunk.choices[0].delta.content or "", end="")
Want a full step-by-step? Read the guide Migrate your OpenAI client to the EU Router.
What stays the same, what changes
| Part | With OpenAI | With HostYourAI |
|---|---|---|
| Endpoint | /v1/chat/completions | /v1/chat/completions, identical |
| Base URL | api.openai.com | hostyourai.com/api/v1 |
| API key | sk-... | hyai-... |
| Model name | gpt-4o, gpt-4o-mini | llama-3.3-70b, qwen3-8b and more |
| Streaming | Server-sent events | Server-sent events, identical |
| Data processing | United States | GPUs in the EU |
Frameworks built on the OpenAI API, such as LangChain and LlamaIndex, work as well: you just hand them a different base URL and key.
Questions about the OpenAI-compatible API
Does this work with LangChain, LlamaIndex and other frameworks?
Yes. Anything that accepts an OpenAI-compatible base URL works directly. You configure the base URL and your hyai- key, nothing else.
Which model replaces gpt-4o?
For general tasks Llama 3.3 70B is the common pick; for speed and low cost a smaller model such as Qwen3 8B. Compare models in the catalog or test them side by side in the Playground.
Does streaming work?
Yes, over server-sent events, exactly like OpenAI. Your existing streaming code stays unchanged.
Can I ground answers in my own documents?
Yes. Link a knowledge base and the Router automatically injects relevant context into your requests. Read the guide Build RAG on EU GPUs.
What does a request cost?
You pay per token, per model class, from one prepaid credit balance. Rates are on the pricing page.
Is this GDPR-proof?
Processing happens on European GPUs, a Data Processing Agreement is available and there is no training on your data. For regulated sectors see healthcare, finance and government.