Phi 4 (Microsoft): live API pricing, context window and the best open-source alternatives, tracked daily by OpenSourceAI.tech.
Prices update automatically — checked hourly against provider list prices.
Independent benchmark scores for Phi 4, measured by Artificial Analysis. Higher is better.
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.
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.
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.
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.
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.
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.