
Self-Hosted Large Language Model vs Cloud API: The Decision Logic in One Table
Ergo’s open weights dropped on 2026-12-01, with the repository at Amazon-FMR/Ergo on Hugging Face. The license permits commercial use, though how you use it is still bound by the acceptable use policy. Once the news broke, almost every team responsible for technology selection asked the same question: now that the weights are downloadable, should we spec out the hardware and cut that monthly API bill?
This isn’t an article telling you to cancel your API, and it isn’t one telling you to buy GPUs tomorrow either. What decides this was never whether some model has open weights — it comes down to two plain facts: how big your call volume is, and whether the weights have to stay on your own machines.
Core value: By the end of this, you’ll have a decision process you can actually walk through — you’ll know at what usage level a cloud API fits better, under what conditions self-hosting genuinely holds up, and why “Ergo went open source” doesn’t lead to “self-hosting is cheaper.”
| Decision dimension | Self-hosted Large Language Model | Cloud API | Signal you should watch |
|---|---|---|---|
| Cost shape | Mostly fixed investment; what you buy is capacity | Pay-per-use; what you buy is usage | Machine utilization |
| Barrier to entry | Hardware, data center, and ops must be in place first | One API key is enough | Does the team have GPU ops capability |
| Marginal cost | Spread thinner the higher utilization goes | Grows linearly with token volume | Shape of your call-volume curve |
| Model switching | Swapping weights means redeploying and re-evaluating | Change one model field |
Do you need multi-model A/B |
| Weight ownership | Weights sit on your machines and accounts | Weights sit with the provider | Does compliance veto it outright |
| Capability ceiling | Limited by the hardware and inference stack you bought | Limited by the provider’s catalog | Do you need to keep chasing the newest |
One thing has to be clear up front: this article won’t quote electricity rates or accelerator card prices. Those two numbers vary wildly across regions, procurement channels, and order sizes — casually dropping a figure into an article just makes readers decide on the wrong baseline. Wherever this topic comes up, this article gives you the accounting framework and nothing more.
Why the Two Cost Curves Have Completely Different Shapes
Self-hosting costs are essentially buying capacity. You put money into accelerator cards, full machines, data center space, and operations all at once, in exchange for inference capability over a stretch of time — whether you use it or not, that investment depreciates. Cloud API costs are essentially buying usage: input, output, and cache reads are priced separately, you pay for what you use, and unused means zero.
These two forms dictate the shape of the cost curve: self-hosting is a per-unit cost curve that steadily declines, provided utilization is high enough; the cloud API is a straight line with a constant slope, and that slope is the unit price. Where the two lines cross depends only on how high your steady load is and how big your peaks and valleys are.
So “which one is more cost-effective” has no single answer on its own — only your usage data can produce one. Any claim that skips the usage numbers and jumps straight to a conclusion is worth a second look.

