LLM via API or Self-Hosted Model?
API is the right starting point for most organizations: no GPU operations, no MLOps team, and always current models for a variable cost per token. Self-hosting is justified mainly by data privacy, regulatory requirements, or very high volumes – but it requires GPU capacity, operational expertise, and ongoing model maintenance that often costs more than API fees.
Behind the question of which model is best lies a bigger one: should you rent the intelligence via an API, or own the operation yourself with an open model? The choice governs cost structure, expertise needs, and control for years to come – and it’s rarely decided by the technology, but by your volumes and your data requirements.
What the Choice Actually Comes Down To
Via API, you pay per token: the provider operates the model, scales capacity, and upgrades on an ongoing basis. Self-hosted means you run an open model on your own infrastructure – your own or rented GPUs – and own the entire chain from operations to model selection.
It sounds like a financial question, and partly it is. But the real dividing line runs through responsibility: with API, you buy a result; with self-hosting, you build a capability. The capability is valuable – but only if it’s put to use; building it for its own sake is the most expensive way to run a model.
The Real Cost of Self-Hosting
The calculation for self-hosting is almost always underestimated, because it doesn’t show up on a price list. Three line items dominate:
- GPU capacity. Dedicated GPU instances for serious operation often cost tens of thousands of SEK per month – and clusters for larger models or redundancy many times more. Capacity also costs around the clock, regardless of load.
- MLOps expertise. Deployment, scaling, monitoring, security, and incident response require specialist knowledge that’s expensive to recruit and hard to replace when someone’s out.
- Model maintenance. Open models are released at a rapid pace. Evaluation, swaps, and regression testing are recurring work, not a one-time effort.
| Cost item | Via API | Self-hosted |
|---|---|---|
| Model usage | Price per token | GPU operations around the clock |
| Operations and scaling | Included | Your own MLOps team |
| Upgrades | Ongoing from the provider | Your own evaluation and swap work |
| Control over data | Contract-governed | Physical – data never leaves your environment |
One more line item is often forgotten: time to first value. An API integration can be in production within days, while a self-hosted environment is measured in months – and the delay has a cost too.
Worked Example: When API Fees Win
A company builds an internal assistant used a few hundred times a day. Via API, the monthly cost becomes a variable line item that tracks usage – at that volume, typically a fraction of what a single dedicated GPU server costs per month, before a single krona has been spent on operations or staff.
At very high, steady volumes, the calculation can flip: once API fees consistently exceed what equivalent capacity costs in-house, self-hosting starts to pay off – provided the expertise is already on staff. The rule of thumb: calculate against your actual volume profile using current price lists, and scrutinize the staffing cost twice as carefully as the hardware.
The Reasons That Still Drive Self-Hosting
Sometimes the calculation is secondary. Three motives carry the most weight:
- Data privacy: data never leaves your environment – no contract in the world is stronger than not sending the data at all.
- Regulation: some organizations are required to process data in their own infrastructure, in extreme cases entirely without an internet connection.
- Independence: no external party can deprecate your model, change the terms, or raise the price.
Note that there are middle paths – EU-based GPU clouds and managed services for open models – that give you part of the control without the full operational burden. And let legal and security define the requirement together instead of assuming it: sometimes the analysis shows that an EU-processed API solution with the right contract meets the requirements at a fraction of the cost.
The 2026 Capability Gap – and When It Doesn’t Matter
In 2026, open models still lag behind the best API models in broad, general capability – particularly in long-form reasoning and complex agent workflows. But for narrowly scoped tasks, the gap is often irrelevant: well-chosen open models handle classification, extraction, internal search, and summarization with reference answers excellently. The gap is also perishable – reassess it per task and per year, not as an article of faith.
That makes task analysis the real basis for the decision. A tightly scoped task plus strong privacy requirements argues for self-hosting; broad, varied use argues for API. Evaluate the candidates on your own data before deciding – and build with an abstraction layer so the decision can be changed later. At Weapp, we help companies do exactly that analysis for their AI initiatives – get in touch if you’d like to run the numbers for your case.
Frequently asked questions
What does it cost to self-host an LLM?
It depends on model size and availability requirements. Budget for three line items: GPU capacity, which for serious operation often costs tens of thousands of SEK per month and up, MLOps expertise for operations and scaling, and ongoing work on model swaps and evaluation. Total cost often lands well above API fees for the same benefit.
Is a self-hosted model automatically safer for GDPR?
No, it gives you control but shifts the entire responsibility to you: access management, logging, patching, and incident response. A well-configured API solution with EU processing and a strong contract can be easier to defend than self-hosted operations without security resources.
Which open models are current options?
Model families like Llama and Mistral are common starting points, and the field is growing fast. Which one fits depends on license terms, language support, and task type – evaluate on your own data and check the license against your intended use.
Can we start with API and move to self-hosting later?
Yes, that's the most common and usually the wisest path. Build an abstraction layer between your application and the model from the start, so the move becomes an infrastructure project instead of a rewrite – and the decision can wait until volume or requirements justify it.
Does fine-tuning require us to self-host?
No, several API providers offer fine-tuning as a service. Self-hosting becomes relevant only when you need full control over the weights, for example for privacy reasons or specialized models – for most organizations, prompt engineering and API fine-tuning go a long way.