Your OpenAI code, answered in the EU.
The API speaks the OpenAI chat completions format. Change the base URL, pick a tier instead of a model name, and your SDK, framework and retry logic keep working.
10 requests free to try. Then prepaid credit from €10, valid for 24 months. No subscription.
from openai import OpenAI
client = OpenAI(
api_key="ua-...",
base_url="https://api.europeanailab.eu/v1", # the only line that changes
)
resp = client.chat.completions.create(
model="eu-standard", # a tier, not a model name
messages=[{"role": "user", "content": "Summarise this contract in five points."}],
)Four tiers, two rates each.
Input and output tokens are priced separately, per million, in euros excluding VAT. The models behind each tier are on AI transparency.
| Tier | Input per 1M tokens | Output per 1M tokens | Context window |
|---|---|---|---|
Liteeu-lite | €0.40 | €1.60 | 131,072 tokens |
Standardeu-standard | €0.70 | €3.50 | 262,144 tokens |
Long contexteu-long | €1.00 | €2.00 | 1,000,000 tokens |
Proeu-pro | €4.00 | €12.00 | 1,000,000 tokens |
Work out what your own volume costs on pricing.
The parts of the API you actually use.
Code samples for each of these are in the docs.
Streaming
Tokens arrive as they are generated. With
include_usage, the last chunk carries the token count, so a streamed request is metered exactly.Function calling
Pass
toolsas you do with OpenAI. The model returns the call and its arguments; your code runs it.Structured output
Ask for JSON against a schema with
response_formatand get back something your code can parse.Response headers
Every response says what it cost:
X-EU-Tokens-In,X-EU-Tokens-Out,X-EU-Cost-EURandX-EU-Balance-EUR, plusX-EU-Model-Tier.Limits you set
Requests per minute per key and per account, plus daily and monthly ceilings in euros that you choose. A limit returns a 429 with
Retry-After.Routing you can see
If a model fails or refuses a legitimate question, we may send the request to another model on EU infrastructure. The
X-EU-Routedheader tells you.
Prepaid, no subscription.
You pay for what you send, from a balance you top up yourself.
Top up from €10
Pay by iDEAL, SEPA direct debit, Bancontact or card. Credit stays valid for 24 months.
Pay per request
Each request takes its exact cost off your balance. A request starts when there is at least €0.05 on it.
A cap for new accounts
For the first 48 hours, a new account spends at most €25 a day, whatever the balance.
Credit is for the API only
The chat is a separate plan at €13 a month. Credit never pays for it, and the plan never pays for API calls.
What we promise, and what we don't.
The full list of companies in the path is on subprocessors.
- True: All AI inference runs on infrastructure inside the European Union.
- True: Prompts and outputs never go to the US or China.
- True: Nothing you send is used to train a model.
- Not true: “No data ever leaves the EU.” We do not say that. Hosting, the database and payments run at providers listed on subprocessors.
What it does not do yet
- No throughput SLA. Details are on pricing.
- Text generation only: no endpoints for embeddings, images or audio yet.
- You buy a tier, not a model. When we replace the model behind a tier, we tell you.
Frequently asked questions
Is the Union AI API compatible with the OpenAI SDK?
Yes. It speaks the OpenAI chat completions format, so the official SDKs, LangChain and the Vercel AI SDK work once you change the base URL and use a Union AI key. You pick a tier, such as eu-standard, where you would put a model name.
What does the API cost?
Each tier has a price per million input tokens and per million output tokens, in euros excluding VAT. There is no subscription and no monthly minimum: you top up credit from €10 and each request takes its exact cost off your balance.
Can I pay for the API with my chat subscription?
No. Credit is for the API only, and the chat is a separate plan at €13 a month. You can have both on one account, each billed on its own.
Does the API support streaming and function calling?
Yes, both, plus structured output against a JSON schema. A streamed response carries token usage in its last chunk, so you can meter it as precisely as a normal one.
Where does my API data go?
Every inference runs on infrastructure inside the European Union, and prompts and outputs never go to the US or China. Nothing you send is used to train a model. The companies in the path, such as for hosting and payments, are listed on the subprocessors page.
Start with AI for Europeans.
Use AI without sending your data abroad, everything on European servers, at a European price.
€13 a month for the chat, cancel any time. Or per token from €10 of credit.
Not sure yet? Take the 60-second quiz →