Phi 4

MicrosoftReleased Dec 11, 2024KnowledgeOct 2023
Context
16K
Max output
16K
Serving providers
3
Cheapest input
$0.07 /1M
On-demand listed rates, OpenRouter routed quotes and Vercel reseller quotes. Enterprise commitments (committed-use discounts, provisioned throughput, negotiated rates) can be materially lower.

Benchmarks

independent evaluations · source: Artificial Analysis
Speed & latency
Output speed
42 t/s
tokens / second
Time to first token
2.46s
latency
Headline indices
Individual benchmarks · click a row for effort variants
BenchmarkBest scoreEffortCost / task
CritPt0%default—
EvalComputeProxyFrozen Aug 18, 20265.0default—
GPQA Diamond57%default—
Humanity's Last Exam4%default—
IFBench24%default—
LiveCodeBench23%default—
Long-Context Reasoning0%default—
MMLU-ProFrozen Aug 18, 202671%default—
Omniscience-55.7default—
Omniscience Accuracy0.1default—
Omniscience Non Hallucination0.2default—
SciCodeArtificial Analysis did not report this score in its latest run on Oct 14, 202626%——
TerminalBench Hard4%default—
τ²-bench0%default—
Artificial Analysis last published scores for this benchmark on Aug 18, 2026. Scores here are frozen at that date, and models released since are not on it.

Pricing by serving provider

standard tier · per 1M tokens · click a provider to expand

Input pricing runs from $0.07 to $0.125 per 1M tokens across 3 providers, so the dearest route costs 79% more than the cheapest for the same model.

Serving providerInput /1MOutput /1MEndpoints
DeepInfraCheapest$0.07$0.141
Standarddeepinfra/microsoft/phi-4
ComponentUnitStandard
Text input/1M tok$0.07
Text output/1M tok$0.14
OpenRouter$0.07$0.141
Azure$0.125$0.501

Price history

listed seller prices, input and output per 1M tokens
Input Output
Input down 44% since first tracked
$0.00$0.20$0.40$0.60Feb 25Aug 22Jun 22$0.14$0.07

Cost calculator

estimate your monthly spend on this model
$25
estimated / month

Model IDs

copy the exact identifier for your platform
deepinfra/microsoft/phi-4microsoft/phi-4azure_ai/Phi-4

Frequently asked questions

Phi 4 pricing, context and availability

How much does Phi 4 cost?

Phi 4 costs $0.07 per 1M input tokens from DeepInfra, and $0.14 per 1M output tokens from DeepInfra. Across 3 serving providers, input prices range from $0.07 to $0.125 per 1M tokens.

What is the context window of Phi 4?

Phi 4 accepts up to 16K tokens of context and can return up to 16K output tokens.

Which providers serve Phi 4?

Phi 4 is available from 3 serving providers, each with its own pricing and model ID. DeepInfra is currently the cheapest.

What can Phi 4 do?

Phi 4 supports tool use.

Other Microsoft models

compare pricing across the Microsoft lineup

Popular comparisons

head-to-head pages featuring Phi 4
Listed prices from LiteLLM, OpenRouter and Vercel · last checked Oct 14, 2026

Every weekday

AI moves fast. Here's your debrief.

News, analysis, tools, and more.

For people who build with AI