Microsoft: Phi 4 API Pricing
Microsoft: Phi 4 costs $0.070 per 1M input tokens and $0.140 per 1M output tokens. Context window: 16K. Prices verified 2026-10-21 · source
Alternatives to consider
64% cheaper with nearly identical quality (20.1 vs 5.9)
+37.5 quality points for 14% more
Rebuilt daily from our snapshot archive — the chart appears once a model has 5+ snapshots of history.
High adoption means battle-tested weights, more fine-tunes/quants, and faster bug fixes. View on HuggingFace →
From our own daily snapshot archive — independent of provider announcements.
Intelligence measures reasoning/knowledge/coding benchmarks. A high score with a low blended price = value pick; check the value chart to see where this model lands.
Training data ends here — newer events require retrieval or web search.
What would Microsoft: Phi 4 cost you per month?
| Workload | Requests/mo | Avg tokens (in/out) | Est. monthly cost |
|---|---|---|---|
| Light chatbot | 10,000 | 800 / 400 | $1.12 |
| Coding agent | 5,000 | 8,000 / 2,000 | $4.20 |
| RAG pipeline | 30,000 | 4,000 / 500 | $10.50 |
| Doc summarizer | 2,000 | 20,000 / 1,000 | $3.08 |
Estimates use list prices without prompt caching. Caching can cut input cost by up to 90% on repeated context.
About Microsoft: Phi 4
[Microsoft Research](/microsoft) 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...
Compare Microsoft: Phi 4 with
- Phi 4 vs OpenAI: GPT-5.6 Terra Pro
- Phi 4 vs Anthropic: Claude Fable 5
- Phi 4 vs Anthropic: Claude Opus 5
- Phi 4 vs OpenAI: GPT-5.6 Sol
Popular head-to-heads — see all on the comparisons index.
Frequently asked questions
How much does Microsoft: Phi 4 cost?
Microsoft: Phi 4 costs $0.070 per 1M input tokens and $0.140 per 1M output tokens. Verified 2026-10-21 — provider source.
What is the context window?
16K tokens, with up to 15K output tokens per response. That's roughly 20 pages of text in a single request.
Does it support prompt caching?
Prompt-caching pricing is not published for this model via OpenRouter.
What's a cheaper alternative?
ScaleDown: Summarize saves about 68% on a typical workload with comparable quality.
Official resources
- Microsoft: Phi 4 on OpenRouter — live endpoint, pricing source of record.
- Artificial Analysis leaderboard → — independent intelligence and performance rankings.
- Shred your current bill — paste a CSV and see if switching saves money.