
phi-4
Microsoft/Open weights/1 provider
Phi-4-reasoning-plus is an enhanced 14B parameter model from Microsoft, fine-tuned from Phi-4 with additional reinforcement learning to boost accuracy on math, science, and code reasoning tasks. It uses the same dense decoder-only transformer architecture as Phi-4, but generates longer, more comprehensive outputs structured into a step-by-step reasoning trace and final answer. While it offers improved benchmark scores over Phi-4-reasoning across tasks like AIME, OmniMath, and HumanEvalPlus, its responses are typically ~50% longer, resulting in higher latency. Designed for English-only applications, it is well-suited for structured reasoning workflows where output quality takes priority over response speed.MoreLess
Which id to call
deepinfra/microsoft/phi-4:flexThis model has no managed policy yet, so call the provider endpoint directly. Every id in the endpoints table works the same way.
From /1M input
$0.06
DeepInfra Inc.
Context
16K
tokens
Endpoints
2
1 region
Price spread
1.3x
2 endpoints
Capabilities 1/8
2 endpoints / 1 region
Providers serving phi-4
Provider prices, per 1M tokens. Pay as you go adds 5%, or 0% on your own keys.
| Rank | Privacy | ||||||
|---|---|---|---|---|---|---|---|
| 1 | DeepInfra Inc. | Global | 16K | $0.06 | $0.11 | - | zdr |
| 2 | DeepInfra Inc. | Global | 16K | $0.07 | $0.14 | $0.07 | zdr |
A column is blank where no qualifying sample exists, and every row links to that provider's endpoint page.
model=
Which id to call
One base url, https://router.requesty.ai/v1, and one key for every id here.
deepinfra/microsoft/phi-4:flexThis model has no managed policy yet, so call the provider endpoint directly. Every id in the endpoints table works the same way.
OpenAI compatible
Call it in three lines
Change the base url, use your Requesty key, set the model to any id on the left. Existing OpenAI SDK code needs no other edit.
123456789101112131415from openai import OpenAI client = OpenAI( api_key="YOUR_REQUESTY_API_KEY", base_url="https://router.requesty.ai/v1", ) response = client.chat.completions.create( model="deepinfra/microsoft/phi-4:flex", messages=[ {"role": "user", "content": "Explain quantum computing in one paragraph."}, ], ) print(response.choices[0].message.content)
Artificial Analysis
Benchmark scores
Graduate-level physics, chemistry & biology questions designed to resist Googling.
Artificial Analysis Intelligence Index: a composite of multiple evaluations measuring overall model capability.
Scores from artificialanalysis.ai. They measure the model, not the provider, so they are the same on every endpoint above.
1
More from Microsoft
Reference
phi-4 questions
Which providers serve phi-4?
phi-4 is available from 1 provider through Requesty: DeepInfra Inc.. All endpoints share one OpenAI-compatible API and one key, and Requesty fails over between them automatically.
How much does phi-4 cost?
Pricing starts at $0.06 per million input tokens and $0.11 per million output tokens on DeepInfra Inc., the cheapest endpoint. Prices vary by provider and region; the table above shows every endpoint. Those are the upstream provider rates: pay as you go adds 5% on top, or 0% if you bring your own provider keys.
Is phi-4 open weights?
Yes. phi-4 is an open-weights model from Microsoft, which is why multiple inference providers can host it. Provider choice affects price, latency, and data-privacy terms, all compared above.
What is the context window of phi-4?
phi-4 supports up to 16K tokens of context. Some providers expose a smaller window; check the per-endpoint context column above.
How do I use phi-4 with the OpenAI SDK?
Install the OpenAI SDK, set base_url to "https://router.requesty.ai/v1", set your API key to your Requesty key, and set the model to "deepinfra/microsoft/phi-4:flex" or any endpoint id from the table above. The quickstart section shows Python, JavaScript and cURL snippets.
Route phi-4 through one endpoint
One key for 1 provider on this model and 600+ others. No markup on provider prices, automatic failover, caching built in.

