Phi 4
$0.07 per 1M input tokens and $0.14 per 1M output tokens · 16K context · JSON, open weights.
Prices checked Dec 6, 2026 · tracked by LLM Cost Index since Oct 21, 2026
What Phi 4 costs per month
Estimated monthly bill for typical workloads. Try your own numbers in the cost calculator.
| Workload | Per month |
|---|---|
| Customer chatbot 1,000 conversations a day, 8 turns each | $36.96 |
| Document Q&A (RAG) 500 questions a day over retrieved documents | $7.35 |
| Coding / tool-using agent 200 tasks a day, long tool-heavy contexts | $28.56 |
| Content generation 30 long articles a day | $0.504 |
| Classification / extraction 100,000 short items a day | $69.30 |
Price history
No input price change since Oct 21, 2026. See all recent price changes.
Where to run Phi 4: 2 providers
DeepInfra is the cheapest at $0.056 input / $0.112 output per 1M tokens. Uptime is the average over the last 30 days as reported by OpenRouter; see provider reliability.
Cheaper alternatives to Phi 4
Models with the same structured output for at least 20% less (3:1 input/output mix), most capable first.
| Model | Input / 1M | Output / 1M | Context | Capabilities |
|---|---|---|---|---|
| DeepSeek V4.1 Flash 1017 DeepSeek | $0.02 | $0.20 | 1.05M | visiontoolsreasoningJSONopen weights |
| Lyria 3 Clip Preview | $0 | $0 | 1.05M | visionJSON |
| Lyria 3 Pro Preview | $0 | $0 | 1.05M | visionJSON |
| Tinsel Alpha Stealth | $0 | $0 | 1.05M | visionaudiotoolsreasoningJSON |
| Solar Mini 4.5 Upstage | $0.01 | $0.04 | 524K | toolsreasoningJSON |
What to switch to before Phi 4 is retired
Replacements with the same must-have capabilities (text) and enough context, most capable first. See all models being retired.
| Replacement | Input / 1M | Output / 1M | Price vs today |
|---|---|---|---|
| Claude Fable 5.2 | $8.00 | $40.00 | 18186% more |
| Gemini 4 Neon | $3.00 | $15.00 | 6757% more |
| GPT-6.2 Astra | $8.00 | $40.00 | 18186% more |
| Gemini 4 Carbon | $4.00 | $20.00 | 9043% more |
How to pay less for Phi 4
For a customer chatbot (1,000 conversations a day, 8 turns each) that costs $36.96 a month at list price without caching:
| Option | Per month | You save |
|---|---|---|
| Move to DeepSeek V4.1 Flash 1017 (similar capabilities) | $19.90 | $17.06 (46%) |
| Route to DeepInfra (flex tier) | $29.57 | $7.39 (20%) |
Other workloads: cut-your-bill tool for Phi 4.
Specifications
| Model ID | microsoft/phi-4 |
| Input | text |
| Output | text |
| Tool calling | No |
| Structured output | Yes |
| Reasoning mode | No |
| Open weights | Yes — microsoft/phi-4 |
| Knowledge cutoff | 2024-06-30 |
| Released | Jan 10, 2025 |
FAQ
- How much does Phi 4 cost?
- $0.07 per million input tokens and $0.14 per million output tokens. Prices as of Dec 6, 2026.
- What is the context window of Phi 4?
- 16K tokens, with up to 15K output tokens per response.
- Does Phi 4 support images, tools and structured output?
- Images as input: no. Tool calling: no. Structured (JSON) output: yes. Reasoning mode: no.
- What are cheaper alternatives to Phi 4?
- Models with the same key capabilities for at least 20% less include DeepSeek V4.1 Flash 1017 ($0.02 / $0.20), Lyria 3 Clip Preview ($0 / $0), Lyria 3 Pro Preview ($0 / $0).
More from Microsoft: all Microsoft models · how we collect prices