Input / output, USD per 1M tokens. Arrow keys move, Enter opens.

Phi-4 from Microsoft: $0.07 input and $0.14 output per 1M tokens, 16,384 context. Compact Microsoft model trained on synthetic data for reasoning, math, and coding in English Data last refreshed Nov 30, 2026, 07:15 AM UTC.

Models / Microsoft / Phi-4

Microsoft · phi

Phi-4

Compact Microsoft model trained on synthetic data for reasoning, math, and coding in English

$0.07 in · $0.14 out

per 1M tokens · provider rate closest to the median. No first-party Microsoft price was listed. The reference price is Deep Infra's rate, the provider closest to the median.

Provider input prices run from $0.07 to $0.13 per 1M tokens. Output prices run from $0.14 to $0.50.

Context
16,384
Max output
16,384
Cache read
—
Cache write
—
Reasoning
No
Tool calls
No
Structured output
Unknown
Vision
No
Open weights
Yes
License
MIT
Released
Dec 12, 2024
Updated in source
Dec 12, 2024
Knowledge
2024-06
Providers
5

Hugging Face weights

What this model costs per month

Prices are USD per 1M tokens. A month is 30 days. Cache hits use the cache-read rate when the model has one; otherwise the cache field is ignored.

Estimated monthly cost

Phi-4

$0.63

Cache hit is ignored because this model has no cache-read price.

monthly = requests/day × 30 × (input tokens × (1 − cache hit) × input price + input tokens × cache hit × cache-read price + output tokens × output price) ÷ 1,000,000

Providers

Base rates from Models.dev. One row per provider.
ProviderInputOutputCache readCache writeStatus
Deep Infrareference$0.07$0.14———
Eden AI$0.07$0.14———
Hugging Face$0.07$0.14———
Azure$0.13$0.50———
Azure Cognitive Services$0.13$0.50———