API vs self-hosting: which is cheaper?
Compare what a model API costs per month with renting your own GPUs, and see the volume where self-hosting becomes cheaper.
1. Your usage
Input = what you send (prompt, documents). Output = what the model writes.
2. API price
3. Your GPUs
Sizing helper (optional)
Open the fit calculator for detailsAdvanced
Result
API per month
—
Enter requests and average tokens
Self-hosting per month
—
Enter requests and average tokens
Formula & assumptions
monthly tokens = requests/day × tokens/request × 30.4 days
API cost = input_M × input_price + output_M × output_price
setup cost = GPU count × price per GPU × hours + other costs
self-hosting cost = setup cost
blended API price = output_price + (input_M ÷ output_M) × input_price
break-even output_M = setup cost ÷ blended API price
Self-hosting cost is fixed whether the GPUs are busy or idle. API cost has no idle cost. Engineering time is only included if you enter it. Model quality, latency and rate limits are not compared. The input to output ratio is kept constant for the break-even.