Phi 4

Phi 4 is a text model from Azure AI with a context window of 16K tokens and max output of 16K tokens. Pricing starts at 0.13 per million input tokens and 0.50 per million output tokens (cheapest at DeepInfra).

Capabilities

Vision Function Calling Reasoning JSON Schema System Messages Web Search Prompt Caching Audio Input Audio Output

Specifications

Model Keyazure_ai/Phi-4
ProviderAzure AI
Provider IDazure_ai
ModeText
Canonical Namephi-4
Context Window16K tokens
Max Output16K tokens

Pricing

TypePer 1K TokensPer 1M Tokens
Input Tokens0.0001250.125
Output Tokens0.0005000.500

Benchmarks

Intelligence Index10.4#183
Coding Index11.2#121
Math Index18.0#104
MMLU-Pro0.7#101
GPQA0.6#112
HLE0.0#169
LiveCodeBench0.2#141
AIME0.1#74
IFBench0.2#161
Time to First Token0.46s#119
SciCode0.3#128
MATH-5000.8#67
AIME 20250.2#104
LCR0.0#151
TerminalBench Hard0.0#114
TAU20.0#154

Price Comparison by Provider

Compare prices for Phi 4 across different providers. The same model may be available through multiple providers at different price points.

Provider
Model Key
Input Price, $
Output Price, $
DeepInfradeepinfra/microsoft/phi-40.0700.140
Azure AIazure_ai/Phi-40.1250.500

All Variants

All available versions, regions, and API endpoints for Phi 4.

Model Key
Provider
Mode
Input Price, $
Output Price, $
Context
Max Output
Vision
Functions
azure_ai/Phi-4Azure AIText0.1250.50016K16Knoyes
deepinfra/microsoft/phi-4DeepInfraText0.0700.14016K16Knoyes