Microsoft
·Released on Jan 10, 2025

Phi 4 API Benchmarks, Pricing & Provider Data

Compare Phi 4 with another model

Choose a model to open its comparison page.

Share on X
LLM

Phi 4 benchmark, API pricing, and provider data cover 2 API providers, with prices starting at $0.010/request. The page also shows measured API speed and first-token latency.

Microsoft Phi-4 is a compact open-weight language model in the Phi series, optimized for reasoning, math, code generation, and efficient on-device or API deployment.

Quality
0.0
LMSpeed score
Speed
#66of 77
43char/s
1.32 s
Cost
#17of 181
$0.010/ 1M · 8:1 in:out
$0.0016 in · $0.0084 out

Category Performance

Observed-capability estimates with uncertainty reported separately from independent benchmark families.

Coverage
6 / 8
Methodology
V3.0
Category PerformanceObserved-capability estimates with uncertainty reported separately from independent benchmark families.Agents28.4Coding39.1Reasoning39.1Knowledge37.5Math46.9Multilingual-Multimodal-Instruction following37.8
#1Math46.9Estimated2/4 Measured dimensions
80% interval: 35.158.7
foundational math47.3
math_500 · math_500
competition math46.6
aime · aime
proof frontierPrior only
applied tool mathPrior only
#2Coding39.1Provisional1/4 Measured dimensions
80% interval: 25.253.0
code generation39.1
livecodebench · livecodebench / scicode · scicode
repository engineeringPrior only
debugging testingPrior only
tooling qualityPrior only
#2Reasoning39.1RatedGlobal rank #633/4 Measured dimensions
80% interval: 30.447.7
abstract logicPrior only
scientific causal41.9
critpt · critpt / gpqa · gpqa / hle · hle
multistep constraints45.2
mmlu_pro · mmlu_pro
evidence verification30.2
lcr · lcr
#4Instruction following37.8Provisional1/4 Measured dimensions
80% interval: 21.853.8
constraint followingPrior only
structured outputPrior only
novel instruction generalization37.8
ifbench · aa_if_bench
long multiturn instructionPrior only
#5Knowledge37.5Provisional1/4 Measured dimensions
80% interval: 21.553.5
broad knowledge37.5
aa_omniscience · aa_omniscience_index
professional knowledgePrior only
factualityPrior only
retrieval open bookPrior only
#6Agents28.4Provisional1/4 Measured dimensions
80% interval: 12.344.4
planningPrior only
tool use28.4
tau · tau2_bench
environment executionPrior only
recovery reliabilityPrior only
No data:MultilingualMultimodal

Specifications

Input and output token limits for this model, plus how it ranks on long-context understanding.

INPUT
16.4Ktokens
19.7 pages of text
OUTPUT
14.7Ktokens
8K128K1M4M
16.4K

Features

Technical Details

Input
Output
Released
Jan 2025
Knowledge cutoff
2024-06-30
Tokenizer
Other
Architecture
text->text
Moderated
No
Supported parameters
frequency_penaltylogit_biasmax_tokensmin_ppresence_penaltyrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetop_ktop_p

Rankings

Excels at

Falls behind in

Detailed scores

Updated: Sep 1, 2026

Speed & latency

undefined metric} other undefined metrics}}

Output speed44.2 tok/s#66 / 77Time to first token0.91 s#24 / 77
Output speed
LMSpeed rank#66
Score44.2 tok/s
UpdatedSep 1, 2026
Confidence4
Time to first token
LMSpeed rank#24
Score0.91 s
UpdatedSep 1, 2026
Confidence4

Pricing

undefined metric} other undefined metrics}}

Input price$0.125/M#17 / 181Output price$0.500/M#22 / 181
Input price
LMSpeed rank#17
Score$0.125/M
UpdatedSep 1, 2026
Confidence4
Output price
LMSpeed rank#22
Score$0.500/M
UpdatedSep 1, 2026
Confidence4

Agents

V3.0

undefined metric} other undefined metrics}} · Provisional