The Core Difference with Self-Hosted Large Language Models: You’re Buying Capacity, Not the Model
A lot of people treat “the weights are downloadable” as meaning “deployment is cheap.” That’s one of the most common misjudgments in model selection. The size of the weight file is only the starting point — what really determines whether you can get a service running is the entire inference-side engineering stack.
Take Ergo as an example. The official material doesn’t provide a single, unified standard for how many GPUs you need. That means you can’t directly work out “how much one machine costs” from public information. You have to run load tests based on your own context length, concurrency targets, quantization strategy, and latency requirements, then work backward to the hardware configuration. There’s no shortcut here. Any claim like “just provision 8 GPUs per the official recommendation” doesn’t hold up without benchmark data.
The self-hosting expense categories are clear enough, but you have to fill in the amounts yourself:
| Cost item | Self-hosted Large Language Model | Cloud API | Notes |
|---|---|---|---|
| Accelerator card purchase or rental | Required, priced per card | None | Actual quotes depend on the vendor/channel |
| Full server, storage, and internal network bandwidth | Required | None | Often underestimated |
| Data center power and cooling | Required, varies with load | None | Calculate using local electricity rates |
| Ops staffing | Ongoing investment | Minimal | On-call, upgrades, troubleshooting |
| Idle capacity cost | Determined by utilization | None | The difference is significant when peaks and troughs are large |
| Usage cost | Amortized into fixed investment | Input, output, and cache reads are priced separately | See the pricing table in the next section |
| Model iteration cost | Download, evaluate, and canary rollout yourself | Handled by the platform | The faster you chase new releases, the wider the gap |
The items most easily overlooked in the table aren’t the purchase price — they’re ops staffing and idle capacity cost. A team that can reliably run an inference service needs people watching for VRAM overflows, watching for throughput degradation, and watching driver and inference framework version compatibility. That work doesn’t show up in a budget spreadsheet, but it genuinely consumes manpower.
Another commonly underestimated item is model iteration cost. On the cloud API side, switching models is changing a string. On the self-hosted side, switching models is a full deployment: pull weights, quantize, load test, align with the evaluation set, canary rollout, and prepare a rollback plan. If your business needs to continuously track the latest models, this cost rises linearly with iteration frequency.
The Core Difference of Cloud APIs: What Pay-Per-Use Pricing Really Looks Like
On the cloud side, let’s use the pay-per-use prices already published by APIYI (apiyi.com) as our reference. It splits pricing into three tiers — input, output, and cache read — which is a completely different language from self-hosting’s “flat-rate capacity,” so the two can’t be compared directly. But it does let you see the structure of your own bill more clearly.
| Model | Input tier | Output tier | Cache-read tier | Listing status |
|---|---|---|---|---|
| ergo-1.0 | 1 | 3 | 0.03 | Listed since 2026-12-04 |
| glm-5.2 | 1.142 | 3.997 | 0.2284 | Listed; already included in the documentation master table |
| kimi-k3 | 3 | 15 | 0.30 | Listed |
The tiers above are taken from the pricing page conventions at APIYI apiyi.com; refer to the platform’s pricing page for the exact units and currency. One practical detail worth noting here: the documentation master table doesn’t have an ergo row yet, while glm-5.2 already has one — which tells you the master table lags behind the pricing page and actual listing status. When budgeting, go by the pricing page and the actual billing in the console; don’t do your accounting solely from the documentation master table.
You can read some structural information out of the relationships among the three tiers. For ergo-1.0, the cache-read tier is roughly 3% of the input tier; for glm-5.2 that ratio is around 20%, and for kimi-k3 around 10%. The point of the cache-read tier is this: when your requests have a long, stable prefix (system prompt, tool definitions, knowledge snippets), that repeated portion gets billed at the cache-read rate, and your cost structure ends up noticeably different from “full input every time.”
This needs to be emphasized once: the three tier prices above can’t be converted into “how much one machine costs per month.” They describe relative positions under token-based billing, whereas self-hosting costs depend on how many GPUs you bought, how high your utilization runs, and how electricity and depreciation get allocated. Force a conversion between the two frameworks and the resulting number looks precise but has no decision value.

Keeping Switching Costs Minimal with One Compatible Interface
The real hidden advantage of the cloud approach isn’t unit price — it’s switching cost. When several models have comparable capabilities but different prices, teams that can quickly swap models and run A/B tests tend to get better value than teams that stubbornly stick to a single option.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.apiyi.com/v1"
)
resp = client.chat.completions.create(
model="ergo-1.0",
messages=[
{"role": "system", "content": "你是一个严谨的技术评审,只输出结构化结论。"},
{"role": "user", "content": "把这段需求拆成三个可交付的开发任务。"}
]
)
print(resp.choices[0].message.content)
The key thing about this code isn’t those ten lines — it’s two things: first, the OpenAI-compatible interface shape means your existing SDK and wrapper layer basically don’t need changing; second, the model field can be swapped for any other model listed on the same platform, so running comparisons doesn’t require rewriting your calling logic.
Suggestion: If you’re still in the estimation phase, grab the free trial credits from APIYI apiyi.com first, run a round with real business samples, and measure your token distribution. Once you have that distribution, any self-hosting cost calculation you do afterward will actually mean something.
When Should You Go with a Self-Hosted Large Language Model?
Self-hosting is viable in a narrower set of conditions than most people assume — but once those conditions are met, there’s often no substitute. Self-hosting is the sensible choice only when all of the following hold at once:
- The weights have to stay on your own machines or in your own data center: contracts, industry regulations, or customer audits explicitly require that model weights and inference traffic never leave your domain. This is a hard veto item, and it has nothing to do with cost.
- You have a stable, predictable high load: round-the-clock steady traffic with a small gap between peaks and troughs, so the hardware won’t sit idle for long stretches.
- You already have a GPU cluster and an ops team: the marginal investment for a new model is mostly people and time, not procurement.
- You need deep customization: fine-tuning weights, modifying the inference stack, a private tokenizer, unusual quantization strategies — none of this is possible on a hosted API.
- You can absorb a hardware budget you can’t fully pin down: you’re willing to run load tests to arrive at a hardware spec first, then accept a total investment range that isn’t fixed.
Item 5 is the one most easily glossed over, and the one most likely to blow up on you. When the vendor doesn’t publish a consistent standard for how many GPUs a given model needs, your hardware budget is inherently uncertain — you need to leave headroom rather than place orders based on the most optimistic load-test result.

