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 16K tokens per reply.
Show moreShow less
It costs $0.07 per million input tokens and $0.14 per million output tokens.
It supports structured JSON output, and its weights are open, so you can host it yourself.
6 providers serve it, including Deep Infra, Hugging Face and Azure. The lowest input price is $0.056 per million tokens at Kilo Gateway.
- Modalities
- In / out price
- $0.07 / $0.14 per 1M
- Context
- 16K
- Max output
- 16K
- Released
- Dec 11, 2024
- Knowledge cutoff
- Jun 2024
- Tool calling
- Structured output
- Reasoning
- Prompt caching
- Open weights
- Free to use
Phi-4 pricing
USD, as listed on Nov 29, 2026. Most bills are input heavy, so the cached input rate matters as much as the headline price.
| Input | $0.07 / 1M tokens | |
|---|---|---|
| Output | $0.14 / 1M tokens |
Phi-4 providers
6 providers serve it, including Deep Infra, Hugging Face and Azure. The lowest input price is $0.056 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 |
|---|---|---|---|---|---|
| Deep Infra | $0.07 | $0.14 | n/a | 16K | 16K |
| Hugging Face | $0.07 | $0.14 | n/a | 16K | 16K |
| Azure | $0.125 | $0.50 | n/a | 16K | 16K |
| Kilo Gateway | $0.056 | $0.112 | n/a | 16K | 15K |
| Eden AI | $0.07 | $0.14 | n/a | 16K | 16K |
| Azure Cognitive Services | $0.125 | $0.50 | n/a | 16K | 16K |
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 12.9
Reads text. Tool calling, structured output, reasoning. Served by 16 providers.
by nvidiaAug 11, 2026262K context$0.06/M input tokens$0.16/M output tokens16 providers
- 128K context
Reads text. Tool calling, structured output. Served by 5 providers.
by cohereDec 13, 2024$0.0375/M input tokens$0.15/M output tokens5 providers
- 4K context
Reads text. Structured output. Served by 6 providers.
by grypheAug 10, 2023$0.08/M input tokens$0.11/M output tokens6 providers
- 131K context
Reads text. Tool calling, structured output, reasoning. Served by 7 providers.
by ibm-graniteAug 25, 2026$0.06/M input tokens$0.15/M output tokens7 providers
- 8K context
Reads text. Served by 2 providers.
by tencentMay 21, 2026$0.0466/M input tokens$0.1873/M output tokens2 providers
- 128K context
Reads text.
by microsoftFeb 26, 2025$0.07/M input tokens$0.11/M output tokens
More from Microsoft
MAI-Image-2.6
ImageGenerates images from text and images.
by microsoftOct 13, 2026
MAI-Image-2.6-Flash
ImageGenerates images from text and images.
by microsoftOct 13, 2026
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.07 per million input tokens and $0.14 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 16,384 tokens in one reply. As a rough guide, a million tokens is around 750,000 English words.
Which providers serve Phi-4?
6 providers serve it, including Deep Infra, Hugging Face and Azure. The lowest input price is $0.056 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, with training data up to Jun 2024.
Catalog data from models.dev (MIT licensed), refreshed daily, last on Nov 29, 2026. The summary is written from these facts.