Microsoft: Phi 4

Microsoft: Phi 4

byMicrosoft

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 more

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.

ProviderInput /MOutput /MCache read /MContextMax output
Azure$0.125$0.50–128K4K
Kilo Gateway$0.07$0.14–16K15K
Azure Cognitive Services$0.125$0.50–128K4K

What Phi 4 costs per month

Pick a workload close to yours or type your own volumes.

Phi 4 per month
$14.63
Without caching
$14.63
Per request
$0.0005

Supported request parameters

What you can set when you call Phi 4 through an OpenAI compatible API.

  • Structured outputsstructured_outputs
  • Temperaturetemperature

Alternatives to Phi 4

Models that take the same inputs, closest in price, cheaper ones first.

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

All Microsoft models

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.