Phi 4

MicrosoftReleasedDec 11, 2024KnowledgeOct 2023
Context
16K
Max output
16K
Serving providers
2
Cheapest input
$0.07 /1M
Prices are on-demand list rates. Enterprise commitments (committed-use discounts, provisioned throughput, negotiated rates) can be materially lower.

Benchmarks

independent evaluations · source: Artificial Analysis
Speed & latency
Output speed
20 t/s
tokens / second
Time to first token
2.26s
latency
Headline indices
Individual benchmarks · click a row for effort variants
BenchmarkBest scoreEffortCost / task
CritPt0%default
EvalComputeProxy5.0default
GPQA Diamond57%default
Humanity's Last Exam4%default
IFBench24%default
LiveCodeBench23%default
Long-Context Reasoning0%default
MMLU-Pro71%default
Omniscience-56.7default
SciCode26%default
TerminalBench Hard4%default
τ²-bench0%default

Pricing by serving provider

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

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

Serving providerInput /1MOutput /1MEndpoints
DeepInfraCheapest$0.07$0.141
ComponentUnitStandardBatchCached
Text input/1M tok$0.0700
Text output/1M tok$0.1400
Azure$0.13$0.501

Price history

input + output $/1M since we started tracking
Input Output
Input down 52% since first tracked
$0.000$0.200$0.400$0.600Feb 25Jul 30Aug 22Jun 22$0.140$0.060

Cost calculator

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

Model IDs

copy the exact identifier for your platform
deepinfra/microsoft/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 and $0.14 per 1M output tokens at its cheapest provider via DeepInfra. Across 2 serving providers, input prices range from $0.07 to $0.13 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 2 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
Pricing verified against LiteLLM + OpenRouter + provider pages · refreshed daily

Every weekday

AI moves fast. Here's your debrief.

News, analysis, tools, and more.

For people who build with AI