Self-host phi 4 vs. API cost
Live OpenRouter API pricing is $0.07/1M input & $0.14/1M output. Renting 1× L4 on Vast.ai costs $0.32/hr ($234/mo) and breaks even at 87.3M tokens/day.
Interactive breakeven calculator
All FP8 self-hosting setups for phi-4 (~18 GB VRAM)
| GPU setup | Provider | GPU / hr | Monthly (730h) | Est. peak tok/s | Self-host $/1M @ 40% | Breakeven | Deploy |
|---|---|---|---|---|---|---|---|
| 1× NVIDIA L4 Cheapest | | $0.32/hr | $234 | 78 tok/s | $2.866 | 87.3M/day | Launch ↗ |
| 1× NVIDIA RTX 4090 | | $0.38/hr | $277 | 267 tok/s | $0.987 | 103.6M/day | Launch ↗ |
| 1× NVIDIA RTX A6000 | | $0.40/hr | $292 | 202 tok/s | $1.371 | 109.1M/day | Launch ↗ |
| 1× NVIDIA RTX A6000 | | $0.45/hr | $329 | 202 tok/s | $1.543 | 122.7M/day | Launch ↗ |
| 1× NVIDIA RTX 4090 | | $0.45/hr | $329 | 267 tok/s | $1.169 | 122.7M/day | Launch ↗ |
| 1× NVIDIA RTX 5090 | | $0.53/hr | $387 | 475 tok/s | $0.776 | 144.5M/day | Launch ↗ |
| 1× NVIDIA L4 | | $0.56/hr | $409 | 78 tok/s | $5.015 | 152.7M/day | Launch ↗ |
| 1× NVIDIA A100 80GB SXM | | $0.58/hr | $423 | 540 tok/s | $0.745 | 158.2M/day | Launch ↗ |
All 4-bit (Q4) self-hosting setups for phi-4 (~11 GB VRAM)
| GPU setup | Provider | GPU / hr | Monthly (730h) | Est. peak tok/s | Self-host $/1M @ 40% | Breakeven | Deploy |
|---|---|---|---|---|---|---|---|
| 1× NVIDIA L4 Cheapest | Vast.ai | $0.32/hr | $234 | 143 tok/s | $1.548 | 87.3M/day | Launch ↗ |
| 1× NVIDIA RTX 4090 | TensorDock | $0.38/hr | $277 | 488 tok/s | $0.540 | 103.6M/day | Launch ↗ |
| 1× NVIDIA RTX A6000 | Vast.ai | $0.40/hr | $292 | 371 tok/s | $0.748 | 109.1M/day | Launch ↗ |
| 1× NVIDIA RTX A6000 | TensorDock | $0.45/hr | $329 | 371 tok/s | $0.841 | 122.7M/day | Launch ↗ |
| 1× NVIDIA RTX 4090 | Vast.ai | $0.45/hr | $329 | 488 tok/s | $0.640 | 122.7M/day | Launch ↗ |
| 1× NVIDIA RTX 5090 | Vast.ai | $0.53/hr | $387 | 865 tok/s | $0.426 | 144.5M/day | Launch ↗ |
| 1× NVIDIA L4 | Google Cloud | $0.56/hr | $409 | 143 tok/s | $2.710 | 152.7M/day | Launch ↗ |
| 1× NVIDIA A100 80GB SXM | Vast.ai | $0.58/hr | $423 | 982 tok/s | $0.410 | 158.2M/day | Launch ↗ |
Physics & breakeven methodology
1. Dollar breakeven: breakeven_M_per_day = (GPU_$/hr × 24) ÷ blended_API_$/1M.
We pull live token pricing from OpenRouter's public API so API benchmarks stay current.
2. Throughput & node count: Autoregressive decoding is memory-bandwidth bound:
single_stream_tok_s = min(250, (total_BW_TB/s × 600) ÷ active_GB) using 14.7B active parameters. Continuous batching (vLLM / SGLang) multiplies peak node throughput by 6.5×, scaled by your selected utilization preset (15%, 40%, or 75%). If your daily volume exceeds 1 node's capacity, the calculator automatically multiplies the node count needed.