Home / Models / Microsoft / Phi 4

Phi 4 pricing and routing profile

Phi 4 from Microsoft lists at $0.07 per million input tokens and $0.14 per million output tokens, with a 16,384-token context window. Prices from OpenRouter's catalogue on 2026-09-28.

Input, per 1M tokens$0.07
Output, per 1M tokens$0.14
Context window16K
Confidence signalNot exposed

Structured output

Cost per 1,000 requests

Request shapeList cost
Classification or routing (600 tokens in, 10 out)$0.0434
Chat reply (2,000 in, 400 out)$0.196
Retrieval-augmented answer (8,000 in, 500 out)$0.63

Before prompt caching. Try your own shape in the cost calculator.

Can Gimbix route to it first?

Not as a first-answer model through OpenRouter: no host returns token log probabilities for Phi 4. It can still be the model Gimbix falls back to when a cheaper model is unsure.

Who serves Phi 4

HostInput / output per 1MLog probabilitiesUptime, last 30 min
DeepInfra$0.07 / $0.14no100.0%

A host that lists log probabilities may still omit them; Gimbix checks each one before relying on it.

Cheaper models that can answer first

Models priced below Phi 4 that expose a confidence signal. Whether they answer your traffic as well is what a Gimbix pilot measures.

ModelInput / output per 1MCheaper on a chat reply
Llama 3.1 8B Instruct$0.05 / $0.0833%
Qwen3.7 Flash$0.03 / $0.1343%
Granite 4.0 Micro$0.017 / $0.11260%
gpt-oss-20b$0.018 / $0.0963%
Ling 3.0 Flash$0.021 / $0.06366%
Ling 3.0 Flash VL$0.021 / $0.061666%

Questions

How much does Phi 4 cost?

Phi 4 lists at $0.07 per million input tokens and $0.14 per million output tokens on OpenRouter as of 2026-09-28. A typical chat reply of 2,000 input and 400 output tokens costs about $0.196 per 1,000 requests.

What is the context window of Phi 4?

16,384 tokens.

Can a cheaper model replace Phi 4?

Sometimes. Gimbix proves it on your own traffic before routing: the cheaper model must match Phi 4 on one half of your requests and make at most three answers worse on the other.