# Phi 4

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

Source page: https://www.aimodel.directory/models/phi-4
Last verified: 4 Oct 2026

## Specifications

- **Developer:** Microsoft
- **Release date:** 10 Jan 2025 (source: OpenRouter, https://openrouter.ai/microsoft/phi-4)
- **Status:** Generally available
- **Weights:** Open weights (source: Hugging Face, https://huggingface.co/microsoft/phi-4)
- **License:** mit (source: Hugging Face, https://huggingface.co/microsoft/phi-4)
- **Parameters:** 14.7B (source: Hugging Face, https://huggingface.co/microsoft/phi-4)
- **Context window:** 16K (16,384 tokens) (source: OpenRouter, https://openrouter.ai/microsoft/phi-4)
- **Max output:** 15K tokens (source: OpenRouter, https://openrouter.ai/microsoft/phi-4)
- **Knowledge cutoff:** 30 Jun 2024 (source: OpenRouter, https://openrouter.ai/microsoft/phi-4)
- **Input:** Text (source: OpenRouter, https://openrouter.ai/microsoft/phi-4)
- **Output:** Text (source: OpenRouter, https://openrouter.ai/microsoft/phi-4)
- **Reasoning mode:** No (source: OpenRouter, https://openrouter.ai/microsoft/phi-4)
- **Tool calling:** No (source: OpenRouter, https://openrouter.ai/microsoft/phi-4)
- **Structured output:** Yes (source: OpenRouter, https://openrouter.ai/microsoft/phi-4)
- **Hugging Face:** microsoft/phi-4 (source: Hugging Face, https://huggingface.co/microsoft/phi-4)

## API pricing (USD per 1M tokens)

| Provider | Input | Output | Cached input | Context |
|---|---|---|---|---|
| OpenRouter | $0.07 | $0.14 | – | 16K |

## FAQ

### 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.

---
Data licensed CC BY 4.0. Cite as: AI Model Directory, "Phi 4", https://www.aimodel.directory/models/phi-4