SS Research

Local LLM vs. API Cost: When Does Self-Hosting Actually Win?

Compare local LLM vs. API cost with current token and GPU prices, capacity-constrained break-even math, operations, redundancy, quality, and caching.

Published Aug 10, 2026Updated Aug 10, 2026Data checked Aug 10, 2026By Software Second

01 Executive answer

Bottom line

Self-hosting does not win at a universal token count. In this worked 1,800-input/400-output scenario, a lean $4,699 local system crosses current GPT-5.6 Terra pricing at about 5,048 requests per day—but its illustrative planned capacity is only 5,750. At 5,500 requests per day it saves just $114 a month. Add a full spare and 20 monthly engineering hours, and the Terra crossing moves beyond the active node's capacity. At low, bursty, cacheable, or inexpensive-model volume, an API is economically obvious. Run locally when measured steady demand survives full-cost and quality tests, or when offline operation, control, latency, or data requirements justify paying more.

Use hosted APIs by default; run locally only after a quality-gated, capacity-valid full-cost crossing survives operations and redundancy.Confidence: moderate
READ THIS FIRST

A model is only as good as its assumptions.

02

The direct answer

Pricing checked: August 10, 2026. OpenAI's live standard short-context rates were Sol at $5 input, $0.50 cached input, $6.25 cache write, and $30 output; Terra at $2, $0.20, $2.50, and $12; and Luna at $0.20, $0.02, $0.25, and $1.20 per million tokens. Batch and Flex were half standard rates. Fast and long-context requests use different multipliers. Those mechanics are large enough to change the infrastructure decision.

Run your workload in the API vs. Local AI Calculator. Enter a capacity you have derived from a representative benchmark; do not accept its illustrative default as evidence. This article shows how to produce that input and where the calculator stops.

03

Cost is the second test; service equivalence is the first

A local LLM and an API are not interchangeable merely because both accept text and return tokens. Compare endpoints only after they pass the same task set and operating threshold. A cheaper local answer that creates more review, escalations, unsafe actions, malformed output, or missed deadlines is not the same unit of work.

The same-service gate
TestMeasure on representative trafficWhy price alone fails
Task qualityAcceptance, factuality, instruction following, structured-output successA rejected output still consumes tokens and human time
Human burdenReview minutes, escalation rate, correction and fallback callsA small rate difference can exceed the nominal infrastructure saving
LatencyTTFT, per-user generation speed, p50, p95 and p99 end-to-end latencyAggregate tokens per second can hide a slow user experience
ReliabilityUptime, queueing, timeout, retry, recovery and failoverA spare or fallback changes both cost and capacity
CapabilityContext, tools, modalities, safety controls and observabilityA lower rate can buy a different service
ChangeUpgrade cadence, regression rate and migration effortLocal control creates local ownership

The local example uses gpt-oss-120b because it fits the chosen device and has a disclosed benchmark. OpenAI described it against the then-current o4-mini on selected 2025 benchmarks. That does not establish parity with 2026 Sol or Terra, and this article does not claim it.

A tiny quality difference can dominate

165,000 requests/month × 0.1% extra escalations × $5/case = $825/month

At 5,500 requests per day, the lean local cost advantage is only $113.81 per month. The illustrative escalation change reverses it more than seven times over.

04

What the local LLM vs. API cost model must count

Hosted API monthly cost

requests/day × days × [(uncached input × input rate + cached input × cache-read rate + cache writes × write rate + output × output rate) ÷ 1,000,000] + tools + retries + fallbacks

Use billed provider logs where possible. Prompt averages alone omit output mix, caching, retries, and non-token charges.

Owned monthly-equivalent cost

hardware/life + setup/life + engineering + power/facility + monitoring/maintenance + storage/network + redundancy

Monthly equivalence supports a crossing comparison; cash payback must keep initial purchase and setup as initial cash rather than amortizing them twice.

Costs that belong in the same ledger
LayerHosted APIOwned localRented GPU
Variable useInput, output, cache, tools, retriesPower and wear; often small beside laborGPU-hours, storage and transfer
Initial workEvaluation, integration and controlsEvaluation, server, security, deployment and migrationEvaluation, image, server and deployment
OperationMonitoring, quota, vendor and fallbackPatching, observability, incidents, capacity and upgradesThe same platform operation plus provider management
ReliabilityMulti-region or provider fallback where requiredSpare or multi-node fleet, failover and recoveryAdditional instance, reserved capacity or API fallback
ChangeProvider model and price migrationWeights, quantization, serving stack and hardware migrationImage, GPU type and provider migration
QualityReview, correction and escalationReview, correction and escalationReview, correction and escalation

