For most European products, an LLM API is the better start than a self-hosted LLM. Below high, steady volume it costs less, and providers now offer in-region processing and zero data retention. Self-host an open-weights model when contracts or regulators require that data never leaves your infrastructure, or when steady volume makes a GPU server cheaper.
- The cost line: 100,000 requests a month on Claude Sonnet 5.5 cost about $900 in tokens. One Hetzner server with a 96 GB GPU costs from €1,499 a month before anyone runs it.
- The data line: API data is not used for training by default, but retention differs: OpenAI keeps abuse-monitoring logs for up to 30 days unless you get zero data retention.
- The practical answer: start on an API with EU processing, keep the model behind one setting in your code, and move only the workloads that need it to your own servers.
Self-hosted LLM or API: what is the real choice?
A self-hosted LLM is a language model that runs on servers you control: your own hardware, a rented GPU server, or GPU instances in your cloud account. You download open weights, run them with an inference server such as vLLM, and every prompt stays inside your infrastructure.
An API means you send each request to a provider such as OpenAI or Anthropic, directly or through a cloud platform like Amazon Bedrock, and pay per token. You get the strongest models with no servers to run, and you accept the provider’s terms on where data is processed and how long it is kept.
For a founder or CTO, the question is rarely “which is better”. It is which of three things you are actually short of: control over data, predictable cost at volume, or engineering time. Self-hosting buys the first two and spends the third.
GDPR and data retention: what the APIs actually keep
The most common reason European teams look at self-hosting is personal data. Before deciding, read what the API terms say today. They have changed a lot in two years.
| Question | OpenAI API | Anthropic Claude API |
|---|---|---|
| Used for training? | No, unless you opt in | Never without your express permission |
| Default retention | Abuse-monitoring logs kept up to 30 days | Prompts and outputs not retained by default; some models require 30-day retention |
| Zero data retention | For approved customers, on eligible endpoints | Enabled per organisation through Anthropic’s sales team |
| Where it is processed | European data residency for new API projects, handled in-region with zero data retention | US-only or global on the first-party API; regional endpoints through cloud platforms |
| Exceptions | Some endpoints store state even with zero retention, such as files and assistants | Content flagged by safety systems may be kept up to 2 years |
Three practical points follow. First, OpenAI’s European data residency applies to new projects only: an existing project cannot be switched, so plan it before launch. Second, Anthropic’s first-party API offers a US-only option at 1.1 times the standard price, but no EU option; for EU processing you would use a cloud platform’s regional endpoint, which costs 10% more than its global one. Third, zero retention removes stored logs, but it does not remove the provider as a processor: you still need a data processing agreement and a line in your privacy policy.
Self-hosting does not make you compliant on its own either. Your prompts and logs now sit on your servers, and access control, retention and deletion become your job. What it does give you is a simple sentence for customers and auditors: “the data never leaves our infrastructure”.
LLM API cost against a GPU server
Cost arguments for self-hosting usually skip the arithmetic. Here it is for one realistic feature: a support assistant that sends about 2,000 tokens of context and question and gets about 500 tokens back per request.
| Option | 100,000 requests a month | 1,000,000 requests a month |
|---|---|---|
| Claude Haiku 5.5 ($0.10 in, $0.50 out per million tokens) | $45 | $450 |
| Claude Sonnet 5.5 ($2 in, $10 out) | $900 | $9,000 |
| Claude Opus 5.5 ($4 in, $20 out) | $1,800 | $18,000 |
| Self-hosted, one 96 GB GPU server (Hetzner, from €1,499 a month) | €1,499 + people | €1,499 + people, if one server keeps up |
| Self-hosted, two servers for redundancy | €2,998 + people | €2,998 + people |
Token prices are from Anthropic’s price list; server prices are Hetzner’s monthly rates before VAT; the 96 GB servers also carry a one-off setup fee equal to one month. Two things stand out. At 100,000 requests a month, even the most capable API model costs about the same as a single GPU server with no backup. And the small API model is so cheap that self-hosting rarely beats it on cost at any volume a typical product reaches.
The column that is missing is people. A self-hosted model needs someone to size the hardware, run the inference server, monitor it, patch it, test new model versions and be on call when it stops answering. That is a real share of a senior engineer’s time, every month, and for most teams it is the largest cost.
Self-hosting starts to win on cost when three things are true together: steady, high volume around the clock, a task that an open-weights model handles as well as the API model you would otherwise use, and a team that already runs production infrastructure.
What a self-hosted LLM needs to run
Model size decides the hardware. As a rule of thumb, a model’s weights need about 2 bytes of GPU memory per parameter at 16-bit precision, and roughly a quarter of that when quantised to 4-bit, plus headroom for the context of requests in flight.
- Small models (up to about 13 billion parameters): fit one 48 GB GPU. AWS positions its G6e instances, with 48 GB per GPU, for models of that size. Good for classification, extraction and short answers.
- Mid-size models (about 30 to 70 billion parameters): need a 96 GB GPU or several smaller ones, usually quantised. Hetzner’s 96 GB servers run in Falkenstein, Germany and Helsinki, Finland.
- Large open-weights models: need multi-GPU servers. AWS G6e goes up to 8 GPUs and 384 GB of GPU memory in one instance; Hetzner offers 4 GPUs with 384 GB in total for €3,599 a month.
Hosting in your own AWS account in an EU region keeps the model next to your database and inside the security controls you already have. A dedicated GPU server costs less per month but sits outside them, so the network path, keys and logs need setting up from scratch.
Tell us what the AI feature does, how many requests you expect and what your contracts say about data. You’ll get a reply within 1 business day with the option we would test first.
When to self-host an LLM, and when to use an API
| Your situation | What we would do |
|---|---|
| First AI feature, volume unknown | API. Measure real usage and quality before buying hardware |
| Personal data, customers ask for EU processing | API with EU processing and zero data retention, plus a data processing agreement |
| Contracts or regulators say data must never leave your infrastructure | Self-host an open-weights model in your EU cloud account or on your own servers |
| Hard reasoning, long documents, coding agents | API. The strongest models are not available as open weights |
| Millions of short, repetitive tasks every day | Test a small open-weights model against a small API model; self-host only if it wins on quality and total cost |
| Must work offline or on a private network | Self-host |
| Mixed workloads | Both: route sensitive or high-volume tasks to your own model, everything else to the API |
The hybrid setup most products end up with
The choice does not have to be permanent, and it does not have to be one or the other. The products that handle this well do three things from the start.
- Keep the model behind one setting. One interface in your code, with the provider and model as configuration. Switching from an API to your own server, or to the next model, becomes a deployment, not a project.
- Build an evaluation set. A few hundred real requests with known good answers. Every candidate model runs against it before it touches users, so “the open model is good enough” is a measured fact, not a hope.
- Log cost and quality per feature. Tokens, latency and error rate for each AI feature. When a workload crosses the line where a GPU server pays off, you will see it in the numbers.
New open-weights models keep narrowing the gap. Amazon’s first one shows the pattern: cheap through an API, free to run yourself, but with routing limits for European data. Our analysis of Amazon Ergo and what it means for your product walks through that trade-off for one model.
Where to start this month
- Read your contracts and privacy policy. They decide whether EU processing through an API is enough or the data must stay with you.
- Estimate tokens per request and requests per month. Ten minutes with a spreadsheet tells you which column of the cost table you are in.
- Prototype on an API with EU processing turned on, and collect the requests that become your evaluation set.
- Revisit self-hosting when volume, contracts or a new open model change the numbers.
We build AI features into web and mobile products, choose and test the models behind them, and run the infrastructure when a model needs to live in your own AWS account: see our AI integration services and our AWS cloud and DevOps work. At scale, cost per request decides the architecture: the Dropship.ai case study shows a pipeline that re-checks about 60 million products a day. If customers also want to use your product from Claude or ChatGPT, read what an MCP server is. To keep a senior team on the product month to month, see how we work with clients.
Quick answers
What is a self-hosted LLM?
A language model that runs on servers you control, such as a GPU server or GPU instances in your own cloud account. You download open weights and run them with an inference server, so prompts never leave your infrastructure.
Is a self-hosted LLM cheaper than an API?
Usually not at typical product volumes. 100,000 requests a month cost about $900 on Claude Sonnet 5.5 and about $45 on Claude Haiku 5.5, while one 96 GB GPU server starts at €1,499 a month before engineering time.
Do OpenAI and Anthropic train on API data?
Not by default. OpenAI does not use API data for training unless you opt in, and Anthropic does not use retained data for training without your express permission.
Can I use an LLM API under GDPR?
Yes, with a data processing agreement, a lawful basis and clear retention terms. OpenAI offers European data residency for new API projects with zero data retention; other models are available through cloud platforms’ regional endpoints.
How long do LLM APIs keep my data?
OpenAI keeps abuse-monitoring logs for up to 30 days unless you are approved for zero data retention. Anthropic does not retain prompts and outputs by default, except for some models that require 30 days and content flagged by safety systems.
What hardware does a self-hosted LLM need?
Roughly 2 bytes of GPU memory per parameter at 16-bit precision, a quarter of that at 4-bit, plus headroom. A 13-billion-parameter model fits one 48 GB GPU; larger models need 96 GB or several GPUs.
Can I start with an API and self-host later?
Yes, if the model sits behind one interface in your code and you keep an evaluation set of real requests. Moving a workload then becomes a configuration change and a test run.
Sources
Version numbers, dates and commands in this article come from the primary sources below. Check them before you act, since advisories are updated.
- OpenAI API documentation: Data controls in the OpenAI platform
- OpenAI: Introducing data residency in Europe, 5 February 2025
- Anthropic: API and data retention
- Anthropic: Claude API pricing
- Hetzner: GPU servers
- AWS: Amazon EC2 G6e instances
Want this handled for you? Cloud & DevOps on AWS · AI integration services · MCP server development · Integrations & automation
Serhii runs Shapelab, a web and mobile development agency in Tallinn, Estonia. The team builds web products, takes them over from other teams and looks after them in production, servers included.