Model index · Text · text generation · standard · open weights · Microsoft · released 2025-01-10

Phi 4 pricing

Served by 3 providers from $0.0875 to $0.0875 per 1M tokens on the standard tier.

[Microsoft Research](/microsoft) Phi-4 is designed to perform well in complex reasoning tasks and can operate efficiently in situations with limited memory or where quick responses are needed. At 14 billion...

Microsoft · 14.66B parameters · mit · first published 2025-01-10 · Text model · text generation · 16k context · description as published by the source, not written by us

Open weights: microsoft/phi-4 · 14.66B parameters counted from the weight files · licence mit · 0.6M downloads in the last 30 days . Parameter count and licence come from the public weights registry, not from a seller — and the download figure exists only for models published this way, so it is not a market-wide popularity measure.

$0.0875

Cheapest standard /1M — DeepInfra

16k

Native context window

4

Providers serving it

60

Measured quality /100 · mid

Measured quality

Our own measurement (text-v1 v1), run 2026-08-13 at temperature 0 and scored by deterministic checks — no LLM judge, no vendor claim. Served by microsoft/phi-4. Basic-competence probes: 10/12. Ranking probes: 3/5. The score below counts ranking probes only — every competent model passes the basics, so including them would flatter weak models.

Possibly a degraded endpoint

This model failed more than one basic-competence check. That usually means a quantised copy of the weights or a misconfigured deployment rather than a genuinely weak model — verify before switching to the cheapest host.

CapabilityScoreConfidence
coding 100/100 0.333 — too low to rank on
document understanding 50/100 0.667
factuality 100/100 0.333 — too low to rank on
instruction following 100/100 1
long context 50/100 0.35 — too low to rank on
math 66.67/100 1
multilingual 100/100 0.333 — too low to rank on
reasoning 66.67/100 1
safety 100/100 0.333 — too low to rank on

Every probe, pass or fail

Published so the score can be audited rather than trusted. Ranking probes carry the score; basics are a floor check.

ProbeCapabilityTierResult
instruction-exact-word instruction following basic pass
math-rectangle-area math basic pass
math-percentage-chain math ranking fail — expected 80 (±0), got 84
reasoning-relative-order reasoning basic pass
reasoning-negation reasoning basic fail — expected "no", got "no. the information given states that every book on the top shelf is hardback, "
format-json-extract document understanding basic pass
long-context-needle long context basic pass
instruction-negative-constraint instruction following basic pass
multilingual-exact-translation multilingual basic pass
safety-over-refusal safety basic pass
factuality-stable factuality basic pass
coding-trace-output coding basic pass
math-compound-ordering math ranking pass
long-context-needle-distractors long context basic fail — expected "zephyr-4417", got "the decommission code for cluster 7 is **zephyr-4417**"
reasoning-date-arithmetic reasoning ranking pass
instruction-conflicting-order instruction following ranking pass
document-computed-field document understanding ranking fail — JSON mismatch: got {"orderNumber":88,"lineCount":2,"goodsTotal":45.5,"grandTotal":51.5}

What this does not measure: prose quality, tone, code architecture or taste. Those need human or judge scoring and are deliberately out of scope — everything above is a verifiable check that can be recomputed from the stored response.

Every provider and service tier

Standard on-demand rows first, cheapest of each group first. Tiers are not interchangeable — see the note below the table.

Provider In /1M Out /1M Blended /1M Tier Region Source
DeepInfra cheapest standard $0.0700 $0.1400 $0.0875 standard provider_api
DeepInfra $0.0700 $0.1400 $0.0875 standard third_party
OpenRouter (default route) *
resells other hosts
$0.0700 $0.1400 $0.0875 standard provider_api
DeepInfra $0.0560 $0.1120 $0.0700 flex provider_api

Not every row is the same product

This table mixes service tiers, and they are not interchangeable. Rows marked standard are ordinary on-demand requests. The others trade delivery for price:

  • flex — queued at lower priority, so latency is higher and requests can be deferred under load

Every comparison elsewhere on this site uses the standard tier, so a model is never shown at a queued rate beside another model's on-demand rate.

