Microsoft

Phi 4 API pricing

Made by Microsoft

3 provider routes, checked 27 Nov 2026. For a sample chat workload, the cheapest is DeepInfra at $47.04 a month; the dearest costs $135.00, 2.9× as much.

Input from
$0.056
Output from
$0.112
Context up to
16K tokens
Batch rates
None listed

Every route, cheapest first

Prices per 1M tokens. Month is the sample workload: 300,000 requests, 2,000 tokens in and 400 out per request, half the input cached. Cache writes are not counted.

ProviderInputOutputCache readCache writeBatch in / outContextMonth
DeepInfrabf16 · OpenRouter$0.056$0.112———16K$47.04
DeepInfrabf16 · OpenRouter$0.07$0.14———16K$58.80
AzureLiteLLM$0.125$0.50———16K$135.00

Other Phi models