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...
Small and cheap (under $1 per 1M)
- 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
At list price, before any batch or caching discount.
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
No price change since we started tracking on 2026-10-01. We record prices daily; changes will show here.
Phi 4 price by host
One host serves this model through OpenRouter.
- DeepInfra$0.056 in · $0.112 out · 16K ctx · 100.0% uptime 24h
Where to buy Microsoft credits for less
Phi 4 costs the same per token everywhere it's sold through OpenRouter. What changes is the price of the credits. Live quotes for $100 of usage:
Phi 4 cost calculator
Enter your monthly tokens to price your own usage.
Usage at list price$4.90/ month(quotes below are for $5.00: purchases run from $5.00 to $10,000.00)
Cheaper alternatives to Phi 4
Other labs' models in the same price range or the one below, cheaper per token.
| Model | Input / 1M | Output / 1M |
|---|---|---|
| Z.ai: GLM 5.3 Flash | $0.04 | $0.078 |
| Qwen: Qwen3.7 Flash | $0.03 | $0.13 |
| OpenAI: gpt-oss-20b | $0.03 | $0.13 |
| Google: Gemma 3 4B | $0.05 | $0.1 |
| Google: Gemma 3 12B | $0.05 | $0.15 |
| Mistral: Mistral Small 3 | $0.05 | $0.08 |