When should you choose a cloud API?
Conversely, cloud APIs apply to a much wider range of situations — especially when your business hasn’t stabilized yet and model capabilities are still evolving fast:
- Low or highly volatile call volume: your daily token volume is modest, or your peak is many times your trough — in that case, the idle cost of self-hosting eats up the entire price advantage.
- Need frequent side-by-side comparison of multiple models: the same prompt has to be evaluated back and forth across ergo-1.0, glm-5.2, and kimi-k3.
- Team has no GPU operations capability: nobody wants to be woken up at midnight by an out-of-memory error.
- Want to validate the product shape quickly: get the workflow running first, then talk about infrastructure.
- Need a combination of capabilities: long context, multimodality, structured output, and other capabilities are scattered across different models — aggregating calls is less hassle than building it yourself.
| Scenario | Recommended approach | Main reason |
|---|---|---|
| Internal tools, modest daily call volume | Cloud API | Fixed investment can’t be amortized |
| Multi-model A/B evaluation phase | Cloud API | Switching models means changing one field |
| Customer service scenarios needing long-prefix reuse | Cloud API | Cache read tiers significantly lower unit cost |
| Finance, healthcare, and other scenarios where data can’t leave the premises | Self-hosting | Compliance is a hard veto |
| Algorithm teams that already have GPU clusters | Self-hosting | The marginal investment is mainly manpower |
| Consumer products whose peak traffic is several times the average | Hybrid | Self-host the baseline, send peaks to the API |
Hybrid approaches are often overlooked, but they offer a third answer between the two extremes: put predictable baseline load on self-hosted machines, and hand burst peaks to metered cloud endpoints. The cost is maintaining two pipelines; the benefit is no longer buying a full year of idle capacity just for peaks.
When switching between models for testing, on apiyi.com you can do it by swapping the model field while keeping the same base_url — which makes the integration side of a hybrid approach cheaper than you’d expect.
Decision Framework: Quantifying “Worth It” in Three Steps
“Worth it” isn’t a feeling — it’s something you can actually calculate. Work through the three steps below in order, and the answer will surface on its own.
Step one: turn your usage into tokens. Pull the real requests from the last month out of your logs and break them into three parts — input, output, and cache reads. Don’t guess with averages. Track peak and off-peak separately, because self-hosted cost is driven by the peak while cloud API cost is driven by total volume.
Step two: estimate the total cost of ownership range for self-hosting. Size the hardware according to your load-test results, price electricity at local rates, then add data center space, networking, headcount, and depreciation. Give a range rather than a single number — the width of that range is your risk exposure.
Step three: compare the crossover point against your safety margin. Extrapolate your cloud bill at current usage and see how much growth it would take for it to exceed the lower bound of the self-hosted range. If it catches up within a year, the payback window for self-hosting is too short and the risk outweighs the reward.
My rule of thumb is pretty blunt: if your call volume is low and you need to swap between several models frequently, go with the cloud API. Only consider self-hosting when the weights have to stay on your own machines and you can absorb an undisclosed hardware budget.
| Team profile | Recommendation | Prerequisites |
|---|---|---|
| Teams of ten or fewer with low daily call volume | Cloud API | One API key is all you need to start |
| Product teams still in the model-selection phase | Cloud API | Need to compare several available models side by side |
| Algorithm teams that already own a GPU cluster | Self-hosting first, API as fallback | Staff already maintain an inference stack |
| Regulated industries where weights must stay in-house | Self-hosting | Willing to accept uncertainty in the budget range |
| Mature consumer products with pronounced peaks | Hybrid | Need to maintain two paths |
This table is a starting point, not a conclusion. The real answer depends on the token distribution you measured in step one and the width of the range you calculated in step two.
FAQ
Q1: What’s the most fundamental difference between a self-hosted Large Language Model and a cloud API?
Self-hosting is buying capacity; a cloud API is buying usage. The former’s cost is set by the hardware scale you provision and how well you utilize it, while the latter’s cost is set by the actual token volume. That difference is why the former suits high, steady workloads and the latter suits low or volatile ones.
Q2: Ergo ships open weights — does that mean I can use it commercially at zero cost?
No. The license permits commercial use, but how you use it is still bound by the usage policy — that’s a condition at the licensing layer. Deployment itself requires hardware, data center space, people, and ops, and none of those costs depend on whether the weights are free. Downloadable weights answer “can I use it,” not “can I use it cheaply.”
Q3: Is self-hosting always cheaper than calling an API?
Not necessarily. Self-hosting’s price advantage comes from utilization. When load is low or swings wildly, idle machines keep depreciating and the per-unit cost can end up higher than pay-as-you-go. Self-hosting only shows a clear cost edge when you have steady high load and a team that already knows how to run it.
Q4: How many GPUs do you actually need to run Ergo?
The official docs don’t give a single GPU-count figure, so any claim about a “standard configuration” is unfounded. The real number depends on your context window length, concurrency targets, quantization scheme, and latency requirements — the only way to pin it down is your own load testing.
Q5: How do I quickly call ergo-1.0 through an API for a comparison test?
The steps are straightforward: go to APIYI apiyi.com, register an account, and grab an API key. Point the `base_url` in your code at `https://api.apiyi.com/v1` and set `model` to `ergo-1.0`, and you’re ready to send requests. When you want a side-by-side comparison, just swap `model` for another model available on the same platform — your business code stays untouched.
Q6: Why can’t I find ergo in the documentation master table when it’s already on the pricing page?
Model launches and documentation updates usually aren’t in sync. ergo-1.0 went live on 2026-12-04 at the tiers of input 1, output 3, cache read 0.03, but the documentation master table hasn’t added that row yet; earlier-launched models like glm-5.2 already have their own rows. For budgeting, go by the pricing page and the actual billing in the console.
Q7: Can cloud pricing be converted into a “monthly cost per machine”?
No. Per-token tiers describe usage cost, while self-hosting cost depends on hardware scale, utilization, electricity rates, and how you amortize depreciation. There’s no direct bridge between the two accounting frameworks. Forcing a conversion just gives you a number that looks precise but can’t actually serve as a basis for decisions.
Self-Hosted Large Language Models vs Cloud APIs: Key Takeaways
- Different cost shapes: Self-hosting means buying capacity, the cloud means buying usage — the crossover point is set purely by volume and utilization rate.
- Open source doesn’t mean cheap: Ergo’s weights are open and licensed for commercial use, but the hardware and ops costs of deploying them are a separate line item.
- No standard hardware yardstick: The official team hasn’t published a standard GPU count for Ergo, so your budget has to come from your own stress testing.
- Read the price sheet by tier: The three-tier structure of input, output, and cache reads is what determines real cost in long-prefix scenarios.
- Small or fast-changing workloads belong on the API: For teams with low call volume that swap models often, switching cost matters more than unit price.
- Only self-host if compliance demands you hold the weights: The weights must stay on your own machines, and you can absorb a hardware budget nobody has published.
- Hybrid is the third option: Self-host the baseline, send peaks to the API — the price is maintaining two pipelines.
Summary
Back to the original question: now that Ergo has opened its weights, should you self-host? The answer doesn’t hinge on Ergo — it hinges on your books.
- Look at usage: If call volume is small or highly variable, pay-as-you-go cloud API pricing tracks your actual consumption more closely.
- Look at who holds the weights: If contracts or regulators require the weights to stay in your own domain, self-hosting is the only way out, and cost takes a back seat to compliance.
- Look at your team’s capabilities: For teams without GPU ops staff, the hidden costs of self-hosting will blow past expectations.
- Look at budget certainty: When there’s no official hardware yardstick, it comes down to whether you’re willing to accept a range-shaped investment.
If you’re still on step one, measure your token distribution with real samples before you talk about infrastructure. A quick way to validate is APIYI (apiyi.com): one compatible interface gets your business running first, and once your usage curve settles down, you can decide whether to move baseline workloads back to your own machines.
References
-
Hugging Face model page – Amazon-FMR/Ergo: the open-weight release repository
- Link:
huggingface.co/Amazon-FMR/Ergo - Notes: Open weights as of 2026-12-01; the license permits commercial use, subject to the usage policy
- Link:
-
APIYI platform pricing page: where you check pay-as-you-go tiers
- Link:
apiyi.com - Notes: This page is the source of truth for the three price tiers — input, output, and cached read — along with availability status
- Link:
-
APIYI documentation center: the master list of APIs and models
- Link:
help.apiyi.com - Notes: The master documentation table lags behind the pricing page — glm-5.2 already has a corresponding row, but ergo isn’t listed yet
- Link:
Author: APIYI Technical Team
Technical exchange: Feel free to reach out through the APIYI apiyi.com homepage. For API docs and the model list, head to the help center.