Microsoft
Phi 4
Open-weight instruction model for adaptable chat and self-hosted production workloads
Model facts
- Context window
- 128K tokens
- Maximum output
- 15K tokens
- Cheapest paid input
- $0.07 per 1M tokens
- Cheapest paid output
- $0.14 per 1M tokens
- Open weights
- yes
- Providers
- 4
Capabilities and modalities
structured output, temperature control, open weights, text.
Local hardware estimate
At 4K context: Q4_K_M 10.0 GiB, Q8_0 16.8 GiB, F16 29.6 GiB working memory.
- Parameters
- 14.7 billion
- Architecture
- phi3
- Model license
- mit
Planning estimate adapted from the MIT-licensed whichllm estimator using metadata from Hugging Face; not a vendor minimum requirement.
Artificial Analysis benchmarks
Compare this model on the full LLM benchmark leaderboard.
| Configuration | AAI | Coding | Math | Output tokens/s |
|---|---|---|---|---|
| default | 4.6 | not measured | 18.0 | 40.7 |
Observed price history
- 2026-08-24: $0.07 input / $0.14 output per 1M tokens
API providers
- Kilo Gateway (Microsoft) — model id microsoft/phi-4; $0.07 input / $0.14 output per 1M tokens; provider documentation
- OpenRouter — model id microsoft/phi-4; $0.07 input / $0.14 output per 1M tokens; provider documentation
- Azure — model id phi-4; $0.125 input / $0.5 output per 1M tokens; provider documentation
- Azure Cognitive Services — model id phi-4; $0.125 input / $0.5 output per 1M tokens; provider documentation