This analysis preserves that canonical structure instead of inventing a competing registered model. The calculations are transparent Software Second inference, not AEM output. Read the Software Second methodology for the broader rule: compare credible alternatives against the same outcome and include the system that operates, not only the component with a posted price.

05

Worked scenario: capacity before break-even

Illustrative workload and owned-hardware inputs—not benchmarks for your company
InputValueStatus
Request shape1,800 input; 400 output tokensIllustrative
Operating month30 daysIllustrative
Local modelgpt-oss-120b MXFP4Named scenario; no hosted-quality parity claimed
DeviceOne DGX Spark at $4,699Price checked 2026-08-10
Vendor benchmark1,725.47 prompt; 55.37 generation tokens/secondBatch 1; 2,048 input; 128 output
Planning duty factor55%Illustrative reserve for headroom
Useful life36 months; zero residualIllustrative
Lean labor$6,000 setup; $800/month operationIllustrative at $100/hour
Facility and monitoring$75 + $100/monthIllustrative broad allowances
Serial service-time extrapolation

1,800/1,725.47 + 400/55.37 = 8.27 seconds/request

Prompt processing is about one second; decoding the longer output is more than seven. Output length therefore affects both API cost and local capacity.

Illustrative planned capacity

86,400/8.27 × 55% = approximately 5,750 requests/day

The theoretical serial maximum is about 10,451 requests per day. The 55% factor is a planning assumption, not measured utilization.

The duty-factor assumption changes whether a crossing exists
Planning factorEntered capacityCan a 5,048/day Terra crossing fit?
30%3,135/dayNo
55%5,748/day, rounded to 5,750Yes, with about 700/day of headroom
75%7,838/dayYes, with less theoretical reserve

Do not ship from this arithmetic. NVIDIA's source workload has only 128 output tokens, while this scenario assumes 400. Production TTFT and end-to-end latency include queueing, batching, networking, prefill, and decoding; per-user throughput can fall as concurrency rises even while aggregate throughput initially rises. Benchmark the exact model, quantization, server, prompt distribution, output distribution, concurrency, thermal conditions, and p95 SLO.

06

The lean owned system crosses Terra at 5,048 requests per day

Terra request cost

1,800 × $2/1M + 400 × $12/1M = $0.0084/request

The 400 output tokens are only 18% of tokens but 57% of request cost. A total-token threshold would conceal that mix.

Lean monthly-equivalent local cost

$4,699/36 + $6,000/36 + $800 + $75 + $100 = $1,272.19

The scenario has $10,699 initial cash and $975 monthly recurring cost. Its three-year local total is $45,799.

One fleet, several workload levels
Requests/dayTerra/monthLocal/month equivalentLower-cost result
100$25.20$1,272.19API by $1,246.99
1,000$252.00$1,272.19API by $1,020.19
3,000$756.00$1,272.19API by $516.19
5,000$1,260.00$1,272.19API by $12.19
5,500$1,386.00$1,272.19Local by $113.81
5,750$1,449.00$1,272.19Local by $176.81; no planned headroom
Capacity-valid break-even

$1,272.19 ÷ ($0.0084 × 30) = 5,048 requests/day

Here, high volume means about 151,000 monthly requests, 273 million input tokens, and 61 million output tokens—and only if the demand is steady enough to occupy the device.

Payback is not the same as a three-year win
VolumeCash payback using $10,699 initial and $975 recurringThree-year comparison
5,000/dayNo payback within the 36-month life; simple extrapolation is 37.5 monthsAPI $45,360; local $45,799—API still lower
5,500/day26.0 monthsAPI $49,896; local $45,799—local lower by $4,097
5,750/day22.6 monthsAPI $52,164; local $45,799—local lower by $6,365, at the capacity ceiling
07

The hidden-cost ladder moves break-even from 614 to impossible

Same hardware and workload, progressively complete cost
Included costMonthly equivalentTerra crossing
Hardware amortization plus 240W maximum power envelope$154.69614 requests/day
Hardware, setup, broad facility allowance and monitoring$472.191,874/day
Add eight engineering hours/month$1,272.195,048/day
Add ten engineering hours/month$1,472.195,842/day—above planned capacity
Full passive spare plus twenty engineering hours/month$3,044.3912,081/day—above active capacity

