The New Default. Your hub for building smart, fast, and sustainable AI software
Table of Contents
and 5 more
For sustained, high-volume agent workloads on data you’d rather keep in-house, owning your inference hardware is usually cheaper. For everything else, the cloud API almost certainly wins.
Some people will tell you that self-hosting saves millions, others that the API is cheaper than anything else. What they usually don’t tell you is their assumptions, and it’s the assumptions that are doing all the work.
There is some evidence that this is hard for everyone. A 2025 survey by Mavvrik and Benchmarkit, cited by Cohere, found that 80% of companies miss their AI infrastructure forecasts by more than 25%, and roughly a quarter miss by more than 50%.
Only 15% land within 10% of actual spend. An IDC InfoBrief commissioned by DataRobot in December 2025 reported that 96% of organizations deploying generative AI and 92% using agentic AI hit higher-than-expected costs.
Executive Summary
Every widely quoted "on-premise is 6-18x cheaper" figure traces back to a small number of vendor analyses that assume sustained high utilization and exclude storage, egress, and support from the cloud side of the ledger.
One peer-reviewable study of a live agentic production workload found that prompt caching cut a frontier API's realized cost by 88.6%, to $0.57 per million tokens, which is below the on-premise cost basis it was measured against.
That same study found the on-premise setup still won total cost of ownership by 40.1% under shared GPU allocation, and lost by 43.8% under dedicated reservation. It also found that the local configuration carried 2.6 to 4.9 times higher odds of any given commit being a defect repair.
For engineering and finance leaders, the practical consequence is that this decision turns on your duty cycle, your cache hit rate, and your rework rate, not on the architecture label.
What Is the Difference Between Cloud AI and On-Premise AI?
The difference is who carries the responsibility, not where the servers sit.
Cloud AI is four different products, on-premise is four different places, and most disagreements on this topic turn out to be about semantics. Let’s break down three definitions to get more precise in our analysis.
Cloud AI is four different products. TechTarget splits it into:
IaaS (you rent GPUs),
managed AI PaaS,
foundation-model APIs (you rent tokens),
SaaS AI applications.
Renting an 8xH200 instance by the hour and buying tokens by the million are both "cloud," and they have almost nothing in common economically. Much of the confusion in this debate comes from comparisons that switch between the two without saying so.
On-premise is four different places:
owned data centers,
private clouds,
colocation facilities,
edge sites.
In all four cases, you are responsible for server procurement, GPU selection, storage tiers, network design, security controls, resilience planning, and refresh cycles. Responsibility is the defining feature.
An agentic workload is not a query, which breaks conventional cost intuition. As Cohere puts it, a single user request "can trigger a long prompt, large context window, multiple reasoning steps, several tool calls, and a polished final answer. The user experiences one interaction; the company pays for the entire chain."
Coding agents run closed loops (inspect files, edit, run tests, read the errors, try again), often dozens of model calls per task. If your cost model's unit is "a query," it is off by an order of magnitude before you start. Context handling dominates agent economics.
Where Do the On-Premise vs Cloud AI Cost Claims Come From?
Almost all of them come from companies selling something, and every one assumes sustained high utilization. Here are just some of the materials I found.
Claim | Source | What it assumes |
|---|---|---|
Self-hosted Llama 70B costs $0.159 per 1M tokens vs $0.97 on an equivalent Azure H200 instance, so 6x cheaper | 5-year amortization, $0 residual hardware value, 12%/yr maintenance, and cloud priced at hourly instance rates only. Storage, egress, and support explicitly excluded | |
Self-hosted DeepSeek R1 at $0.13 per 1M vs $2.19 for the equivalent API, so 17x cheaper | Lenovo, same paper | 8xB300 server at MLPerf throughput, running effectively continuously |
Breakeven on an 8xH200 server in 5.2 months against on-demand cloud | Lenovo, same paper | Measured against the most expensive way to rent. Against a 1-year reserved instance it stretches to 8.5 months, against 3-year reserved 13.4 months, against 5-year reserved 14.8 months |
Owning beats renting above 5.3 hours of use per day | Lenovo, same paper | 8xB200 against an equivalent on-demand instance over 5 years |
$4.75M saved per server over a 5-year lifecycle (76%) | Lenovo, same paper | One 8xB300 server running 24/7 for five years |
Owned inference at $0.11-0.12 per 1M vs ~$0.89 cloud instance vs ~$2.00 frontier API | Cohere, citing a Lenovo analysis and an NVIDIA/SemiAnalysis benchmark | Sustained high utilization. Cohere notes the on-prem figure comes from a 5-year H100 ownership model and the $0.123 figure from a benchmark on newer GB300 chips, which are "not strictly comparable" |
On-premise is up to 18x cheaper per token over five years | Cites "Lenovo's 2026 TCO analysis," which is the same paper as rows 1 through 5 | |
On-premise fine-tuned systems outperform generic cloud models by 20-40% on domain-specific tasks | Fortuna Data | No method, benchmark, or citation published |
I’ll let you in on a little secret - there’s closer to one source here than six. Cohere's headline figures cite Lenovo. Fortuna Data's 18x cites Lenovo. The apparent convergence of independent analyses is largely one analysis quoted three times.
Every number above assumes sustained, high utilization. Lenovo's own arithmetic puts the tipping point at 5.3 hours of use per day. Cohere's version is roughly four hours. Below that line, as Cohere puts it, "the API wins because idle hardware is pure waste." This is the base for the entire on-premise case, and it is the one your organization can verify about itself before spending anything.
What Does a Real Agentic Workload Cost on Cloud vs On-Premise?
Prompt caching inverted the per-token comparison, the on-premise setup still won the total bill, and rework cost turned out to be large enough to matter.
Almost everything above is modeled. In July 2026, three engineers at Pegatron published something different: Inference Economics of Enterprise Coding Agents: A Case Study of Cloud vs. On-Premise LLMs, covering 56 days of production telemetry from a live enterprise monorepo, with cost, quality, and developer-experience numbers all mined from the same repository.
The setup ran two contiguous 28-day periods, one developer, one production codebase of 12 packages. Same specification-driven workflow, same CI gates, same review requirements, same release pipeline across both.
How Does Prompt Caching Change LLM Cost per Token?
It can cut the realized rate by an order of magnitude, because cache reads bill at a fraction of base input and agent loops are close to a best case for caching. Agentic loops re-send an almost identical prompt prefix on every turn: system rules, tool schemas, repository index, conversation history. The telemetry shows it: 99.3% of the API configuration's prompt tokens were served as cache reads.
Anthropic prices cache reads at 0.1x the base input rate, so on a model listing at $5.00 per million input tokens, cached reads bill at $0.50. Applied across 15.3 billion input-side tokens, that cut realized spend by 88.6%. The same volume would have cost $77,059 at nominal rates and instead cost $8,785.
The effective rate landed at $0.573 per million tokens processed, below the $2.83/M amortized cost of the shared on-premise slice and far below the $11.87/M cost of a dedicated round-the-clock reservation. The authors call this "an inversion of what nominal price sheets suggest." It is the most under-modeled variable in this whole debate, and none of the vendor TCO analyses account for it.
Why Can On-Premise Cost Less per Month but More per Token?
Because a per-token rate and a monthly bill measure different things, and low single-tenant utilization inflates the former while capping the latter. The API configuration's total 28-day compute bill was $8,785.21. The shared on-premise allocation cost $2,560.00, making on-premise 70.9% cheaper.
The API configuration processed 16.9 times more tokens. Its per-token rate was lower and its total bill was higher. Meanwhile the on-premise per-token figure divides a time-billed resource by one developer's token volume, so it is inflated by low single-tenant utilization. That is the utilization assumption from the previous section showing up in live data.
Does a Weaker Self-Hosted Model Cost More in Rework?
On the one workload where it has been measured, yes, by 2.6 to 4.9 times. The authors measured the Fix Commit Ratio, meaning the share of commits whose message indicates a defect repair, using a deterministic keyword rule applied identically to both periods.
Period A, on the cloud API, came in at 45.93%. Period B, on-premise, came in at 74.93%. Roughly three in four commits under the local configuration were repairs.
The odds of a commit being a defect repair ran 2.6 to 4.9 times higher on the local setup. The difficulty imbalance also ran against their own conclusion, since Period A handled the harder tasks and still posted the lower repair share.
Behavioral indicators mined purely from commit timestamps all moved the same way. Commits inside debugging spirals rose from 35.0% to 69.8%, the longest uninterrupted repair run went from 18 commits to 58, and median time between commits went from 5.9 to 12.7 minutes.
If you take one thing from this article into a budget conversation, take this: rework is a real cost that’s often ignored, and it often decides these comparisons in practice.
What Is the Total Cost of Ownership Once You Add Developer Labor?
It reverses depending on how the GPUs are billed. On-premise comes out 40.1% cheaper under shared allocation and 43.8% more expensive under a dedicated reservation. Pricing repair time at a symmetric 15 minutes per fix commit and a $35/hour fully loaded developer rate, plus on-premise power, cooling, MLOps, and facilities overhead:
Cloud API | On-prem, shared allocation | On-prem, dedicated reservation | |
|---|---|---|---|
Compute + ops | $8,785 | $3,453 | $11,645 |
Defect-repair labor | $989 | $2,406 | $2,406 |
True TCO (28 days) | $9,774 | $5,859 | $14,051 |
vs. cloud API | baseline | 40.1% cheaper | 43.8% more expensive |
The only variable that changed is whether the GPU tray was billed as a shared developer seat or reserved around the clock, and it flips the answer completely. The authors' sensitivity sweep across wage rates, GPU lease rates, and per-fix review time keeps the shared-allocation saving positive throughout, but the range is wide: 9% at the adverse corner, 56% at the favorable one.
One further caveat. The API side is priced at public list rates, and they estimate that a committed-use discount of roughly 45% would by itself equalize the comparison. If you have not asked your model vendor for volume pricing, you do not yet know which side of this line you are on.
How Reliable Is a Single-Developer Case Study?
Directionally useful, but not conclusive. The Pegatron study covers a single developer, on a single repository, in a single organization, over 56 days, with the periods run in sequence rather than randomized. The authors are candid about it: the subject was the first author and was aware of the hypothesis, and the comparison bundles base-model capability, NVFP4 quantization, serving stack, and agent harness together, so no single factor can be isolated.
Claude Code is co-designed with Claude models, while Opencode adapts open-weights models through generic prompt profiles. Some of the gap is the model, some is the harness, and the study cannot separate them.
Read at the level the authors intend, meaning deployable configurations rather than model rankings, it remains the most useful measurement publicly available on this question. It is also not a law of nature, and quoting the 74.9% figure may be overreaching.
Can Hybrid Routing Between Cloud and On-Premise Reduce AI Costs?
Hybrid routing is a viable option, but not a free win. The same study tested it, replaying four routing policies across a pooled set of 613 real commits.
Routing policy | True TCO | Saving vs. pure API | Simulated defect-repair rate |
|---|---|---|---|
Pure cloud API | $11,419 | baseline | 49.1% |
Hard tasks to API, rest local | $8,412 | 26.3% | 64.6% |
Hard and medium to API, rest local | $9,890 | 13.4% | 57.9% |
Pure local | $7,388 | 35.3% | 73.4% |
The ordering held in all 10,000 bootstrap resamples. Every increment of work shifted to local hardware buys infrastructure savings and buys defects, in a fixed relationship. No policy dominates. As the authors put it, moving left on cost "strictly moves up" on defect rate.
Routing both hard and medium work to the API still lands nearly 9 points worse on defect rate than pure API while saving only 13.4%. Partial-quality strategies need checking against the curve.
None of which makes hybrid a bad idea. It makes it a decision with a price tag. TechTarget catalogs five hybrid patterns working in production today:
Cloud for experiments, on-premise for production. Use the cloud's model catalog and rapid provisioning during evaluation, then move the finalized workload onto owned hardware.
Cloud training, local inference. Train and fine-tune in the cloud, export the weights, serve locally.
On-premise data with cloud model access over private connectivity, for organizations with residency constraints that still want frontier capability.
On-premise baseline with cloud burst capacity, for demand spikes beyond your provisioned ceiling.
Edge inference with cloud-based monitoring, where drift metrics and logs centralize while inference stays local.
The costs TechTarget names include inconsistent controls, fragmented observability, and harder data lifecycle management across environments.
What Does It Take to Deploy AI Agents On-Premise?
Weeks of setup, enough GPU memory to hold the model and its KV cache, and a standing maintenance bill. Cost comparisons tend to skip the part where someone has to build the thing, so here are those three dimensions with the numbers the sources publish.
How Long Does On-Premise AI Deployment Take?
Four to eight weeks for a pre-configured appliance, against minutes for a cloud API key. Fortuna Data, who sell on-premise appliances and are therefore arguing against their own interest here, put honest numbers on it.
They quote four to eight weeks from first conversation to a live system for a pre-configured appliance, with customer IT involvement limited to network settings and initial admin account creation. Their framing is fair: "that is not a weekend project. But it is far less complex than most organisations fear."
That figure covers a turnkey appliance. Assembling your own stack means what TechTarget lists: server procurement, GPU selection, storage tiers, network design, security controls, local data integration, resilience planning, and refresh cycles.
The work does not stop at compute either, since you still need VPC extensions, local gateways, private connectivity, and multisite design. Treat "weeks" as the floor rather than the estimate.
How Much GPU Memory Does an On-Premise LLM Need?
Roughly 2 bytes per parameter at FP16/BF16, per Lenovo's analysis, plus a KV cache that can exceed the model itself. This constraint catches teams out, because LLM inference is memory-bound rather than compute-bound. A 70B model needs about 140GB of VRAM, barely fitting a single H200. A 400B+ model needs 800GB or more, mandating an eight-GPU cluster just to load the weights. The KV cache then grows linearly with context length and batch size, and for long-context models it can consume more memory than the model itself.
Quantization is the lever that changes this arithmetic dramatically. The Pegatron team's 753B-parameter model would occupy roughly 1.5TB in BF16, beyond even an eight-GPU allocation once you account for KV cache and activations. Quantized to NVFP4 at 4.5 bits per parameter, the deployed checkpoint measured around 465GB and fit a four-GPU tray. That single decision is what made their $2,560 cost basis possible.
Self-hosting removes vendor rate limits but replaces them with a hard ceiling at your cluster's serving capacity, which is a different constraint rather than the absence of one. And per-developer costs do not extrapolate linearly: the study's own authors caution that one four-GPU tray cannot serve 100 developers, so fleet-scale projections compare amortization rates, not a fixed footprint.
What Are the Ongoing Costs of Running AI On-Premise?
Around 12% of system cost per year in maintenance, plus power, cooling, colocation, and MLOps salaries. Lenovo's TCO model budgets that 12% figure alongside $0.12/kWh for electricity and $0.18/kWh for air cooling (or $0.09 liquid), plus roughly $1,500/month per rack for high-density colocation. Liquid cooling is a real lever, since moving Power Usage Effectiveness from an industry-average 1.5 down to 1.1 improves TCO by a further 10-15% on their numbers.
The Pegatron study prices the same category from the other direction, per developer: about $893 per 28 days, comprising roughly $813 of power and cooling at a PUE of 1.5, around $30 for an MLOps engineer amortized across a cohort of about 100 developers, and $50 for facilities. That MLOps figure is only small because it is spread across a hundred people. At ten developers it is ten times larger.
Is On-Premise AI More Secure Than Cloud AI?
Not inherently. Depends on which controls sit with you and which sit with a vendor.
The clearest statement of this we found comes from the NHI Management Group, whose guidance suggests treating cloud versus on-premise "as a control distribution decision, not a simple security ranking [...] on premise is not automatically more secure." An on-premise deployment can still fail a governance review "if logging is incomplete, access is overbroad, or model changes bypass approval."
The real question, in their framing, is whether you can prove who changed what, who approved it, and what data the system could reach at the time. That is answerable in either architecture.
What Security Advantages Does Self-Hosting AI Give You?
Four, and they are substantial: data residency, a complete audit trail, offline operation, and no outward flow of institutional knowledge. Inference data stays inside your network, which the Pegatron team notes "substantially simplifies compliance for proprietary technology assets" relative to third-party API transmission.
You own the complete audit trail. The system runs without external connectivity. And your institutional knowledge stops flowing outward: Fortuna Data's point that fine-tuning a cloud model may contribute proprietary knowledge to a shared asset is a real consideration for professional services, legal, and R&D-intensive firms, though enterprise contracts increasingly address it.
What Are the Security Risks of Self-Hosting AI?
You inherit responsibility. NHI is explicit that on-premise "transfers more responsibility for security, capacity planning, and lifecycle management to internal teams," and that it "can create blind spots if teams cannot consistently patch, harden, and monitor the stack."
You also acquire a new attack surface: internal multi-tenancy. The Pegatron paper is candid here in a way that is rare. On a shared GPU cluster, proprietary code, schemas, and request contexts from multiple departments co-reside in shared GPU memory and host logs.
Because prefix caching is enabled, and that is the same mechanism that makes local serving affordable, KV prefixes may be reused across requests. Their mitigation stack is worth copying as a checklist: hardware-level isolation via NVIDIA Multi-Instance GPU partitions, dedicated Kubernetes namespaces under strict network policies, mutual TLS in transit, and role-based access control via per-developer tokens.
What Governance Do AI Agents Need Beyond the Model?
Governance for agents cannot stop at the model. As NHI notes, there is no universal standard yet for agentic workflows that combine model calls, external tools, and automated actions, and governance has to extend to non-human identity lifecycle, secret handling, and authorization boundaries. The frameworks they map to are the OWASP Agentic AI Top 10 for attack surface, NIST CSF 2.0 and the NIST AI RMF for controls, and the EU AI Act for regulatory obligations.
For an agent, the question that matters is what it can reach, with whose credentials, and who approved that.
What Do GDPR and the EU AI Act Require for AI Deployment?
Neither one mandates on-premise, but both make you accountable for what your deployment can reach.
You remain the controller. Under GDPR, sending client data, financial records, or personal information to a cloud AI service does not transfer your accountability for it. A Data Protection Impact Assessment under Article 35 is generally required before deploying AI that processes personal data, and cloud deployments make that assessment harder to satisfy rather than impossible. Our GDPR questions for digital businesses covers the groundwork.
The CLOUD Act reaches across storage location. It permits US authorities to compel US-based companies to produce data regardless of where it is stored, which means EU-region hosting with a US-owned provider does not by itself close the exposure.
The EU-US Data Privacy Framework is in force but does not shield you from the CLOUD Act. It governs transfer legality for certified US companies; it does not prevent compelled disclosure. Its legal foundation has also become less comfortable, since the statutory basis for FISA Section 702, which the Commission's adequacy assessment examined, lapsed in 2026, with surveillance continuing under court certifications rather than statute.
The Digital Omnibus on AI entered into force on 27 July 2026, deferring compliance for standalone high-risk (Annex III) systems from 2 August 2026 to 2 December 2027, and for AI embedded in regulated products to August 2028. The Article 50 transparency obligations were not deferred and applied from 2 August 2026.
None of this is legal advice, and the specifics turn on your sector, your data, and your jurisdiction.
How Do You Decide Between Cloud and On-Premise AI Agents?
By measuring seven things about your own workload rather than comparing architectures in the abstract.
1. Is your inference duty cycle sustained or bursty?
This dominates everything else. Lenovo's own threshold is 5.3 hours per day and Cohere's is roughly four. Below that, you are buying idle hardware. Measure your actual duty cycle before anyone models anything.
2. How cache-friendly is your workload?
If your agents run loops over a stable prefix (system prompts, tool schemas, a repository index), your effective API rate may be a fraction of list price. Ask your vendor for your realized cost per million tokens over the last 90 days rather than the rate card.
3. What is the quality delta on your tasks, and what does rework cost at your salaries?
The Pegatron gap will not be your gap, given different models, harnesses, and codebases. But the mechanism generalizes and the measurement is reproducible: mine your own commit history, classify repairs deterministically, stratify by change size. Their methodology section is specified in enough detail to run on your own repository.
4. What does your data actually require, residency or provable control?
These are different requirements with different solutions. Residency may be satisfiable within cloud through regional deployment and contractual terms. Provable control over who touched what, and when, is achievable in both architectures.
5. Can you actually operate it?
On-premise means MLOps, patch lifecycle management, observability, power and cooling, capacity planning, on-call rotation, and hardware refresh cycles. TechTarget observes that cloud "suits businesses that lack internal engineering talent or operational maturity to manage AI infrastructure.” You need a decent level of AI readiness.
6. Have you negotiated?
Every published comparison prices APIs at list. A committed-use discount in the region of 45% was enough to erase the on-premise advantage entirely in the one production study available. Negotiating costs less than procuring a GPU cluster.
7. What does reversibility cost, in both directions?
Vendor lock-in is the standard argument for owning your stack. Cohere states that a capability which can be "repriced, rate-limited, deprecated, or restricted" is rented no matter how much you spend on it. But a $550,000 server on a five-year amortization schedule is also a commitment, and a harder one to unwind. If optionality is the goal, open-weights models behind a provider-agnostic harness hedge both directions better than either pure strategy.
None of these answers is permanent. Businesses treating deployment location as an ongoing decision are better positioned than those treating it as a one-off. Hardware generations and API rate cards move fast enough that a rerun every six months is not overkill.
Key Takeaways
Utilization decides more than architecture. Published break-even thresholds cluster at four to five and a half hours of daily use. Below that, owned hardware sits idle and the API wins on cost.
Prompt caching can invert the per-token math for agentic workloads. Cache reads bill at 0.1x base input, and agent loops re-send a near-identical prefix every turn. Ask for your realized effective rate, never the rate card.
Rework is a cost line that appears on no invoice. A weaker local model produced 2.6 to 4.9 times higher odds of a commit being a defect repair, across every difficulty tier, and that labor is real money.
Security is a control distribution decision, not a ranking. Self-hosting removes an external trust boundary and creates an internal multi-tenancy one, including prefix caching as a cross-tenant surface you now own.
Almost all public TCO evidence comes from sellers. Reproduce the numbers on your own workload over two comparable periods before committing capital.
Choosing Between Cloud and On-Premise is Not a One-Time Architecture Vote
The cloud does what it was built for: bursts, experimentation, unpredictable demand, and reaching a working prototype before you commit capital.
Sustained, high-volume, predictable inference on data you would rather not transmit is where owning starts to pay.
Classify your workloads, instrument them so the classification stays honest, and build interfaces loose enough that you can move a workload when its economics change.
If you would like a second pair of eyes on where your agent workloads should run, we are happy to talk it through. If you are earlier than that and still deciding what to build rather than where to run it, build, buy, or outsource is the more useful starting point.
On-premise AI vs Cloud AI FAQ




