Microsoft · live price
Phi 4 API pricing
Microsoft Research Phi-4 is designed to perform well in complex reasoning tasks and can operate efficiently in situations with limited memory or where quick responses are needed. At 14 billion...
- Input
- $0.07
- per 1M tokens
- Output
- $0.14
- per 1M tokens
- Cached input
- –
- per 1M tokens
- Context
- 16K
- 15K max output
List price from OpenRouter, which passes Microsoft's price through without markup. Refreshed hourly. Released January 10, 2025. Model id microsoft/phi-4.
What Phi 4 costs in practice
1,000 chat messages
$0.14
1,000 input + 500 output tokens each
1,000 RAG questions
$0.63
8,000 input + 500 output tokens each
100 coding-agent steps
$0.24
30,000 input + 2,000 output tokens each, no caching
Phi 4 price history
Phi 4 price by host
- DeepInfra$0.07 in · $0.14 out · 16K ctx · 100.0% uptime 24h
Where to buy Microsoft credits for less
Disclosure: this site is run by the team behind smaaart, one of the options compared. Tables are ranked by price only, from live quotes and published fees, including when smaaart isn't first. How we compare
Phi 4 cost calculator
Cheaper alternatives to Phi 4
| Model | Input / 1M | Output / 1M |
|---|---|---|
| Qwen: Qwen3.7 Flash | $0.03 | $0.13 |
| DeepSeek: DeepSeek V4 Flash 0423 | $0.042 | $0.084 |
| OpenAI: gpt-oss-120b | $0.037 | $0.17 |
| OpenAI: gpt-oss-20b | $0.018 | $0.09 |
| Qwen: Qwen3 30B A3B Instruct 2507 | $0.048 | $0.193 |
| Google: Gemma 3 4B | $0.05 | $0.1 |
Other Microsoft models
| Model | Input / 1M | Output / 1M |
|---|---|---|
| WizardLM-2 8x22B | $0.62 | $0.62 |