Phi-4
Phi-4 is Microsoft Research's small open-weight language model, a dense 14-billion-parameter transformer designed for complex reasoning in memory- and latency-constrained settings.
input · usd / 1m tok
$0.125
output · usd / 1m tok
$0.50
context window
16ktokens
modalities · in → out
takes text in, gives text out
pricing
base api ratesusd per 1m tokens
- input
- $0.125
- output
- $0.50
providers
Azure AI Foundry hosts Phi-4. Impossibl routes your request intelligently and handles failover automatically when a provider is down.
- Azure AI Foundry
specifications
takes text in, gives text outmicrosoft/phi-4
- creatorMicrosoft
- model typeText generation
- context window16,000 tokens
- maximum outputnot published
- input
takes text in, gives text out
- outputtext
- tool callingnot supported
- releaseddec 12, 2024
- endpoint
/v1/chat/completions
unknown means the public catalog does not establish that fact. a model's documented capabilities can differ from what a particular api supports. see the model documentation for integration details.
try it · your prompt, this model, live
# responses API
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["IMPOSSIBL_API_KEY"],
base_url="https://api.impossibl.com/v1",
)
resp = client.responses.create(
model="microsoft/phi-4",
input="",
)
print(resp.output_text)
edit the prompt, then run
benchmarks
intelligence index
5.9#89 of 90 models on the gateway
- omniscience-55.7#82 of 86
- gpqa57.5%#82 of 88
- humanity’s last exam3.8%#84 of 89
- GPQA57.5%
- IFBench23.5%
- LiveCodeBench23.1%
- AIME 202518.0%
- Terminal-Bench Hard3.8%
- Humanity’s Last Exam3.8%
- CritPt0.0%
- AA-LCR0.0%
- Tau20.0%
- Intelligence Index5.92
- Omniscience Index-55.70
- intelligence index (API)5.9
each configuration is listed separately; these evaluations describe the tested model configuration, and performance and costs can differ on impossibl. unmeasured scores are omitted and api values keep their source units. last checked 2026-09-11.
compare Phi-4 with other models
frontier labs and open weights, best-ranked firstusd / 1m tok · in / out
- anthropic/claude-fable-5-1$10.00 / $50.00compare →
- openai/gpt-6-astra$10.00 / $50.00compare →
- meta/muse-spark-1.3$1.25 / $4.25compare →
- zai/glm-5.3$1.40 / $4.40compare →
frequently asked questions
What is Phi-4?
Phi-4 is Microsoft Research's small open-weight language model, a dense 14-billion-parameter transformer designed for complex reasoning in memory- and latency-constrained settings. It is trained on curated synthetic, textbook-like data for math, coding, and common-sense reasoning, extending the Phi-3 recipe with heavier supervised fine-tuning and preference alignment.
How much does Phi-4 cost?
Phi-4 costs $0.125 per million input tokens and $0.50 per million output tokens through the Impossibl API. All rates are in USD.
What is the context length of Phi-4?
Phi-4 has a 16,000-token context window through the Impossibl API.
Does Phi-4 support tool calling?
No. Phi-4 does not support tool calling through the Impossibl API.
What inputs and outputs does Phi-4 support?
Phi-4 accepts text as input. Phi-4 returns text.
How do I use Phi-4 through an API?
Phi-4 is available through the Impossibl API. Use microsoft/phi-4 as the model identifier with /v1/chat/completions. The quickstart explains how to create an API key and send your first request.
When was Phi-4 released?
Microsoft released Phi-4 on December 12, 2024.
this page describes Phi-4 as listed by the impossibl public api. prices and availability come from that catalog, refreshed here every five minutes. this is an impossibl offering, not a comparison of independent hosting-provider quotes. model descriptions and release dates, where available, use the creator sources linked under the answers above.
view the source catalog ↗model as markdown ↗report a correction →