LLM Insights中文
MicrosoftText

Phi-4-mini

Phi-4-mini is Microsoft's model at $0.02 input and $0.04 output per million tokens, with a 128K context window. On a typical 3:1 input-to-output mix that blends to roughly $0.025 per million tokens, placing it in the budget band of the 68 models tracked here — cheaper than 100% of them.

MODEL OVERVIEW
Context window128K
Input price$0.02 / 1M
Output price$0.04 / 1M
Output speed250 tok/s
Quality score68
Data updatedUpdated Jun 2026
Price verified2026-07-10 · OpenRouter

By price, Phi-4-mini ranks 1st cheapest of 68 on input and 1st on output. Its quality score of 68 ranks 65th of 68, and on value (quality score ÷ output price) it ranks 1st of 68. Its blended rate sits 99% below the catalog average.

In real billing terms: a support chatbot handling 50,000 turns a month (2,000 input / 500 output tokens each) costs about $3.00 per month on Phi-4-mini, while a RAG workload of 20,000 queries (8,000 input / 800 output tokens each) runs about $3.84. Because output is priced 2.0× input here, long-generation tasks scale cost fastest — cap output length before you optimise anything else.

A 128K context window holds roughly 171 pages of A4 text (at ~750 tokens per page), ranking 53rd of 68 here. That covers typical RAG and multi-turn chat, though book-length inputs still need retrieval and chunking. Output runs at about 250 tok/s (2nd fastest of 68), fast enough for real-time interaction and high-throughput batches.

We track 4 Microsoft models, and Phi-4-mini's blended rate sits 77% below that provider's average. Among the models tracked here it is already one of the cheapest options at this quality level. Going the other way, qwen3.5-flash scores 82 on quality for about 120% more.

The closest model in Microsoft's line-up is Phi-4 ($0.07 input / $0.14 output, quality 76). Against it, Phi-4-mini scores 8 points lower on quality, runs 70 tok/s faster (about 39%), has a 112K larger context window, costs 250% less blended. When two models sit this close on price, the deciding factor is usually the quality ceiling — run both against your real prompts before picking.

Estimated monthly cost

Monthly API spend across four common workloads, next to the cheapest model we track.

WorkloadUsage assumptionThis modelCheapest model
Support chatbot2,000 input / 500 output tokens per turn, 50,000 turns per month$3.00$3.00
RAG document Q&A8,000 input / 800 output tokens per query, 20,000 queries per month$3.84$3.84
Coding assistant12,000 input / 2,000 output tokens per request, 10,000 requests per month$3.20$3.20
Batch summarization4,000 input / 400 output tokens per item, 200,000 items per month$19$19

Derived directly from the rates on this page. Excludes prompt caching, batch discounts and free tiers.

How it compares

The alternatives worth benchmarking alongside it, from the same dataset.

ModelProviderBlended /1MQualityPrice delta
Phi-4-miniMicrosoft$0.02568
qwen3.5-flashHigher qualityAlibaba$0.05582+120%
Phi-4Same providerMicrosoft$0.08876+250%

Best for

ChatbotAffordableFast

Modalities

Text

Where it fits — and where it doesn't

Good fit

  • Chat and support: natural multi-turn conversation for user-facing products.
  • High throughput and real-time UX: 250 tok/s keeps streamed responses feeling instant.
  • High-volume, cost-sensitive batch work: low rates suit classification, tagging and summarization at scale.

Poor fit

  • Hard reasoning: a quality score of 68 is on the low side here; pick a stronger model for complex planning or maths.
  • Image understanding: this model is text-only, so vision tasks need a multimodal alternative.

Frequently asked questions

How much does the Phi-4-mini API cost?

Phi-4-mini costs $0.02 per million input tokens and $0.04 per million output tokens. On a 3:1 input-to-output mix that blends to about $0.025 per million tokens.

What does Phi-4-mini cost per month?

It depends on volume. Using the four worked scenarios on this page: a support chatbot runs about $3.00/month, RAG document Q&A about $3.84/month, a coding assistant about $3.20/month, and batch summarization about $19/month. Plug your own token counts into the cost calculator for a tailored figure.

How large is the Phi-4-mini context window?

128K tokens — roughly 171 pages of A4 text at ~750 tokens per page, ranking 53rd of the 68 models tracked here.

What is Phi-4-mini best suited for?

Tagged use cases: chatbot, cheap, fast. Chat and support: natural multi-turn conversation for user-facing products. Less suitable: Hard reasoning: a quality score of 68 is on the low side here; pick a stronger model for complex planning or maths.

How current is this Phi-4-mini pricing?

Pricing here was last verified on 2026-07-10 against OpenRouter. llmprice.app runs a daily collection job, but providers can change rates between runs — confirm against Microsoft's official pricing page before you commit.

Estimate the real cost of this model

Bring tokens per request and monthly volume into the calculator to compare total model costs.

Open cost calculator

Related models

Continue by provider and use case.

Microsoft

Phi-4

Input price$0.07
Output price$0.14
View model
Microsoft

Llama-3.3-70B-Instruct

Input price$0.1
Output price$0.32
View model
Microsoft

MAI-DS-R1

Input price$0.14
Output price$0.28
View model

Pricing, speed and quality scores change over time. Confirm official documentation before production use.