The national power envelope is modest: at the EIA's preliminary 13.79 cents/kWh commercial average, 730 hours at the 140W SoC TDP is about $14.09 and at the 240W PSU rating about $24.16. Those are not measured wall-power results, and cooling, UPS, space and network remain. More importantly, power is not the cost line that determines this example; engineering and reliability are.

Production sensitivity: one active device and one passive spare
ComponentValueEconomic treatment
HardwareTwo systems: $9,398One active; one passive, so capacity stays 5,750/day
Setup$12,000120 hours at $100; initial cash
Operations$2,000/monthTwenty engineering hours
Facility and maintenance$450/monthEntered for the full fleet
Monthly equivalent$3,044.39Crossing comparison
Three-year total$109,598Initial plus 36 recurring months

The production crossing is 12,081 Terra requests/day, more than twice active capacity. Calling that a break-even would be false. The next step is not to ignore capacity—it is to size another active fleet, add its cost, and calculate a new step. This is why the common claim that self-hosting always crosses eventually is incomplete.

08

Caching, batch, output length, and model choice can erase the crossing

Terra mechanics with the same lean local scenario
API workloadCost/requestPlanned local capacityLocal crossingCapacity-valid?
Standard; 1,800 input and 400 output$0.0084005,750/day5,048/dayYes; about 700/day headroom
Batch or Flex; 1,800 input and 400 output$0.0042005,750/day10,097/dayNo
60% steady cache-read share; 1,800 input and 400 output$0.0064565,750/day6,569/dayNo; excludes write amortization
Standard; 1,800 input and 50 output$0.00420024,417/day10,097/dayYes; about 14,320/day headroom
Standard; 1,800 input and 1,000 output$0.0156002,488/day2,718/dayNo; about 230/day beyond capacity

The cache row uses 720 uncached input tokens at $2/M, 1,080 cached-read tokens at $0.20/M, and 400 output tokens at $12/M. It omits the $2.50/M cache-write cost until the reuse schedule is known. Batch and Flex have different latency and availability characteristics, so the discount applies only if the work can accept that service.

The output-length rows recalculate local capacity instead of carrying forward the 400-output limit. At 50 output tokens, 1,800/1,725.47 + 50/55.37 is 1.95 serial seconds per request, yielding about 24,417 planned requests/day at the same 55% factor. At 1,000 output tokens, service time rises to 19.10 seconds and planned capacity falls to about 2,488/day. The 2,718/day price crossing is therefore not capacity-valid.

Rate sensitivity only—the models are not assumed equal
Hosted endpointInput/output USD per 1MCost/requestLean local crossing
OpenAI Sol$5 / $30$0.021002,019/day
OpenAI Terra$2 / $12$0.008405,048/day
OpenAI Luna$0.20 / $1.20$0.0008450,484/day
Claude Sonnet 5 introductory through Aug. 31$2 / $10$0.007605,580/day
Claude Sonnet 5 from Sept. 1$3 / $15$0.011403,720/day
Claude Haiku 4.5$1 / $5$0.0038011,160/day
Gemini 3.5 Flash$1.50 / $9$0.006306,731/day
Gemini 3.5 Flash-Lite$0.30 / $2.50$0.0015427,537/day

This table answers how sensitive the arithmetic is to price, not which model should win. Providers tokenize differently—Anthropic warns that its newer tokenizer can produce approximately 30% more tokens for the same text, depending on workload—and task quality may differ far more than price. Export actual billed token counts and evaluate each endpoint independently.

09

Rented GPUs buy reversibility, not automatically lower cost

Lambda listed a GH200 96 GB at $2.29 per GPU-hour and an H100 PCIe 80 GB at $3.29 on August 10. At 730 continuously rented hours, compute alone is $1,671.70 and $2,401.70 per month. Per-minute billing makes rental useful for pilots and temporary demand; always-on rental needs the same operating-cost discipline as owned hardware.

Always-on rental cost floors—no throughput parity assumed
GPUCompute/monthMonthly equivalent with lean setup and operationUnconstrained Terra price crossing
GH200 96 GB$1,671.70$2,738.3710,867/day
H100 PCIe 80 GB$2,401.70$3,468.3713,763/day
10