Score28.480% interval12.3–44.41/4 Measured dimensions
Dimensions and evidence
Planning & decompositionPrior only
Tool use28.4
undefined family} other undefined families}} · undefined metric} other undefined metrics}}
tau · tau2_bench · z -3.00 · q 1.00
Environment & long-horizon executionPrior only
Recovery & completion reliabilityPrior only

Coding

V3.0

undefined metric} other undefined metrics}} · Provisional

Score39.180% interval25.2–53.01/4 Measured dimensionsLiveCodeBench23.1%#102 / 115SciCode26.0%#175 / 206
Dimensions and evidence
Code generation39.1
undefined family} other undefined families}} · undefined metric} other undefined metrics}}
livecodebench · livecodebench · z -0.74 · q 1.00
scicode · scicode · z -1.21 · q 1.00
Repository engineeringPrior only
Debugging & testingPrior only
Tool-assisted development & qualityPrior only
LiveCodeBenchV3 evidence
LMSpeed rank#102
Score23.1%
UpdatedSep 1, 2026
Confidence4
SciCodeV3 evidence
LMSpeed rank#175
Score26.0%
UpdatedSep 1, 2026
Confidence4
AA-SciCodeV3 evidence
LMSpeed rank#101
Score26.0
UpdatedAug 14, 2026
Confidence1

Reasoning

V3.0

undefined metric} other undefined metrics}} · Rated

Score39.1#6380% interval30.4–47.73/4 Measured dimensionsMMLU-Pro71.4%#98 / 129GPQA57.5%#174 / 213
Dimensions and evidence
Abstract logicPrior only
Scientific & causal reasoning41.9
undefined family} other undefined families}} · undefined metric} other undefined metrics}}
critpt · critpt · z -0.72 · q 1.00
gpqa · gpqa · z -0.87 · q 1.00
hle · hle · z -0.92 · q 1.00
Multi-step constraints45.2
undefined family} other undefined families}} · undefined metric} other undefined metrics}}
mmlu_pro · mmlu_pro · z -0.84 · q 1.00
Evidence integration & verification30.2
undefined family} other undefined families}} · undefined metric} other undefined metrics}}
lcr · lcr · z -3.00 · q 1.00
MMLU-ProV3 evidence
LMSpeed rank#98
Score71.4%
UpdatedSep 1, 2026
Confidence4
GPQAV3 evidence
LMSpeed rank#174
Score57.5%
UpdatedSep 1, 2026
Confidence4
HLEV3 evidence
LMSpeed rank#185
Score3.8%
UpdatedSep 1, 2026
Confidence4

Knowledge

V3.0

undefined metric} other undefined metrics}} · Provisional

Score37.580% interval21.5–53.51/4 Measured dimensionsArtificial Analysis Intelligence Index4.5#109 / 111AA-GPQA Diamond57.5#100 / 108
Dimensions and evidence
Broad knowledge37.5
undefined family} other undefined families}} · undefined metric} other undefined metrics}}
aa_omniscience · aa_omniscience_index · z -1.75 · q 1.00
Professional knowledgePrior only
FactualityPrior only
Retrieval & open-book usePrior only
Artificial Analysis Intelligence IndexV3 evidence
LMSpeed rank#109
Score4.5
UpdatedAug 14, 2026
Confidence1
AA-GPQA Diamond
LMSpeed rank#100
Score57.5
UpdatedAug 14, 2026
Confidence1
AA-HLE
LMSpeed rank#102
Score3.8
UpdatedAug 14, 2026
Confidence1
AA-Omniscience Accuracy
LMSpeed rank#99
Score14.1
UpdatedAug 14, 2026
Confidence1
AA-Omniscience Hallucination Rate
LMSpeed rank#40
Score81.2
UpdatedAug 14, 2026
Confidence1

Math

V3.0

undefined metric} other undefined metrics}} · Estimated

