A 2.7B model that matched models many times its size on reasoning tests.
Specs
microsoft/phi-4How to use Phi 4 in your app
The quickest way is through an API gateway such as OpenRouter, which uses the same format as the OpenAI API. Create a key, then send a request with the model ID microsoft/phi-4:
Prefer no code? Many tools in our AI tools directory run on models like this one.
More models from Microsoft
Questions about Phi 4
What is 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 14 billion...
How big is the context window of Phi 4?
Phi 4 can read up to 16,384 tokens in one request, roughly 12,288 words.
How much does Phi 4 cost?
Through OpenRouter, Phi 4 costs about $0.07 / 1M tokens for input and $0.14 / 1M tokens for output. Prices change, so check before large jobs.
Is Phi 4 open source?
Phi 4 has open weights, so you can download and run it yourself, subject to its licence.
What can Phi 4 take as input?
Phi 4 accepts text and produces text.
Latest AI models
MiniMax-M3.1-Flash is a multimodal model from MiniMax. Compared with M3, it delivers significant improvements across multiple benchmarks, particularly in complex agentic tasks, coding, and cybersecurity. It is built for complex,...
DeepSeek V4.1 Flash 1017 is the October 17, 2026 snapshot of DeepSeek V4.1 Flash, served by DeepSeek under the `deepseek-flash` API model name. V4.1 Flash is a sparse mixture-of-experts model...
Glimpse is a multimodal visual reasoning model from Elorian, built for visual understanding and complex visual reasoning in the physical world. It reasons directly over images and video rather than...
Xing4.0-29B-A4B is an open-weight mixture-of-experts language model from China Telecom's AI team (TeleAI) and the successor to the TeleChat series. It has 29B total parameters with 4B active per token...
Beam 1.0 is Reflection's open-weight reasoning model for coding and long-horizon agentic workflows. It uses a sparse mixture-of-experts architecture with 501B total and 23B active parameters per token, and a...
Mercury 3 is a diffusion-based language model from Inception, and the lab's most capable model to date. It is suited for agentic workflows and real-time applications where latency compounds, such...
Specs and prices come from OpenRouter and the provider, and are refreshed daily. Last checked 10 Jan 2025.