Microsoft logo

Phi-4


Phi-4 is Microsoft's language model with a 16K context window and up to 16K output tokens, available from 3 providers, starting at $0.065 / 1M input and $0.140 / 1M output. A small language model from Microsoft trained on high-quality synthetic and curated datasets, excelling at reasoning and STEM tasks despite its compact size.
Specifications
Canonical IDmicrosoft-phi-4
TypeLanguage
StatusActive
CreatorMicrosoftMicrosoft
Providers
Context Window16K tokens
Max Output16K tokens
Input ModalitiesText
Output ModalitiesText
Release Date · 1 year ago
Knowledge Cutoff
Benchmarks
Intelligence Index
10.4
#378
Coding Index
11.2
#269
Math Index
18.0
#207
MMLU-Pro
0.7
#194
GPQA
0.6
#265
HLE
0.0
#367
LiveCodeBench
0.2
#244
AIME
0.1
#101
IFBench
0.2
#358
Time to First Token
0.52s
#245
SciCode
0.3
#277
MATH-500
0.8
#94
AIME 2025
0.2
#207
LCR
0.0
#368
TerminalBench Hard
0.0
#265
TAU2
0.0
#371
Output TPS
38.3
#241

Capabilities

Input1/5
Text
Image·
Audio·
Video·
PDF·
Output1/5
Text
Image·
Audio·
Video·
Embedding·
Capabilities3/13
Reasoning·
Adaptive Reasoning·
Function Calling
Parallel Function Calling·
Structured Outputs
Native JSON Schema
Web Search·
URL Context·
Computer Use·
Code Execution·
File Search·
Prompt Caching·
Assistant Prefill·

Pricing by Provider

ProviderStandard
Input
$ / 1M
Output
$ / 1M
OpenRouter logo
OpenRouter
microsoft/phi-4
$0.065$0.140
DeepInfra logo
DeepInfra
deepinfra/microsoft/phi-4
$0.070$0.140
Azure AI Foundry logo
Azure AI Foundry
azure_ai/Phi-4
$0.125$0.500
Provider-specific pricing that varies by region.
Azure AI Foundry logo
Azure AI Foundry
11 regions
RegionStandard
Input
$ / 1M
Output
$ / 1M
Global
Global$0.125$0.500
Europe
Sweden Central (Gävle)/ swedencentral$0.125$0.500
US
Central US (Iowa)/ centralus$0.125$0.500
East US (Virginia)/ eastus$0.125$0.500
East US 2 (Virginia)/ eastus2$0.125$0.500
North Central US (Illinois)/ northcentralus$0.125$0.500
South Central US (Texas)/ southcentralus$0.125$0.500
West Central US (Wyoming)/ westcentralus$0.125$0.500
West US (California)/ westus$0.125$0.500
West US 2 (Washington)/ westus2$0.125$0.500
West US 3 (Phoenix)/ westus3$0.125$0.500

Cost Calculator

Preset:
Compares every provider & tier in USD

Versions

VersionReleasedContextInput / 1MOutput / 1MStatus
Phi-4 Mini Instruct131K$0.075$0.300Available
Phi-416K$0.065$0.140Current
Phi-4 MultimodalAvailable
Phi-4 MiniAvailable
Phi-4 EagleAvailable
Phi-4 Mini MMAvailable
Phi-4 Mini Reasoning131K$0.080$0.320Available
Phi-4 Multimodal Instruct131K$0.080$0.320Available
Phi-4 Reasoning33K$0.125$0.500Available
Phi-4 Reasoning PlusAvailable
Phi-3 MiniAvailable

Model IDs