In short
Start with a hosted model unless you have a specific reason not to: it's the fastest route, with no servers to run. Open models make sense when you have strict data rules, need offline use, want deep customisation, or have steady, high volume that makes your own hardware cheaper. You can also get open models through hosted APIs. Keep your code provider-neutral, so that you can switch.
First, get the terms straight
Hosted (closed) models are those like GPT, Claude or Gemini. You call an API, and the provider runs everything. You can't download them.
Open-weight models are those such as DeepSeek, Llama, Qwen or Gemma. You can download the weights. Note that “open source” is often used loosely here: many of these don't share their training data, and licences vary, with some including commercial restrictions. So read the licence.
Here's the part that many comparisons miss: open doesn't have to mean self-hosted. There are three ways of running them:
- Through a provider's API, such as DeepSeek's own API, or a host of open models
- On your own rented GPUs
- On your own hardware
So you could use an open model with no infrastructure at all. See cheapest way to run an LLM.
The comparison
| Hosted closed model | Open model, via API | Self-hosted open model | |
|---|---|---|---|
| Setup | Minutes | Minutes | Days to weeks |
| Top-end quality | Usually strongest | Close on many tasks | Depends on your hardware |
| Cost pattern | Per token | Per token, often lower | Fixed; hardware and staff |
| Data leaves your systems | Yes | Yes | No |
| Model can be retired | Yes, by the provider | Your host may drop it | No, you keep the weights |
| Customisation | Limited | Some | Full |
| Who fixes outages | Provider | Provider | You |
Cost: the common mistake
“It's free, we'll just run it ourselves” is a frequent error. The weights may be free, but you're also paying for:
- GPUs, whether or not they're busy
- Engineering time for setup, updates and monitoring
- Redundancy, if the service matters
- Lower speed or quality, if you underprovision
Self-hosting tends to win only when you have heavy, steady usage which keeps the hardware busy. A low-volume feature on a dedicated GPU will usually cost far more than an API. See self-hosting an LLM vs an API and LLM API pricing compared.
Engineering time
Redundancy
Lower quality if underprovisioned
Run this calculation with your own numbers. Estimate your monthly tokens, price them on the API, and compare with a realistic self-hosted figure, including staff. Before doing this, try cutting your API bill.
Quality
Top hosted models generally lead on the hardest tasks, such as complex reasoning and difficult coding. But open models have become very capable, and many tasks don't need the best: classification, extraction, summarising and simple drafting. Benchmarks won't tell you what will happen on your data, so run your own tests. See how to evaluate an LLM feature.
Privacy
If data can't leave your environment, for reasons of law, contract or policy, then self-hosting may be the deciding factor.
But it isn't the only option. Enterprise agreements with major providers can offer stronger terms on training and retention, and some offer regional processing. A cloud-hosted model in your own cloud account can be a middle ground. See is it safe to send customer data to an LLM?
Also be careful about “open model via API”. If the data goes to a third-party host, you're trusting them instead. Where they're based and what their terms say both matter.
And self-hosting doesn't automatically make you secure. You've now got servers to protect. See is MCP secure? for one of the wider risks.
Control and stability
Hosted models get updated and retired, and behaviour can shift. Pricing and terms can change as well. With downloaded weights, the model you tested stays exactly the same, which can be important for regulated or heavily tested systems.
That said, you'll also need to choose when to update, and you won't automatically get improvements.
A decision framework
| If this describes you | Start with |
|---|---|
| Building a first AI feature | Hosted API |
| Need top quality on hard tasks | Hosted API |
| Simple tasks, cost-sensitive | Small hosted model, or open model via API |
| Strict rules against sending data out | Self-hosted open model |
| Need to run offline or on devices | Self-hosted or on-device open model |
| Heavy, steady volume with GPU skills | Compare self-hosting |
| Need to fine-tune weights deeply | Open model |
The hybrid approach
Many mature systems use more than one kind of model:
- A small, cheap model for routine steps
- A top hosted model for hard ones
- A local model for sensitive data
Route each task to the cheapest option that passes your tests. See how to choose an LLM for your product. It adds complexity, so start only when the savings or privacy gains justify it.
Stay flexible
Whichever you choose, this field moves fast, so avoid locking yourself in:
- Put model calls behind one small piece of your code, so that swapping is easy.
- Keep an evaluation set of real cases, so you can test a new model in an afternoon.
- Prefer OpenAI-compatible interfaces, which most local tools support, such as LM Studio's server and vLLM or Ollama.
- Avoid provider-specific features unless they earn their place.
- Plan for failure. See how to handle LLM failures gracefully.
How to try it cheaply
Before you buy any hardware, run an open model on your laptop to get a feel for it. See run an LLM on a Mac or hardware requirements for local LLMs. Next, try the same model through a hosted API to judge quality without hardware. Only then decide whether running your own server is justified.
If you'd like help choosing models for a real product, including the cost and privacy trade-offs, book a call.
Common questions
Should I use an open-source model or OpenAI?
Most teams should begin with a hosted API, such as OpenAI, Anthropic or Google, because it's quick and high quality. Consider open models if you have strict data rules, need offline use, want control over versions, or have high, steady volume.
Are open-source AI models cheaper?
Not always. The weights may be free, but self-hosting needs GPUs and staff, and they cost money even when idle. Open models through a hosted API are often cheap, without those costs. Self-hosting usually pays off only at heavy, steady usage.
Are open-weight models really open source?
Often not in the strict sense. Many share weights, but not training data, and licences can restrict use. Open-weight is the more accurate term. Check each model's licence before using it commercially, as terms vary widely.
Is self-hosting a model more private?
It can be, because your data needn't leave your systems. But you become responsible for securing those systems, including logs and backups. For many companies, an enterprise agreement or a model in their own cloud account may be sufficient.