AI Inference Cost: API vs Self-Host

Find the request volume where self-hosted AI inference starts to beat per-token API pricing — an interactive calculator for AI cost crossover points.

This calculator answers one question. At what monthly request volume does it cost less to run your own GPU than to pay an API for each token?

It is for a team that has an API bill or a GPU quote and needs to compare the two.

Choose a workload preset, or set the tokens in and out for each request and the requests for each month. Then set the API price for each million tokens. For the self-hosted side, set the monthly cost of one GPU unit, its throughput in tokens for each second, the share of time it is busy, and the fixed monthly operations cost.

Read the two cost lines on the chart. The circle marks the crossover, the volume where the lines meet. On one side of it the API costs less. On the other side self-hosting costs less. The line under the chart names the cheaper option at your volume. The tool buys whole GPU units, so the self-hosted line rises in steps.

Worked example with the default inputs. The workload is 250,000 requests a month, with 4,000 tokens in and 600 tokens out for each request. That is 1,000 million tokens in (1 billion), at $2.50 for each million, which costs $2,500. It is 150 million tokens out, at $10 for each million, which costs $1,500. The API total is $4,000 a month. One GPU unit runs at 60 tokens a second and is busy 60% of the time. In a 30-day month it handles 60 × 0.6 × 2,592,000 seconds, which is 93.3 million tokens. The workload is 1,150 million tokens, so it needs 13 units. 13 × $1,800 plus $1,500 of operations cost is $24,900 a month. At these defaults the API costs less, and the tool shows no crossover in the plotted range.

All default prices and rates are illustrative. They are not the price list of any provider. Replace them with your own figures.

Workload
API pricing ($ / 1M tokens)

Illustrative list prices — frontier API: $2.50 in / $10 out. Mid-tier hosted open weights: ~$0.90 / $0.90. Small/efficient: $0.15 / $0.60.

Self-hosted inference unit

Throughput examples: 70B model on H100-class ≈ 30–50 tok/s. 7–13B model on RTX 4000 / A10G ≈ 100–180 tok/s.

API cost / month —
Self-host cost / month —
Crossover at —
Units needed —

—