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 a glance
- Input / 1M
- $0.07
- Output / 1M
- $0.14
- Context
- 16K
- Max output
- 15K
- Intelligence
- 5.9
- Released
- Jan 2025
Pricing
Phi 4 API pricing
Per-token rates, plus what common tasks actually cost.
| Input tokensPer 1M tokens | $0.07 |
|---|---|
| Output tokensPer 1M tokens | $0.14 |
| Cached input (read)Per 1M tokens | Not available |
| Cache writePer 1M tokens | Not available |
Chat message
2K in, 500 out
$0.21
per 1,000 requests
Coding task
30K in, 4K out
$2.66
per 1,000 requests
Long document summary
150K in, 2K out
$10.78
per 1,000 requests
Benchmarks
Phi 4 benchmark scores
Independent scores from Artificial Analysis. Higher is better.
Intelligence index
5.9
Coding index
Not available
Agentic index
Not available
Specs
Context window and capabilities
What it can read, what it can write, and which API features it supports.
- Context window
- 16K tokens
- Max output
- 15K tokens
- Input types
- Text
- Output types
- Text
- Reasoning effort
- Not available
- Release date
- January 10, 2025
- Knowledge cutoff
- June 30, 2024
- Tool calling
- Structured outputs
- JSON mode
- Reasoning
- Temperature
- Stop sequences
- Deterministic seed
- Verbosity control
Compare
Phi 4 vs other models
See how Phi 4 stacks up head to head on price, benchmarks, and features.
Phi 4 vs Llama 3.1 8B Instruct
Microsoft vs Meta
See comparisonPhi 4 vs Nova Micro 1.0
Microsoft vs Amazon
See comparisonPhi 4 vs Mistral Small 3
Microsoft vs Mistral
See comparisonPhi 4 vs Gemma 3 12B
Microsoft vs Google
See comparisonPhi 4 vs Ministral 3 8B 2512
Microsoft vs Mistral
See comparisonPhi 4 vs Ministral 3 3B 2512
Microsoft vs Mistral
See comparisonAlternatives
Phi 4 alternatives
Similar models worth considering, and where each one has the edge.
Meta
Llama 3.1 8B Instruct
Mistral
Mistral Small 3
Amazon
Nova Lite 1.0
Want to learn about other models? Browse all models
FAQ
Frequently asked questions
How much does Phi 4 cost?
Phi 4 costs $0.07 per 1M input tokens and $0.14 per 1M output tokens through the API. A typical chat message costs about $0.21 per 1,000 messages.
What is the context window of Phi 4?
Phi 4 accepts up to 16K tokens of input and can write up to 15K tokens in a single response.
What is the best alternative to Phi 4?
Llama 3.1 8B Instruct from Meta is a strong alternative. It offers: 1.8x cheaper output, higher intelligence score, larger 131k context.
Can I use Phi 4 alongside other models?
Yes. Shortcut Chat sends one prompt to Phi 4 and any other models you pick at the same time, so you can compare answers side by side.
Try Phi 4 next to every other model.
Use Phi 4 alongside all the other models. Use one at a time, or multiple together. Get the best answer from every AI.