Renting intelligence or owning the hardware: a decision guide

The open-source scene around AI keeps producing tools that replace hosted services: local voice assistants instead of per-minute real-time APIs, code search engines that compute embeddings with any OpenAI-compatible server on your own machine, and speech services that advertise prices far below the big providers. The pitch is always the same: your data stays home and the meter stops running.
Hosted APIs answer with convenience: no hardware, no maintenance, the strongest models and capacity on demand. Which side is right depends on your workload, your data, your budget and how much operations work you are willing to do. This comparison lays out the trade-offs honestly, including where each option clearly wins.
We also cover a third option that often gets overlooked: a free hosted endpoint for an open-weight model, like the free-ai endpoint on this site. This site is not affiliated with OpenAI, and nothing here is a claim about any provider's current prices; check their pricing pages.
Frequently asked questions
What does self-hosting an LLM mean?
Running an open-weight model on hardware you control, a desktop GPU, a workstation or a rented server, using inference software such as llama.cpp, Ollama, LM Studio or vLLM. Many of these expose an OpenAI-compatible API, so existing client code works unchanged.
How does an open-weight model differ from an open-source one?
Open-weight means the trained parameters are downloadable, often under a license with conditions. Open-source in the strict sense would also include training code and data. Most popular local models are open-weight, not fully open-source.
Which is cheaper over time?
For low or irregular usage, hosted APIs are usually cheaper because you pay nothing when idle. For constant high volume, owned or rented hardware can win, but only if it is well utilized. Do the arithmetic with your own volumes and current provider prices.
Which gives better quality?
The strongest commercial hosted models generally lead on complex reasoning, coding and multimodal tasks. Good open-weight models are competitive on many everyday tasks and can be fine-tuned, but matching frontier quality locally needs a lot of hardware.
Is self-hosting more private?
Data that never leaves your machine cannot be logged by a provider, which is a real advantage for sensitive work. You still need to secure the machine itself. Hosted services vary widely in what they log and retain, so read their policies.
What hardware does a 35B-class model need?
Running a model of that size at usable speed generally requires a GPU or unified-memory machine with a lot of memory, especially with longer contexts, and quantized versions reduce the requirement at some quality cost. Requirements depend heavily on the inference software and settings.
Where does a free hosted endpoint fit?
It gives you an open-weight model without buying hardware or paying per token, at the cost of strict limits and no SLA. It is a good way to test whether an open-weight model is good enough for your task before investing in hardware.
Can I switch between hosted and local without code changes?
Usually yes, if both expose an OpenAI-compatible endpoint. Keep the base URL and model name in configuration. Differences in supported parameters may still require small adjustments.
The three options side by side
It helps to compare three shapes rather than two: a paid hosted API from a commercial provider, a model you run yourself, and a free hosted endpoint for an open-weight model. They differ on cost structure, quality ceiling, privacy, effort and reliability.
No option wins on every axis. A commercial API is the easiest path to the best models. Self-hosting gives control and privacy. A free hosted open-weight endpoint costs nothing and needs no hardware, but comes with tight limits.
What you are really buying
With a hosted API you buy someone else's operations team and hardware fleet. With self-hosting you buy independence and take on that work yourself.
Hidden effort
Self-hosting time includes updates, monitoring, model upgrades and debugging driver issues. Count it honestly; it is often the largest cost.
- Paid hosted API: top quality, scales instantly, pay per token, data leaves your network, provider SLA.
- Self-hosted: full control, data stays local, hardware and maintenance cost, quality limited by what you can run.
- Free hosted open-weight: no cost, no setup, strict per-IP limits, no SLA, text only in this case.
Cost: per token versus per hour
Hosted APIs charge per token, so cost tracks usage exactly and is zero when you are idle. Self-hosting charges per hour of hardware, whether you use it or not. The crossover depends on how busy you can keep the hardware.
Services that advertise dramatically lower prices than the big providers, for speech or text, usually achieve it by running open models on efficient infrastructure. That can be a perfectly good deal; just compare like with like, since a cheaper model is not the same product as a frontier one.
Utilization decides
A GPU that runs at full load around the clock can be economical. One that sits idle most of the day is an expensive way to answer a few requests.
Run your own numbers
Estimate monthly tokens, multiply by current hosted prices, and compare with hardware or rental cost plus your time. Prices for both change often, so revisit the comparison periodically.

