Every AI system you build on someone else's API rests on a bet: that the provider's incentives stay aligned with yours forever. That bet has lost enough times, in enough ways, that a serious engineer should price it like any other dependency risk — explicitly, in writing, before the first API key is pasted into an env file.
This chapter is that pricing exercise. It is not an argument that cloud AI is useless. It is an argument that cloud AI is a liability you carry, and liabilities should be measured.
The five liabilities
1. Data exfiltration by design. When you send a prompt to a hosted model, you send your data to someone else's computer. Full stop. “We don't train on API data” is a policy, and policies change with leadership, acquisition, and subpoenas. In 2023, Samsung engineers pasted proprietary source code into ChatGPT; the code entered Samsung's incident reports and the training-data discourse within weeks. The mechanism wasn't malice — it was the default behavior of the tool. Any workflow where private context leaves your machine is a workflow where your confidentiality boundary is a Terms of Service document.
2. Silent model changes. Hosted models are versioned the way weather is versioned. Providers update weights, adjust system prompts, and tune refusal behavior without notice, and your application's behavior shifts underneath you. If you have ever debugged a prompt that “used to work,” you have paid this tax. Deterministic systems cannot be built on nondeterministic dependencies. A model that changes without a changelog is not infrastructure; it is a rumor.
3. Vendor lock-in through API surface. Every provider-specific parameter — the exact shape of a function-calling schema, a proprietary reranker endpoint, a fine-tuning API — is a migration cost you are accruing. The lock-in is rarely contractual. It is the hundred small conveniences that make leaving feel expensive, which is exactly why they are offered.
4. Cost curves that punish success. API pricing is linear in usage and set unilaterally. A prototype that costs $40/month at ten users costs $4,000/month at a thousand, and the provider can reprice at will. Local inference inverts this: the hardware is a fixed cost, and marginal queries are electricity. If your unit economics only work while usage is low, you don't have a business — you have a demo with a meter running.
5. Availability as someone else's decision. Rate limits, outages, account suspensions, and geographic restrictions are all remote decisions about your system's uptime. An air-gapped laptop runs your model during an outage, on a plane, in a country under sanctions, or after your account is flagged by an automated fraud system at 2 AM. “The cloud is just someone else's computer” stops being a joke the first time someone else turns their computer off.
When the cloud is the right call
Honesty requires the other side. Run the model remotely when:
- You need frontier capability (the largest models still don't fit on consumer hardware, and for some tasks nothing smaller suffices).
- Your workload is bursty and tiny — a few hundred queries a day is cheaper as API calls than as a GPU idling.
- You have no operational capacity and the alternative is not shipping at all.
The sovereign position is not “never use APIs.” It is: default to local, escalate to cloud deliberately, and know the price of the escalation. Most systems built in 2024–2025 defaulted the other way — cloud first, local never — because the APIs were convenient, not because the trade-off was analyzed.
The sovereignty test
Before this book's technical chapters, apply this test to any AI system you operate or plan:
- If the provider doubled prices tomorrow, what breaks?
- If the provider deprecated the exact model version you use, how long to recover?
- Which of your users' data has left your infrastructure, and under what legal instrument?
- Can your system run, degraded but alive, with no network at all?
If you can't answer all four, you don't have an architecture — you have an integration. The rest of this book is about building architectures.
What sovereignty costs
Nothing in this book is free. Local-first AI costs:
- Hardware. A machine with 24GB+ of VRAM (or a Mac with unified memory) is the entry ticket for serious local work. This is a capital expense, not a subscription — budget it once.
- Operational attention. You are now the SRE for your inference stack. Updates, monitoring, and debugging are yours.
- Capability ceiling. You will not run a 400B-parameter model on a laptop. You will learn, in Chapter 5, how often that actually matters. (Less than the marketing suggests.)
What it buys: deterministic behavior, a confidentiality boundary you control, fixed costs, and systems that work on airplanes. Whether that trade is worth it is your call — but after this chapter, it's an informed call, which is the entire point.