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 undefined API provider} other undefined 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
#73of 80
43char/s
1.32 s
Cost
#17of 186
$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.3Coding36.1Reasoning39.1Knowledge37.4Math46.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
#2Reasoning39.1RatedGlobal rank #653/4 Measured dimensions
80% interval: 30.447.7
abstract logicPrior only
scientific causal41.8
critpt · critpt / gpqa · gpqa / hle · hle
multistep constraints45.2
mmlu_pro · mmlu_pro
evidence verification30.1
lcr · lcr
#3Instruction 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
#4Knowledge37.4Provisional1/4 Measured dimensions
80% interval: 21.453.4
broad knowledge37.4
aa_omniscience · aa_omniscience_index
professional knowledgePrior only
factualityPrior only
retrieval open bookPrior only
#5Coding36.1Provisional1/4 Measured dimensions
80% interval: 22.250.0
code generation36.1
livecodebench · livecodebench / scicode · aa_sci_code
repository engineeringPrior only
debugging testingPrior only
tooling qualityPrior only
#6Agents28.3Provisional1/4 Measured dimensions
80% interval: 12.344.3
planningPrior only
tool use28.3
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 13, 2026

Speed & latency

undefined metric} other undefined metrics}}

Output speed43.2 tok/s#73 / 80Time to first token0.97 s#27 / 80
Output speed
LMSpeed rank#73
Score43.2 tok/s
UpdatedSep 13, 2026
Confidence4
Time to first token
LMSpeed rank#27
Score0.97 s
UpdatedSep 13, 2026
Confidence4

Pricing

undefined metric} other undefined metrics}}

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

Agents

V3.0

undefined metric} other undefined metrics}} · Provisional

Score28.380% interval12.3–44.31/4 Measured dimensions
Dimensions and evidence
Planning & decompositionPrior only
Tool use28.3
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

Score36.180% interval22.2–50.01/4 Measured dimensionsLiveCodeBench23.1%#102 / 115AA-SciCode26.0#106 / 113
Dimensions and evidence
Code generation36.1
undefined family} other undefined families}} · undefined metric} other undefined metrics}}
livecodebench · livecodebench · z -0.74 · q 1.00
scicode · aa_sci_code · z -1.90 · q 1.00
Repository engineeringPrior only
Debugging & testingPrior only
Tool-assisted development & qualityPrior only
LiveCodeBenchV3 evidence
LMSpeed rank#102
Score23.1%
UpdatedSep 13, 2026
Confidence4
AA-SciCodeV3 evidence
LMSpeed rank#106
Score26.0
UpdatedAug 14, 2026
Confidence1

Reasoning

V3.0

undefined metric} other undefined metrics}} · Rated

Score39.1#6580% interval30.4–47.73/4 Measured dimensionsMMLU-Pro71.4%#98 / 129GPQA57.5%#179 / 218
Dimensions and evidence
Abstract logicPrior only
Scientific & causal reasoning41.8
undefined family} other undefined families}} · undefined metric} other undefined metrics}}
critpt · critpt · z -0.71 · q 1.00
gpqa · gpqa · z -0.90 · q 1.00
hle · hle · z -0.95 · 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.1
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 13, 2026
Confidence4
GPQAV3 evidence
LMSpeed rank#179
Score57.5%
UpdatedSep 13, 2026
Confidence4
HLEV3 evidence
LMSpeed rank#191
Score3.8%
UpdatedSep 13, 2026
Confidence4

Knowledge

V3.0

undefined metric} other undefined metrics}} · Provisional

Score37.480% interval21.4–53.41/4 Measured dimensionsArtificial Analysis Intelligence Index4.5#115 / 117AA-GPQA Diamond57.5#105 / 113
Dimensions and evidence
Broad knowledge37.4
undefined family} other undefined families}} · undefined metric} other undefined metrics}}
aa_omniscience · aa_omniscience_index · z -1.76 · q 1.00
Professional knowledgePrior only
FactualityPrior only
Retrieval & open-book usePrior only
Artificial Analysis Intelligence IndexV3 evidence
LMSpeed rank#115
Score4.5
UpdatedAug 14, 2026
Confidence1
AA-GPQA Diamond
LMSpeed rank#105
Score57.5
UpdatedAug 14, 2026
Confidence1
AA-HLE
LMSpeed rank#108
Score3.8
UpdatedAug 14, 2026
Confidence1
AA-Omniscience Accuracy
LMSpeed rank#104
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 13, 2026
Confidence4
MATH-500V3 evidence
LMSpeed rank#48
Score81.0%
UpdatedSep 13, 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
61%
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 undefined provider} other undefined 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 undefined provider} other undefined 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