
When Is a Rented GPU Cheaper Than a Hosted LLM API?
Как сравнить оплату за токены с арендой GPU и рассчитать экономику
LLM inference costs depend on how you pay for capacity. A hosted API bills for token usage and any extras on its rate card. A rented GPU bills for time, with additional costs for operating the service. An API often costs less for sporadic requests. A dedicated instance can cost less under steady demand, provided it can handle the peak within your latency target.
Compare monthly costs on the same basis
For the API, let I and O be monthly input and output tokens in millions, and P_in and P_out the corresponding prices per million. The monthly token bill is I × P_in + O × P_out. Split out cached input tokens if the provider bills them at a different rate. Add charges such as paid tools or minimum commitments when they apply.
For self-hosting, multiply the hourly instance rate by billable hours. Add storage, network traffic, standby capacity and operating time where they incur costs. If you use several instances, sum their bills. An always-on instance runs for 720 hours in a 30-day month, including idle time. If you can shut it down between jobs, use the actual billable hours, including startup and warm-up. If you rent an LLM with a dedicated GPU on Qudata.ai, plug the rate for your chosen configuration into the formula.
Calculate break-even for your traffic mix
Suppose the workload uses three input tokens for every output token. At illustrative rates of $0.20 per million input tokens and $0.60 per million output tokens, the blended API rate is $0.30 per million total tokens. At an illustrative $0.60 per hour, an always-on instance costs $432 for 30 days. Divide $432 by $0.30 to get a break-even volume of 1,440 million tokens. That is about 556 total tokens per second averaged over the billable month.
The table compares two traffic profiles with the same input-to-output ratio. All rates are hypothetical. The GPU column includes only the rental cost of one always-on instance.
| Traffic profile | Monthly input and output | API | Rented GPU |
|---|---|---|---|
| Occasional bursts | 45M + 15M | $18 | $432 |
| Steady demand | 1,350M + 450M | $540 | $432 |
In the steady-demand example, the rental leaves $108 a month for storage, redundancy and operations before the cost advantage disappears. For occasional batches, rerun the calculation using scheduled runtime if the work can wait. For an interactive service, budget for the capacity that must stay ready when requests spike.
Verify that the instance can reach break-even
The break-even volume gives you a cost target. Replay typical requests and longer prompts to see whether the server can meet it under your actual traffic pattern. Record successful requests, time to first token and p95 end-to-end latency. Keep the input-to-output token mix from your cost estimate and measure throughput at the highest request rate that still meets your latency target. The example’s average of 556 total tokens per second is a monthly volume conversion. A single stream’s output speed measures something different. Input and output tokens have different processing costs, and queueing can dominate latency during peaks.
Compare answer quality on the same tasks. If the API and GPU use different models or tokenizers, compare cost per successful task, including retries and failures. If one instance cannot meet peak demand, price the full configuration before choosing. If you deploy the model yourself, compare GPU rental rates on Qudata.ai and use the rate for a configuration that meets your target.