Quality and capabilities
Leading commercial models are trained at a scale few organizations can match, and they bring extras like vision, audio and tool ecosystems. For complex reasoning, long agent chains or multimodal input, a top commercial model clearly wins today.
Open-weight models have closed much of the gap on everyday tasks: drafting, summarizing, classification, extraction and many coding chores. They can also be tuned for specific behavior. The free-ai model, for example, is an independent open-weight model of about 35B parameters fine-tuned to refuse far less than commercial assistants, while keeping two hard rules against sexual content involving minors and mass-casualty weapon instructions.
Match model to task
Many systems use a strong hosted model for the hardest step and a smaller open model for everything else. The split often cuts costs substantially without hurting results.
Quantization trade-offs
Running a model locally often means using a quantized version that stores weights at lower precision. It saves memory and speeds things up, but very aggressive quantization can reduce quality noticeably on reasoning and long-context tasks. Test the exact quantized file you plan to deploy rather than assuming it behaves like the full-precision model described in benchmarks.
Privacy and data control
Self-hosting is the only option where you can guarantee that prompts never leave your infrastructure. For source code, medical notes, legal drafts or anything under strict contracts, that guarantee can settle the decision on its own.
Hosted services, paid or free, receive your data. Policies differ: some offer zero-retention options for business customers, some log metadata, some use data for improvement unless you opt out. The free endpoint here keeps a technical record per request, with time, IP, User-Agent, country, endpoint, status, latency, sizes and tokens, and no conversation content between calls.
Local is not automatically secure
A self-hosted server exposed to the internet without authentication is worse than a reputable hosted API. Bind local inference servers to localhost or a private network.
Redaction helps everywhere
Whichever route you choose, strip secrets and personal data you do not need. See keeping secrets out of prompts.

Effort and reliability
A hosted API is a URL and a key. A self-hosted model is a stack: drivers, inference server, model files, quantization choices, a process manager, monitoring and updates. Tools like Ollama and LM Studio make the first run easy; keeping a production service healthy is still real work.
Reliability flips depending on scale. A large provider has redundancy you cannot match on one box, but it also has outages you cannot fix. Your own server fails less often in some ways and more often in others, and you are the one on call.
SLAs
Paid hosted APIs may offer service level commitments, especially on business plans. Self-hosting has whatever SLA you build. The free endpoint here has none, which is fine for testing and wrong for critical paths.
The compatible API is the great equalizer
Because llama.cpp, vLLM, Ollama, LM Studio and most hosted providers speak the same OpenAI-style API, your application does not need to care which one it talks to. The same client code can hit a local server during development, a free hosted endpoint in testing and a commercial provider in production.
That portability is what makes the decision reversible. You can start hosted, move a workload local when volume justifies it, and move back if hardware becomes a burden. Details still differ, such as which parameters each server supports and whether it serves chat or plain text completions; see chat vs text completions.
Embeddings are a separate question
Tools that compute embeddings locally need an embeddings endpoint. The free endpoint here serves chat and text completions only, so pair it with a local embeddings server if your tool requires one.
import os
from openai import OpenAI
ROUTES = {
"local": ("http://localhost:11434/v1", "llama3.1"), # e.g. Ollama with a model you pulled
"free": ("https://api.apifreekeyopenai.com/v1", "free-ai"),
"paid": (os.getenv("PAID_BASE_URL", ""), os.getenv("PAID_MODEL", "")),
}
route = os.getenv("LLM_ROUTE", "free")
base_url, model = ROUTES[route]
client = OpenAI(base_url=base_url, api_key=os.getenv("LLM_API_KEY", "not-needed"))
r = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": "Give one tip for naming variables."}],
max_tokens=80,
)
print(route, "->", r.choices[0].message.content)
A free open-weight endpoint as a trial run
Before buying a GPU to run an open model, it makes sense to find out whether an open model of that class is good enough for your task. A free hosted endpoint is a cheap way to answer that: point your application at it for a week and look at the results.
The keyless endpoint at https://api.apifreekeyopenai.com/v1 needs no account. Limits are per IP: one request per second with bursts of three, two in flight, and a daily ceiling of 10,000 requests or 10 million tokens. Context is 32,000 tokens, replies up to 16,000. That is enough for a realistic trial of most text workloads.
What a trial tells you
If a 35B-class open model handles your task acceptably, self-hosting a similar model is viable. If it struggles, you probably need a larger model, which changes the hardware math considerably.
Making the decision
Most teams end up with a mix rather than a single answer. Use the table of priorities below to find your starting point, then revisit as volumes and models change. For routing between several providers rather than between hosted and local, compare gateways and direct APIs.
Revisit yearly
Both open models and hosted prices move quickly. A decision that was right last year may not be now; schedule a review.
- Best quality or multimodal needed: paid hosted API.
- Strict data residency or confidentiality: self-hosted.
- Steady high volume with in-house ops skills: self-hosted or dedicated rented GPU.
- Low or bursty volume, tight budget: hosted, possibly a free endpoint for non-critical paths.
- Unsure: trial on a free open-weight endpoint, then decide.

Send a prompt to the keyless free-ai endpoint from the home page and see a reply in seconds, no sign-up needed.
Read also
- Navigating the Retirement of Your Favorite AI Model
- How do you stop an autonomous agent loop from burning your API budget?
- How do you keep API keys and secrets out of prompts you send to AI?
- How to get reliable JSON output from a chat completions API
- Can agent tools run on a ChatGPT subscription instead of an API key?