Compare the cost of an outcome, not the price of one token

The question “Is an API or a local model cheaper?” cannot be answered with a rate card alone. A business needs the cost of a correctly completed task, including retries, employee review, infrastructure, and downtime. A local server usually creates a more predictable fixed cost; an API charges for actual usage. Yet a purchased GPU sits idle at low load, while at high and steady load it may cost less per result if it meets the required throughput.

Compare the same workload: the same document types, quality bar, and deadline, using the same path from request to accepted result. Otherwise, you are comparing two different products, not two deployment options.

Define the unit of work first

Consider a task where a model retrieves context from an internal knowledge base, drafts an answer, and an employee approves or edits it. The unit is not “one model call” but one accepted draft. A thousand requests may require more than a thousand calls: some are retried, some trigger classification or search, and an agent workflow may take several steps.

During a two- or three-week pilot, measure for each task type:

  • input and output tokens—the average and upper percentiles, including RAG context length;
  • model calls and retries per accepted result;
  • the share of answers accepted without substantial edits;
  • waiting time: median and 95th percentile, including queueing;
  • the cost of manual review and error correction;
  • hourly load, concurrent requests, and seasonal peaks.

Tokens are not the whole result. An option that costs less on the invoice but needs ten minutes of review or misses the response deadline is not cheaper for the process.

API formula: the rate multiplies actual token use

For a simple text workload, estimate monthly variable cost as:

`API = requests × (input tokens × input rate + output tokens × output rate) / 1,000,000 × exchange rate`.

Then add separate line items: knowledge-base retrieval, reranking, document recognition, logging, paid tools, and retries. This can materially change the total: FinOps Foundation guidance for production RAG and agentic systems estimates that infrastructure around the model can account for 40–60% of feature spend; treat this as a reference, not a universal share for every project. Apply prompt caching or batch discounts only to the share of traffic where they are actually available; do not assume the entire workload receives a discount.

As a worked reference, take the published standard-mode GPT‑6.2 Sol rate: $2 per million input tokens and $10 per million output tokens on the [official API pricing page](https://developers.openai.com/api/docs/pricing). If one accepted result averages 5,000 input and 1,000 output tokens, its modeled price is $0.01 + $0.01 = $0.02 before retrieval, extra calls, and review. This is not a quality comparison against a specific local model or a recommendation to use that service. Russian businesses must separately check availability, payment, and data-processing terms.

For a ruble reference, assume 100 RUB per dollar solely for this example. This is a planning assumption, not the current exchange rate. The API variable cost would be about 2 RUB per accepted result: 20,000 RUB per month at 10,000 tasks, 200,000 RUB at 100,000, and 400,000 RUB at 200,000. If the real workflow uses twice the tokens or calls per result, scale the estimate accordingly.

A local model does not have zero fixed cost

Add all costs for the same month, not just the graphics card:

  • server and GPU depreciation over their useful life;
  • electricity and cooling, including the rest of the server platform;
  • redundancy, network infrastructure, disks, and backups;
  • setup, updates, monitoring, incident response, and engineering staff time;
  • spare capacity for peaks when required by the service-level objective.

For illustration only, assume a server package costs 3.6 million RUB and is depreciated over 36 months: 100,000 RUB per month. Add 15,000 RUB for power, cooling, and other running costs, plus 80,000 RUB for operational support and an engineer’s allocated time. The modeled fixed cost is 195,000 RUB per month. This is not a market quote: replace both hardware cost and support assumptions with vendor quotations and your team’s actual plan.

If result quality is equal, these assumptions put the API/local break-even point at `195,000 RUB / 2 RUB ≈ 97,500` accepted tasks per month. Below that volume, the example’s pay-per-use API is cheaper; above it, the local model may win on direct cost. The threshold moves with rates, context size, output length, error rate, model quality, hardware utilization, and staff cost.

Load and latency change the economics

Request count alone does not tell you whether one server can handle the work on time. Measure tokens per second, time to first token, queueing, and p95 latency on your model, context length, and expected concurrency. vLLM exposes queue, latency, generation, and KV-cache metrics through its `/metrics` endpoint. See the [vLLM production metrics guide](https://docs.vllm.ai/en/stable/usage/metrics/).

Concurrency is not a theoretical detail. In a separate InferenceProfiler study using one Llama 3.2 3B workload and cloud GPUs, the cost of one million output tokens varied by roughly 27 times between sequential execution and high concurrency. That result applies to a particular model, hardware, and cloud prices; it is not a universal business estimate. It does show why “divide the GPU price by requests” gives a misleading answer if actual utilization has not been measured. [Study and methodology](https://faculty.washington.edu/wlloyd/papers/WOSAI26-cameraready.pdf)

Test at least three load profiles: an ordinary day, the expected peak, and a short burst. High average utilization can reduce unit cost, but queueing and latency at peak may undermine the business outcome. For a local deployment, also account for redundancy: if the only server stops, who keeps the process running?

A short pilot beats an investment made by guesswork

A practical sequence for a small or midsize business:

1. Select one stable process and collect an anonymized sample of real tasks.
2. Define acceptance criteria, manual review cost, and the response-time limit.
3. Run the same tasks through an available API and the candidate local model, counting RAG setup and retries separately.
4. Load-test the local environment at expected concurrency and capture tokens/sec, queueing, and p95; do not extrapolate a single-request test to a full month.
5. Calculate cost per accepted result and test low, baseline, and high monthly volumes.

If an API is cheaper and external processing is acceptable, it is often sensible to start there—or with a bounded pilot—for a small or irregular workload. If volume is steady, the model and quality bar are stable, the team can operate the stack, and measured utilization is high enough, evaluate a local deployment in detail. A hybrid design is also valid: sensitive or high-volume tasks stay local, while rare complex requests go to a separately approved service.

The management takeaway

Do not approve hardware based on the GPU price or choose an API based only on the cost per million tokens. Ask the process owner and IT to calculate the cost of a successful task on real traffic: tokens, calls, review, infrastructure, and latency. Under the illustrative assumptions above, break-even is about 97,500 tasks per month, but the decision must use measurements from the actual workflow and current commercial terms.