Fresh paint, wet floors — we're rebuilding CostOfToken into a cross-provider price comparison. Some corners are still under construction; the full version is coming up soon.

microsoft/phi-4 pricing

Phi-4 is a model built upon a blend of synthetic datasets, data from filtered public domain websites, and acquired academic books and Q&A datasets. The goal of this approach was to ensure that small capable models were trained with data focused on high quality and advanced reasoning. microsoft/phi-4 from DeepInfra costs $0.070 per 1M input tokens and $0.140 per 1M output tokens. Context window 16,384 tokens.

API id microsoft/phi-4 · DeepInfra · source · updated 2026-09-25 · general-purpose

$0.070
Input / 1M tokens
$0.140
Output / 1M tokens
—
Cached input / 1M
16K
Context window

microsoft/phi-4 specifications

Provider
DeepInfra
API id
microsoft/phi-4
Model type
general-purpose
Context window
16K tokens
Max output
not published
Currency
USD
Price source
Provider API
Last checked
2026-09-25

Microsoft: Phi 4 across providers

The same model, priced by every seller we track. Ranked by the cost of 1M input + 1M output tokens, standard tier; savings measured against buying from the vendor directly.

ProviderInput /1MCached /1MOutput /1M1M in + 1M outvs vendor
DeepInfraHostCheapestviewing
$0.070—$0.140$0.21—
$0.070—$0.140$0.21—

What microsoft/phi-4 costs in practice

Estimated cost at common usage volumes
WorkloadInput tokensOutput tokensEstimated cost
Short chat turn1,000500$0.0001
Document summary50,0002,000$0.0038
1M tokens in, 200K out1,000,000200,000$0.10

Estimates use the standard tier and ignore caching discounts, so real bills with repeated prompt prefixes are typically lower.

microsoft/phi-4 price history

RecordedInput /1MOutput /1M
2026-08-27$0.070$0.140
2026-08-27$0.070$0.140

Common questions

How much does microsoft/phi-4 cost per 1M tokens?
microsoft/phi-4 costs $0.070 per 1M input tokens and $0.140 per 1M output tokens on the standard tier.
What is microsoft/phi-4's context window?
microsoft/phi-4 accepts up to 16,384 tokens in a single request.
Is there a cheaper DeepInfra model than microsoft/phi-4?
Yes. mistralai/Mistral-Nemo-Instruct-2407 is $0.019 per 1M input tokens versus $0.070 for microsoft/phi-4, with a 131,072 token context window.
Where does this microsoft/phi-4 price come from?
From the OpenRouter catalogue, because DeepInfra does not publish machine-readable pricing. OpenRouter is a reseller, so its rate can differ from DeepInfra's own — verify before committing spend.

Head-to-head comparisons

Other DeepInfra models

See all DeepInfra pricing →