PriceIndex
Microsoft logo

Phi-4 Pricing & API Specs

phi-4

14B small language model, great for edge and cheap tasks. Built by Microsoft.

Prices updated

Input price

$0.07

per 1M tokens · Standard

Output price

$0.14

per 1M tokens · Standard

Input limit

16K

tokens

Output limit

15K

tokens

Input formats

TextImageVideoAudioPDF

Output formats

TextImageVideoAudioPDF
Compare

Phi-4 price history

12 price records since 4/1/2026 · 10 changes

Phi-4 cost calculator

Input20M tokens
Output5M tokens

$2.10/month

Standard pricing

Overview

What is Phi-4?

Phi-4 is a code & slms and text & reasoning model from Microsoft priced at $0.07 input and $0.14 output per 1M tokens, with a 16K context window. Its low input price suits high-volume work and it scores 5.9 on AA Intelligence.

Price: Solar Mini 4 (+$0.000)Price: Ling 3.0 Flash VL (+$0.002)Price: Nemotron 3.5 Lightning (−$0.003)Score: Mistral Large (AA −0)Score: Llama 3.2 3B Instruct (AA −0)Score: Claude 3 Haiku (AA −0)

Benchmarks

Phi-4 benchmarks & speed

How Phi-4 scores on standardized evaluations, and where it lands among every model we track.

5.9

Intelligence Index

Better than 5% of 153 models

39tok/s

Output speed

Better than 4% of 119 models

Reasoning

GPQA Diamond

57.5%

Graduate-level scientific reasoning · top 82%

HLE

3.8%

Humanity's Last Exam · top 92%

Latency & design

Time to first token
2.59s

Independent scores from Artificial Analysis and DesignArena · updated 10/5/2026. Higher is better; ranks compare against every model we track with that score.

Rates

Phi-4 pricing

Pricing is based on token usage. Provider-specific caching, batch, regional, and tool charges may affect the final cost.

Input · Standard

$0.07

Per 1M tokens

Cached input · Standard

Not available

No listed cached-input rate

Capabilities

Phi-4 Tools

Tools available when using Phi-4 through supported provider APIs.

Where to run it

Phi-4 API providers

2 providers serve Phi-4. Prices are per 1M tokens; uptime is the last 24 hours.

DeepInfrabf16
Input
$0.06
Output
$0.11
Cached
—
Context
16K
Uptime
100%
DeepInfrabf16
Input
$0.07
Output
$0.14
Cached
—
Context
16K
Uptime
99.9%

Strengths and limitations

Strengths

  • Price rank 23 of 330 tracked models (1 = cheapest, by blended price).
  • Blended price at 3 input : 1 output is $0.088 per 1M tokens.
  • 1M input + 250K output tokens costs about $0.11.
  • Context window 16K vs a median of 262K (16.0× smaller).

Limitations

  • Real-world cost still depends on prompt length, response length and provider-specific billing rules.
  • The 16K context window is smaller than several long-context alternatives.
  • Benchmarks are directional; test accuracy, latency and reliability on your own workload before committing.

Public listed prices, checked Dec 4, 2026. Benchmarks as published by their sources. Confirm with the provider.

Same provider

More models from Microsoft

View provider →
66K

$0.62 in · $0.62 out

View model

Peer set

Alternatives to Phi-4

128K

$0.15 in · $0.60 out

Compare side-by-side

Frequently asked questions about Phi-4

Phi-4 is a code & slms and text & reasoning model from Microsoft. 14B small language model, great for edge and cheap tasks.

Phi-4 costs $0.07 per million input tokens and $0.14 per million output tokens on standard pricing. A workload of 20M input and 5M output tokens a month is about $2.10.

Phi-4 accepts up to 16,384 tokens (16K) of input and can return up to 14,745 tokens in one response.

Tool calling is not listed for Phi-4 and structured (JSON) outputs. Supported tools: Structured outputs, JSON mode, Deterministic seed.

Phi-4 accepts Text as input and produces Text as output.

Phi-4 is available from 2 API providers: DeepInfra, DeepInfra. Prices can differ by provider.

Phi-4 was released by Microsoft in 2024-12.