When local can be right even when it costs more

Non-price requirements can decide before break-even
RequirementWhy local may winWhat local must own
Offline or air-gapped operationNo external inference dependencyPatch, access, logging, backup and incident controls
Data jurisdiction and retentionDirect placement and deletion controlEvidence that the complete local stack meets the requirement
Stable low latencyNo internet path and direct schedulingQueueing, concurrency, failover and peak capacity
Weights and customizationPinned model, quantization and fine-tuning freedomRegression evaluation, upgrades and migration
Vendor independenceMore control over endpoint changesHardware and serving-stack dependencies remain
Predictable steady workloadOwned capacity can be highly occupiedIdle reserve and demand risk shift to the operator

Privacy is not a binary local-good/API-bad claim. OpenAI says API inputs and outputs are not used for training by default; standard abuse-monitoring logs may be retained up to 30 days, and eligible customers can apply for Zero Data Retention or Modified Abuse Monitoring subject to endpoint restrictions. Local operation can provide stronger direct control, but it also transfers security, access, audit, patching and incident responsibility to the operator.

A control requirement should be stated as a requirement, measured, and priced. It is legitimate to choose a more expensive local service for offline availability or jurisdiction. It is not legitimate to claim that the local system is cheaper by leaving the cost of achieving that control out of the ledger.

11

Software Second decision

Choose the infrastructure that survives the complete test
ConditionEconomic priorReason
Low or uncertain volumeHosted APIVariable billing avoids idle hardware and platform work
Burst-heavy workloadAPI or hybridPeak capacity does not sit idle between bursts
Deferrable repeat workCompare API Batch with scheduled rentalBoth can avoid always-on cost
Steady load above a capacity-valid crossingEvaluate owned localFixed cost may be occupied enough to win
Crossing disappears after operations or redundancyHosted APIThe local saving was not production-real
Strict offline, control or jurisdiction requirementLocal may win despite higher cash costThe constraint, not token price, is the decision
Near the boundary or quality varies by taskHybridLocal can serve routine work while API handles peaks, fallback and frontier cases
  1. Export at least a representative month of billed requests, uncached input, cached reads and writes, output, retries, tool fees and fallback calls.
  2. Build a task evaluation and measure acceptance, human review, escalation, safety, structured-output success and failure consequence for every candidate endpoint.
  3. Benchmark prompt and output distributions under expected concurrency; set TTFT, p95 end-to-end latency, uptime and recovery targets.
  4. Price setup, security, monitoring, incidents, maintenance, upgrades, migration, power, facility, storage and required redundancy with named owners.
  5. Derive planned capacity from the benchmark and an explicit reserve; reject any crossing above that capacity and resize the fleet step by step.
  6. Test cache, batch, output length, cheaper adequate models, traffic variance and engineering hours before approving hardware.
  7. Pilot before purchase, and preserve an API fallback if the local quality or capacity margin is narrow.

If the infrastructure choice changes human capacity or downstream business value, carry the result into How to Calculate AI ROI and the AI ROI Calculator. Infrastructure savings are an input; they are not the whole business case.

These are generalized assumptions. Your traffic, quality threshold, engineering burden and control requirements will be different. Run the API vs. Local AI Calculator, review the methodology, then run the analysis against your company before committing capital or platform ownership.

SS

Methodology, limitations, and sources

What supports this analysis—and what it cannot establish without company-specific evidence.

M Methodology

  • Separate externally sourced facts, illustrative assumptions, model outputs, Software Second inference, and editorial judgment.

L Confidence and limitations

Confidence: moderate

  • The worked endpoint is not assumed to match any hosted model's task quality, safety, latency, context behavior, tools, or reliability.
  • The DGX Spark capacity is extrapolated from a vendor benchmark with a shorter output and is not a reproduced production p95 benchmark.
  • Engineering, useful life, facility, monitoring, redundancy, and quality-escalation values are illustrative rather than industry averages.
  • The public calculator does not derive capacity from utilization or model cache, batch, quality, tools, failures, or automatic fleet resizing.
  • Rental results are always-on cost floors without measured throughput, storage, tax, availability, or redundancy.
  • Prices and product specifications were checked on 2026-08-10 and can change quickly.
  • The arithmetic is Software Second inference built from the calculator's cost structure; it is not output from a registered economic model.

S Sources