Microsoft

MPhi 4OPEN

Phi 4 (Microsoft): live API pricing, context window and the best open-source alternatives, tracked daily by OpenSourceAI.tech.

Context window
16K
tokens
Input price
$0.07
per M tokens
Output price
$0.14
per M tokens
Provider
Microsoft

Prices update automatically — checked hourly against provider list prices.

See model comparisons → Compare all model prices

Benchmarks & performance

Independent benchmark scores for Phi 4, measured by Artificial Analysis. Higher is better.

3.7×
More intelligence per dollar than Claude Opus 5.
For the same budget, Phi 4 delivers 3.7 times more capability. Open weights also mean you can self-host it and pay nothing per token.
Intelligence index4.9
Math index18
GPQA57.5%
MMLU-Pro71.4%
Humanity's Last Exam4.1%
Long Context Reasoning0%
LiveCodeBench23.1%
SciCode26%
MATH-50081%
AIME14.3%
AIME 202518%
IFBench23.5%
τ²-Bench0%
Terminal-Bench Hard3.8%
💰 Blended price$0.219 / 1M tokens
📈 Value22.4 intelligence points per $
Benchmark data by Artificial Analysis

About this model

Phi 4 is an open-weight AI model by Microsoft. You can download and self-host it for free; the prices below are hosted-API list prices, tracked hourly, for when you prefer convenience over self-hosting.

Frequently asked questions

What is Phi 4?

Phi 4 is an AI language model from Microsoft. It is open-weight: you can download it and run it on your own hardware, for free. It scores 4.9 on the Artificial Analysis intelligence index.

Is Phi 4 free?

The weights are free and open — you can self-host Phi 4 and pay nothing per token. If you prefer a hosted API, list prices are $0.07 per million input tokens and $0.14 per million output tokens.

What is Phi 4 good at?

Independent benchmarks from Artificial Analysis give it GPQA 57.5%, MMLU-Pro 71.4%, Humanity's Last Exam 4.1%, Long Context Reasoning 0%, LiveCodeBench 23.1%, SciCode 26%, MATH-500 81%, AIME 14.3%, AIME 2025 18%, IFBench 23.5%, τ²-Bench 0%, Terminal-Bench Hard 3.8%. It is particularly used for mathematical reasoning.

Can I self-host Phi 4?

Yes. Phi 4 has open weights, so you can download it and run it on your own GPU or server with tools like Ollama, vLLM or llama.cpp — with no per-token cost.

Open-source alternatives

Depending on your workload, an open-weight model that you can self-host may cut costs dramatically or remove per-token pricing entirely. Our comparison pages put this model side by side with the strongest open-source contenders.

WizardLM-2 8x22BMicrosoft