Guide
Local LLM vs cloud API: what actually changes the cost?
A cloud API charges for usage. A local LLM charges you in hardware, power, setup time, and patience. Neither is automatically cheaper. The right choice depends on how often you use the model, what quality you need, and whether you can tolerate local hardware limits.
What actually changes between the two
The cost does more than move. It changes shape. One path bills for what you use; the other asks you to own the machine that does the work.
- Cloud API: pay by tokens. Input, output, context length, and how often you call the model all move the monthly bill. Light use can be a few dollars; heavy, repeated, or agentic use adds up.
- Local: pay in hardware and setup. Local inference has no token bill, but it is not free. The cost shifts to the machine: purchase price, memory limits, power, heat, noise, setup time, and reliability.
- Always-on is different. A cloud API answers whenever you call it. A local machine only answers while it is awake, connected, and reachable. A laptop is not an always-on service unless you design around that.
Fit is more than file size
A model can fit in memory and still be painful to use. Model file size is not the whole memory budget. Context length, KV cache, quantization, runtime overhead, and any background tools all need headroom too. A model that technically loads can still be too slow for the way you want to work. Can my computer run a local LLM? walks through the memory that matters, and why local AI is not always free covers the costs that stay even after the token bill is gone.
When a cloud API usually wins
Reach for a cloud API when usage is light or occasional, when you need frontier-level quality, or when you would rather not manage hardware. You pay only for what you use, and setup is minimal. The tradeoff is that keys and history pass through a provider, and the bill grows with heavy or agentic usage. If you are weighing a rented GPU against per-token pricing instead of buying hardware, that is a separate comparison. GPU hosting vs model API covers it.
When running local can make sense
Local can make sense for heavy or repeated work, for privacy and offline use, or when you already own capable hardware. The tradeoffs are up-front hardware, setup, ongoing power, and local model quality that may not match a frontier API. For a workload that runs constantly and keeps the machine busy, local can become competitive, but that is an assumption to check against your actual usage, not a rule. For a fuller cost breakdown, see what it costs to run an LLM.
FAQ
Is a local LLM cheaper than a cloud API?
Not automatically. A cloud API charges by tokens, so light use is often cheap. Local removes the token bill but adds hardware, power, and setup. Which is cheaper depends on how heavily and how often you run the model.
Is local AI free if I already own the machine?
It can feel free, since there is no token bill. For planning, the hardware, electricity, and reliability still count, and the machine only helps while it is on.
Does a model fitting in memory mean it will be fast?
No. Fit only means the setup may be able to load and run the model. Speed depends on hardware, memory bandwidth, quantization, runtime, context length, and the workload.
Related guides
Every price is sourced and dated at its row.