Microsoft: Phi 4
microsoft/phi-4
Model weightsMicrosoft Research 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 parameters, it was trained on a mix of high-quality synthetic datasets, data from curated websites, and academic materials. It has undergone careful improvement to follow instructions accurately and maintain strong safety standards. It works best with English language inputs.
For more information, please see Phi-4 Technical ReportOpens in new tab
Providers
Different companies host the same model. OpenRouter routes your request to one of them based on the routing mode you pick: Balanced (price + speed), Nitro (fastest), or Floor (cheapest).
| $0.070 | $0.140 | 0.31s | 80 tok/s | ||
Not used in Standard routing:Why these endpoints are not used | |||||
| $0.056 | $0.112 | 0.87s | 97 tok/s | ||
Input $0.07 / Output $0.1480 tok/s100.00% uptime- Not used in Standard routing:Why these endpoints are not used
Input $0.056 / Output $0.11297 tok/s100.00% uptimeFlex
Pricing
The average price customers actually pay for this model, next to the prices providers post. Caching and discounts mean the price actually paid is often well below the listed one.
Weighted average
Phi 4 — Price history
| $0.0692 | $0.137 | 0.0% | 99.2% | ||
Not used in Standard routing:Why these endpoints are not used | |||||
| $0.0553 | $0.111 | 0.0% | 0.8% | ||
- Effective in $0.0692 / Effective out $0.137Token share99.2%
- Not used in Standard routing:Why these endpoints are not used
- Effective in $0.0553 / Effective out $0.111FlexToken share0.8%
Performance
Throughput is how fast the model writes (tokens per second — higher is better). Latency is total round-trip time (lower is better). TTFT is time-to-first-token — how long before you see anything appear (lower is better).
P50, best across providers
P50, best provider
Uptime
Uptime is the percentage of the past 3 days that at least one provider was responding to requests. Availability is the percentage of time that inference was successfully served. OpenRouter continuously monitors and uses the next-best provider when one returns an error.
Availability over the last 3 days
Last 72 hoursAvailability over the last 24 hours
When an error occurs in an upstream provider, we can recover by routing to another healthy provider, if your request filters allow it. You can access per-provider uptime data programmatically through the Endpoints API. Learn more about our load balancing and provider routing options.
Benchmarks
Scores on standardized evaluations and this model’s own outputs on shared benchmark prompts. Higher percentages are better — and each rank shows where this model lands among the models evaluated on that source.
| Source | Benchmark | Score |
|---|---|---|
| Artificial Analysis | Phi-4 GPQA Diamond | 57.5% |
| Artificial Analysis | Phi-4 HLE | 3.8% |
| Artificial Analysis | Phi-4 IFBench | 23.5% |
| Artificial Analysis | Phi-4 τ²-Bench Telecom | 0.0% |
| Artificial Analysis | Phi-4 AA-LCR | 0.0% |
| Artificial Analysis | Phi-4 CritPt | 0.0% |
| Artificial Analysis | Phi-4 LiveCodeBench | 23.1% |
| Artificial Analysis | Phi-4 Terminal-Bench Hard | 3.8% |
| Artificial Analysis | Phi-4 MMLU-Pro | 71.4% |
| Artificial Analysis | Phi-4 AIME 2025 | 18.0% |
| Artificial Analysis | Phi-4 AIME | 14.3% |
| Artificial Analysis | Phi-4 MATH-500 | 81.0% |
Apps
Public apps that send the most traffic to this model. Good signal for what real production workloads look like — and a hint at which use cases this model is best suited for.
Activity
Token volume and request traffic to this model over time.
API
Drop-in code to call this model. OpenRouter's API is OpenAI-compatible — most SDKs work by just swapping the base URL. The only thing that changes between models is the model slug below.
Not currently available through EU in-region routing. In-region routing docs
Frequently asked questions
Microsoft Research 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 parameters, it was trained on a mix of high-quality synthetic datasets, data from curated websites, and academic materials.
Phi 4 costs $0.07/M input tokens and $0.14/M output tokens.
Phi 4 has a 16,384 token context window. It supports up to 16,384 completion tokens.
No. Phi 4 does not accept tools, so function calling is unavailable. It also supports structured outputs via a JSON schema in response_format.
Phi 4 is served by 1 provider on OpenRouter: DeepInfra.
Microsoft-Decision-1 is another text model from Microsoft.
Phi 4 was released on January 10, 2025. Its knowledge cutoff is June 30, 2024.