Phi-4 API Pricing
Open-weight · 16K context · Available from 7 hosts. Cheapest: Novita at $0.056 input / $0.112 output per 1M tokens.
Phi-4 ($0.07/$0.14 per 1M tokens) is priced the same as StableLM 2 12B (Fireworks) ($0.105/$0.105) and priced the same as Phi-4 (Together) ($0.07/$0.14) among the 294 open-weight models tracked here. Its 16K context window is smaller than most open-weight models tracked here.
Phi-4 price by host (7 providers)
| Host | Input /1M | Output /1M | In+Out |
|---|---|---|---|
| Novita | $0.056 | $0.112 | $0.168 |
| DeepInfra | $0.0595 | $0.119 | $0.1785 |
| Groq | $0.0665 | $0.133 | $0.1995 |
| Microsoft | $0.07 | $0.14 | $0.21 |
| Together | $0.07 | $0.14 | $0.21 |
| OpenRouter | $0.07 | $0.14 | $0.21 |
| Fireworks | $0.0735 | $0.147 | $0.2205 |
Prices per 1M tokens, USD. Snapshot 2026-07 — verify with the provider before relying on them.
Phi-4 cost calculator
Frequently asked
Phi-4 costs $0.056 per 1M input tokens and $0.112 per 1M output tokens at its cheapest host (Novita).
Phi-4 supports a context window of about 16K tokens. Remember every token in the context is billed on each call.
Across 7 hosts, Novita is currently cheapest at $0.056/$0.112 per 1M tokens, versus Fireworks at $0.0735/$0.147. Prices change often — use the comparison table above.