Phi 4
Summary
Phi 4 is an open-weight language model from Microsoft, released on 10 Jan 2025. It accepts text and generates text, with a 16K-token context window and up to 15K output tokens per response. As of 19 Nov 2026, the lowest listed API price is $0.07 per million input tokens and $0.14 per million output tokens (OpenRouter), across 1 provider we track.
[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...
Last verified 19 Nov 2026. Every figure on this page links to its source.
Specifications
| Developer | Microsoft |
|---|---|
| Release date | 10 Jan 2025 [OpenRouter] |
| Status | Generally available |
| Weights | Open weights [Hugging Face] |
| License | mit [Hugging Face] |
| Parameters | 14.7B [Hugging Face] |
| Context window | 16K (16,384 tokens) [OpenRouter] |
| Max output | 15K tokens [OpenRouter] |
| Knowledge cutoff | 30 Jun 2024 [OpenRouter] |
| Input | Text [OpenRouter] |
| Output | Text [OpenRouter] |
| Reasoning mode | No [OpenRouter] |
| Tool calling | No [OpenRouter] |
| Structured output | Yes [OpenRouter] |
| Hugging Face | microsoft/phi-4 [Hugging Face] |
Phi 4 API pricing by provider
USD per million tokens. Sorted by input price.
| Provider | Input | Output | Cached input | Context | Source |
|---|---|---|---|---|---|
| OpenRouter microsoft/phi-4 | $0.07 | $0.14 | – | 16K | OpenRouter, 19 Nov 2026 |
Running Phi 4 locally
Estimated memory, from the parameter count and the architecture in config.json on Hugging Face. Includes about 0.8 GB of runtime overhead.
| Quantization | Weights | Total, 8K context | Total, 32K context |
|---|---|---|---|
| Q4_K_M (4-bit) | 8.9 GB | 11 GB | 13 GB |
| Q8_0 (8-bit) | 16 GB | 18 GB | 20 GB |
| FP16 / BF16 (16-bit) | 29 GB | 32 GB | 33 GB |
At 4-bit with an 8K conversation, Phi 4 needs about 11 GB, so it fits on a graphics card with 12 GB or more, such as the NVIDIA GeForce RTX 3060 12 GB. Check your own hardware, or see Best GPU for local LLMs on our sister site AIPCs.
Frequently asked questions
What is the context window of Phi 4?
Phi 4 has a context window of 16,384 tokens (16K) and can generate up to 14,745 tokens in a single response, according to OpenRouter.
How much does the Phi 4 API cost?
Phi 4 is listed from $0.07 per million input tokens and $0.14 per million output tokens (OpenRouter). Prices last verified 19 Nov 2026.
Is Phi 4 open source?
Phi 4 is an open-weight model: its weights are published on Hugging Face as microsoft/phi-4 under the mit license. Check the license terms before commercial use.
When was Phi 4 released?
Microsoft released Phi 4 on 10 Jan 2025, according to OpenRouter.
How much VRAM does Phi 4 need?
About 11 GB at 4-bit (Q4_K_M) with an 8K-token conversation, and about 18 GB at 8-bit. The 4-bit model fits on a graphics card with 12 GB or more, such as the NVIDIA GeForce RTX 3060 12 GB. These are estimates from the model's published parameter count and architecture.
Similar models from other labs
Comparable on output type, weights, release date, price and context window. Prices are the lowest listed, USD per million tokens.
| Model | Lab | Released | Context | Input $/1M | Output $/1M | Weights |
|---|---|---|---|---|---|---|
| Qwen2.5-Coder-32B-Instruct | Alibaba (Qwen) | 12 Nov 2024 | 33K | $0.06 | $0.20 | Open |
| Mistral Small 3 | Mistral AI | 30 Jan 2025 | 33K | $0.05 | $0.08 | Open |
| Qwen/Qwen2.5-7B-Instruct | Alibaba (Qwen) | 19 Sept 2024 | 33K | $0.05 | $0.05 | Open |
| Reka Flash 3 | Rekaai | 10 Mar 2025 | 66K | $0.10 | $0.20 | Open |
| Llama 3 8B Lunaris | Sao10k | 13 Aug 2024 | 8K | $0.04 | $0.05 | Open |
| Command R7B | Cohere | 13 Dec 2024 | 128K | $0.04 | $0.15 | Open |
Change history
No changes detected since we started tracking this model. We re-check every source daily.