Score46.980% interval35.1–58.72/4 Measured dimensionsAIME14.3%#52 / 68MATH-50081.0%#48 / 73
Dimensions and evidence
Foundational math47.3
undefined family} other undefined families}} · undefined metric} other undefined metrics}}
math_500 · math_500 · z -0.34 · q 1.00
Competition math46.6
undefined family} other undefined families}} · undefined metric} other undefined metrics}}
aime · aime · z -0.48 · q 1.00
Advanced proofsPrior only
Applied & tool-assisted mathPrior only
AIMEV3 evidence
LMSpeed rank#52
Score14.3%
UpdatedSep 1, 2026
Confidence4
MATH-500V3 evidence
LMSpeed rank#48
Score81.0%
UpdatedSep 1, 2026
Confidence4

Multilingual

V3.0

undefined metric} other undefined metrics}} · No data

No data80% interval30.8–69.20/4 Measured dimensions
Dimensions and evidence
Cross-language understandingPrior only
Multilingual generationPrior only
Reasoning transferPrior only
Low-resource robustnessPrior only

Multimodal

V3.0

undefined metric} other undefined metrics}} · No data

No data80% interval30.8–69.20/4 Measured dimensions
Dimensions and evidence
Perception & OCRPrior only
Document & spatial understandingPrior only
Visual reasoningPrior only
Video & grounded actionPrior only

Instruction following

V3.0

undefined metric} other undefined metrics}} · Provisional

Score37.880% interval21.8–53.81/4 Measured dimensionsAA-IFBench23.5#83 / 84
Dimensions and evidence
Constraint followingPrior only
Structured outputPrior only
Novel-instruction generalization37.8
undefined family} other undefined families}} · undefined metric} other undefined metrics}}
ifbench · aa_if_bench · z -1.91 · q 1.00
Multi-turn & long instructionsPrior only
AA-IFBenchV3 evidence
LMSpeed rank#83
Score23.5
UpdatedAug 14, 2026
Confidence1

OpenRouter endpoints

1 endpoints

Third-party OpenRouter endpoint data, shown separately from LMSpeed measurements. Some 30-minute live performance fields only appear after syncing with an OpenRouter API key.

Provider endpointInputOutput1d uptime30m latency30m throughputContext / output
DeepInfra
deepinfra/bf16
$0.070/M$0.140/M100%undefined tokens / undefined tokens

Pricing Comparison

Compare Phi 4 API pricing across 2 providers. Prices range from $0.010/request to $57.53/M. 素墨API offers the lowest rate at $0.010/request.

ProviderHealthModel VariantGroupInput ($/M)Output ($/M)Speed (t/s)First tokenAudit
L1
100%
phi-4
enterprise_emergency_standby
$57.53/M
$57.53/M
L1
100%
phi-4
default
$0.010/request
-

Alternatives & Similar Models

Frequently Asked Questions

What benchmark data does Phi 4 include?
LMSpeed shows Phi 4 benchmark context, API price, output speed, first-token latency, and provider data across 2 providers when those signals are available.
What is the Phi 4 API price?
Phi 4 has pricing from 2 providers, ranging from $0.010/request to $57.53/M. 素墨API has the lowest listed price.
What does the Phi 4 API pricing table include?
The Phi 4 API pricing table compares 2 providers by input price, output price, free tier status, speed, first-token latency, and recent health data when available.
Which provider has the cheapest Phi 4 API pricing?
素墨API currently has the lowest listed Phi 4 price at $0.010/request across 2 providers.
Can I compare Phi 4 API price and speed together?
Yes. LMSpeed shows Phi 4 API price, output speed, first-token latency, and provider health on the same page so you can compare cost and performance together.
Is Phi 4 API free?
Phi 4 does not currently have a free API tier on LMSpeed. All 2 providers charge per token.

Also known as

Phi-4microsoft/phi-4openrouter:microsoft/phi-4phi-4

Rankings are based on community-submitted tests and periodic health probes. Advisory only, not official data.Standard benchmark data may include BenchLM and other public sources.

Build with LMSpeed Data

Free

Free public API for LLM pricing, benchmarks & provider data

  • Real-time pricing & availability
  • Speed & latency benchmarks
  • 300+ models, 600+ providers
  • 1,000 requests/day
View API Documentation