Microsoft: Phi 4
Phi 4 is a language model from Microsoft released on Dec 11, 2024. It reads text and writes text, with a 16K token context window and up to 15K tokens per reply.
Show moreShow less
It costs $0.125 per million input tokens and $0.50 per million output tokens.
It supports structured JSON output, and its weights are open, so you can host it yourself.
3 providers serve it, including Azure, Kilo Gateway and Azure Cognitive Services. The lowest input price is $0.07 per million tokens at Kilo Gateway.
- Modalities
- In / out price
- $0.125 / $0.50 per 1M
- Context
- 16K
- Max output
- 15K
- Released
- Dec 11, 2024
- Knowledge cutoff
- n/a
- Tool calling
- Structured output
- Reasoning
- Prompt caching
- Open weights
- Free to use
Phi 4 pricing
USD, as listed on Oct 15, 2026. Most bills are input heavy, so the cached input rate matters as much as the headline price.
| Input | $0.125 / 1M tokens | |
|---|---|---|
| Output | $0.50 / 1M tokens |
Phi 4 providers
3 providers serve it, including Azure, Kilo Gateway and Azure Cognitive Services. The lowest input price is $0.07 per million tokens at Kilo Gateway. Each host sets its own price and limits, so the cheapest one is not always the one with the longest context.
| Provider | Input /M | Output /M | Cache read /M | Context | Max output |
|---|---|---|---|---|---|
| Azure | $0.125 | $0.50 | – | 128K | 4K |
| Kilo Gateway | $0.07 | $0.14 | – | 16K | 15K |
| Azure Cognitive Services | $0.125 | $0.50 | – | 128K | 4K |
What Phi 4 costs per month
Pick a workload close to yours or type your own volumes.
Supported request parameters
What you can set when you call Phi 4 through an OpenAI compatible API.
- Structured outputs
structured_outputs - Temperature
temperature
Alternatives to Phi 4
Models that take the same inputs, closest in price, cheaper ones first.
- Index 14.7
Reads text and images. Tool calling, structured output, reasoning. Served by 38 providers.
by googleApr 2, 2026262K context$0.14/M input tokens$0.40/M output tokens38 providers
- Index 43.4
Reads text, images and files. Tool calling, structured output, reasoning. Served by 27 providers.
by anthropicOct 7, 20261M context$0.10/M input tokens$0.50/M output tokens27 providers
- Index 38.1
Reads text, images and files. Tool calling, structured output, reasoning. Served by 29 providers.
by openaiSep 22, 20261.05M context$0.10/M input tokens$0.50/M output tokens29 providers
- Index 6
Reads text and images. Tool calling, structured output. Served by 10 providers.
by mistralaiDec 2, 2025262K context$0.20/M input tokens$0.20/M output tokens10 providers
- 262K context
Reads text and images. Tool calling, structured output, reasoning. Served by 28 providers.
by googleApr 1, 2026$0.13/M input tokens$0.40/M output tokens28 providers
- Index 8.1
Reads text and images. Tool calling, structured output. Served by 4 providers.
by meta-llamaJan 1, 2025328K context$0.085/M input tokens$0.46/M output tokens4 providers
More from Microsoft
MAI-Image-2.6
ImageGenerates images from text.
by microsoftOct 13, 2026$5/M input tokens$38/M output tokens
MAI-Image-2.6-Flash
ImageGenerates images from text.
by microsoftOct 13, 2026$1.75/M input tokens$19/M output tokens
MAI-Transcribe-2-Streaming
TranscriptionTurns speech into text.
by microsoftOct 1, 2026
MAI-Voice-2.1
SpeechTurns text into spoken audio.
by microsoftOct 1, 2026
MAI-Voice-2.1-Flash
SpeechTurns text into spoken audio.
by microsoftOct 1, 2026
MAI-Transcribe 2
TranscriptionTurns speech into text.
by microsoftSep 3, 2026
Phi 4 questions
How much does the Phi 4 API cost?
$0.125 per million input tokens and $0.50 per million output tokens. The estimator on this page turns that into a monthly bill for your own workload.
What is the context window of Phi 4?
16,384 tokens of input, and it can write up to 14,745 tokens in one reply. As a rough guide, a million tokens is around 750,000 English words.
Which providers serve Phi 4?
3 providers serve it, including Azure, Kilo Gateway and Azure Cognitive Services. The lowest input price is $0.07 per million tokens at Kilo Gateway. Prices differ by host, so the Providers table on this page lists each one with its input and output price.
Does Phi 4 support tool calling?
Not through the standard tools parameter. For an agent that calls your APIs, pick a model from the alternatives below that does.
Is Phi 4 open source?
Its weights are published, so you can run it on your own hardware or a cloud of your choice. Read the license before commercial use.
When was Phi 4 released?
Dec 11, 2024.
Catalog data from models.dev (MIT licensed), refreshed daily, last on Oct 15, 2026. The summary is written from these facts.