Microsoft

Phi 4

Generally availableOpen weights16K context

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 4 Oct 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 4 Oct 2026. Every figure on this page links to its source.

Specifications

DeveloperMicrosoft
Release date10 Jan 2025 [OpenRouter]
StatusGenerally available
WeightsOpen weights [Hugging Face]
Licensemit [Hugging Face]
Parameters14.7B [Hugging Face]
Context window16K (16,384 tokens) [OpenRouter]
Max output15K tokens [OpenRouter]
Knowledge cutoff30 Jun 2024 [OpenRouter]
InputText [OpenRouter]
OutputText [OpenRouter]
Reasoning modeNo [OpenRouter]
Tool callingNo [OpenRouter]
Structured outputYes [OpenRouter]
Hugging Facemicrosoft/phi-4 [Hugging Face]

Phi 4 API pricing by provider

USD per million tokens. Sorted by input price.

ProviderInputOutputCached inputContextSource
OpenRouter
microsoft/phi-4
$0.07$0.14–16KOpenRouter, 4 Oct 2026

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 4 Oct 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.

Change history

No changes detected since we started tracking this model. We re-check every source daily.

Sources