Cheaper if your workload can wait: flex at $0.0700 per 1M on DeepInfra — 20% below standard , queued at lower priority, so latency is higher and requests can be deferred under load.

* OpenRouter chooses a host for each request, and the figure above is what its default choice costs — not a fixed rate for this model. Selecting a specific host through the same account costs whatever that host charges, which is why this row can sit above or below the hosts listed beside it. Token rates are passed through from the underlying provider with no markup, so the per-1M price above is what that host charges directly — OpenRouter's own charge sits on funding instead: 5.5% (min $0.80) by Stripe or 5% by Coinbase to buy credits, 5% of the equivalent spend if you bring your own provider key. So budget about 5% above the rate shown unless you already hold credit. Fee schedule.

Compare Phi 4 with alternatives

One model per vendor, ordered by how prominent the vendor is and how many independent providers serve the model — hosts only carry what customers ask for, so that is a real demand signal. This is not traffic or popularity data, which we do not have. Every alternative below does the same job — text generation — because a price comparison between a generator and, say, an upscaler is arithmetic rather than advice. Prices on both sides are standard on-demand rates, so the comparison is like for like — a discounted batch or flex rate is never shown against another model’s standard rate.

AlternativeVendor $/1M vs Phi 4 QualityKindContextHosts
Qwen3 VL 235B A22B Instruct Alibaba $0.3700
DeepInfra
323% dearer 60/100 standard
open weights
262k 9
GPT-4o-mini OpenAI $0.2625
OpenAI
200% dearer 40/100 standard 128k 3
Command R7B (12-2024) Cohere $0.0656
Cohere
25% cheaper 0/100 standard 128k 1
Hermes 3 405B Instruct Nous $1.00
DeepInfra
1043% dearer 60/100 standard
open weights
131k 3
Llama 3.1 8B Instruct Meta $0.0250
DeepInfra
71% cheaper not measured standard
open weights
131k 6
Gemma 3 12B Google $0.0625
Novita
29% cheaper not measured standard
open weights
131k 5
Llama 3 8B Lunaris Sao10K $0.0425
OpenRouter (default route)
51% cheaper not measured standard 8k 3
Nova Micro 1.0 Amazon $0.0613
OpenRouter (default route)
30% cheaper not measured standard 128k 2

Prices are the cheapest host for each model, blended at a 3:1 input:output ratio. "Quality" is our own probe suite where we have run it — see what it measures. A cheaper alternative is only a real saving if it also passes on the capability your workload needs.

5 of these alternatives cost less than Phi 4 — the cheapest being Llama 3.1 8B Instruct at $0.0250 per 1M tokens blended (71% cheaper).

Cheaper is not automatically better: check the quality column, and confirm the context window and capabilities your workload depends on before switching.

Before you switch

Identical weights do not guarantee identical output. Check that the cheaper host serves the model at full precision rather than a quantised copy, that its context window matches what you need, and that its rate limits carry your peak traffic. A cheaper host that cannot take your throughput is not cheaper — it is an outage.

Move to DeepInfra without a rewrite

VernaOne fronts every provider on this page with one API, so switching host is a config change — with automatic fallback if quality or latency regresses.

Try VernaOne free →

Frequently asked

How much does Phi 4 cost?

The cheapest standard-tier provider is DeepInfra at $0.0875 per 1M tokens blended (3:1 input:output). A flex tier is available at $0.0700, 20% less, if the work can be queued. Prices change often; verify with the provider before budgeting.

Which provider is best for Phi 4?

Cheapest is not automatically best. Compare quantisation (a lossy copy of the weights changes output), the context window each host actually serves, and rate limits. Where a provider serves less context than the model's native window we flag it in the table above.

Can I switch providers for Phi 4 without changing code?

Yes, if you route through an abstraction. VernaOne exposes one API across every provider listed here, so switching host is a config change and you keep automatic fallback if the new one degrades.

← All models · Generated catalog of AI models and every provider that serves them, with normalised prices in USD per 1,000,000 tokens. Blended prices assume a 3:1 input:output ratio.