When does running your own LLM make sense?
Self-hosting a model buys control and costs effort. For most companies an API is right, with three clear exceptions.
Running your own model makes sense in three cases: the data cannot leave your control, the volume is high and steady enough to keep a machine busy, or you need a tuned model and want to decide exactly which version runs. If none of those applies, a hosted API is the better choice. Open-weight models are now good enough that this is a real decision, and it turns less on the model than on your constraints.
What running your own model involves
An open-weight model is one whose trained weights you can download and run. You put it on a machine you rent or own, and serving software turns it into a service your applications can call. vLLM, a serving library that began at UC Berkeley's Sky Computing Lab, is built for this job. It offers an OpenAI-compatible API server, so software written for a hosted API can often be pointed at it with small changes. For a trial on a single workstation, tools such as Ollama are simpler. Ollama is listed, with its licence, in our open-source directory.
Three reasons that hold up
- The data cannot leave: regulated records, or a client contract that forbids sending them to a third party.
- The volume is high and steady, so a fixed machine costs less than paying per request.
- You need a model tuned to a narrow task and want to control exactly which version runs.
Each of the three is a constraint you can write down and check. The first is about a contract or a regulator, the second about arithmetic, the third about control. The third also depends on an earlier question, whether you need a tuned model at all, which we cover in RAG or fine-tuning.
Reasons that do not
"It will be cheaper" is rarely true at low volume: a machine that sits idle still costs money, and someone has to keep it running. "It will be more private" is only true if the alternative was sending data somewhere you had not agreed to; most API providers offer terms that keep your data out of training.
The privacy point is worth checking at the source. OpenAI's data guide says data sent to its API is not used to train its models unless you opt in. Anthropic's privacy centre says the same of its commercial products by default. Not trained on is not the same as not stored, though. OpenAI's guide says abuse-monitoring logs are kept for up to 30 days by default, and that zero data retention needs its approval. Read the retention terms as well as the training terms, and compare both with what your own contracts allow.
API or your own model
| Question | Hosted API | Your own model |
|---|---|---|
| Where the data goes | To the provider, under its terms | Stays on machines you control |
| How you pay | Per request, and nothing when idle | For the machine, busy or idle |
| Which models | The provider's range, including its largest | Open-weight models that fit your hardware |
| Who keeps it running | The provider | Your team |
| Which version runs | The provider retires versions on its own schedule | You decide, and you do the upgrades |
| Getting started | An account and a key | Capacity, serving software and testing first |
Open-weight is not one licence
A downloadable model still comes with terms, and they differ. Meta's Llama 4 Community License asks anyone who distributes the model, or a product built on it, to display "Built with Llama" prominently and to follow its acceptable use policy. It also requires companies above 700 million monthly active users to request a licence from Meta. Google's Gemma Terms of Use bind earlier Gemma models to a prohibited use policy and reserve Google's right to restrict use it believes breaks the terms. The same page sends readers of Gemma 4 to a separate licence, which is the Apache 2.0 text. Two model families, three sets of terms.
None of this is unusual, and none of it need stop you. It is the same check we describe for software in open source is not one licence: open the licence itself, and read it against how you plan to use the model. That reading belongs with whoever signs off your contracts, before the weights are downloaded.
What you take on
- Hardware or cloud capacity sized for your peak, not your average.
- Serving, scaling, monitoring and updates.
- Evaluating each new model yourself before switching.
- Security of the machine and of the model's inputs and outputs.
The third item is the one most often skipped. With an API, a new model version arrives already served and maintained. On your own machine, choosing it, testing it and rolling it out is your work. Keep a set of real cases with known good answers and run it on every change, so that a switch of model is a measured decision.
A middle path
Many teams keep a hosted model for the hard reasoning and run a small open model for the routine, high-volume steps. Putting a routing layer in front lets you change that split without rewriting the application.
LiteLLM is one open-source example of such a layer: a gateway that calls more than a hundred model providers in one format and handles retries and fallback between them. Its enterprise features sit under a separate commercial licence, which is the open-core pattern again. The gain is practical. The application talks to one address, and which model answers behind it becomes a setting you can change.
How to decide
- Write down the constraint: where data may go, how many requests a day, and how fast a reply must be.
- Check the three reasons against it. If none applies, use an API and revisit the question when your volume changes.
- If one does apply, pick a candidate model and read its licence.
- Run your own test cases through that model before you size any hardware.
- Price the machine for your peak hour, add the people who will run it, and compare the total with the API bill at the same volume.
- Put a routing layer in front, so the answer can change when your volume does.
Stopping at step two is a good outcome, not a failure of ambition. If you reach step five and would like the sums checked, get in touch.
Common questions
Is running our own model cheaper than an API?
Only when the machine is kept busy. A GPU server costs the same whether it handles ten requests or ten thousand, and the staff time is real. Work out your steady volume first. Below the point where the machine is mostly occupied, paying per request wins.
Is our data safe with an API provider?
That depends on the terms you sign, not on the technology. The large providers publish their training and retention terms, and some offer stricter options on request. Whether those terms satisfy your regulator or your client's contract is a question for whoever advises you on compliance.
Do we have to buy our own GPUs?
No. Running your own model can mean renting GPU capacity inside a cloud account you control, which keeps the data in your own environment without a hardware purchase. We would rent until the volume is proven, and consider buying only after that.
Can we switch between an API and our own model later?
Yes, if you plan for it. Keep prompts, test cases and integrations independent of any one provider, and put a routing layer between the application and the model. Moving a workload from an API to your own machine, or back, is then a change of configuration and a test run, not a rebuild.