Text generation / Microsoft

Phi-4

Phi-4 is a text generation model from Microsoft, available through the Impossibl API. Its published context window is 16,000 tokens. The advertised input rate is $0.125 per million input tokens. The advertised output rate is $0.50 per million output tokens.

api id: microsoft/phi-4

model as markdown ↗

how much does phi-4 cost?

published base api rates · usd per 1m tokens

input
$0.125
output
$0.50

rates are published by the impossibl api. balance-purchase fees, taxes, tool charges, and workspace-specific pricing are separate.

specifications & capabilities

creator
Microsoft
model type
Text generation
context window
16k tokens
maximum output
not published in the catalog
input types
text
output types
text
tool calling
not supported

unknown means the public catalog does not establish that fact. a model's documented capabilities can differ from what a particular api supports.

published endpoint

/v1/chat/completions

see the model documentation for integration details.

estimate your usage

estimate your api cost

estimate text token usage for your workload. all amounts are in usd.

token workload

total input, including cached tokens

include billable reasoning tokens

the same token usage in each request

a subset of total input, never additional tokens

Phi-4

$0.375

estimated usage cost

1,000 requests × (1,000 uncached input × $0.125 + 500 output × $0.50) / 1,000,000 = $0.375

base rates; no context pricing tiers are published.

estimates use published impossibl api usage rates. configured billing adjustments, funding fees, taxes, and custom workspace rates are excluded and may change the final amount.

image and audio usage, cache creation, and additional tool charges are excluded. reasoning tokens count as billable output, even when they are not visible in the response.

compare more Text generation models

independent benchmarks

Results from Artificial Analysis. Each configuration is listed separately. These evaluations describe the tested model configuration; performance and costs can differ on Impossibl. Last checked 2026-09-11.

Phi-4
BenchmarkScore
Intelligence Index5.92
Omniscience Index-55.70
GPQA57.47%
Humanity’s Last Exam3.76%
CritPt0.00%
Terminal-Bench Hard3.79%
AA-LCR0.00%
IFBench23.54%
Tau20.00%
LiveCodeBench23.07%
AIME 202518.00%
intelligence index (API)5.9

Unmeasured scores are omitted. API values retain their source units.

view source ↗

all source data and breakdowns (JSON) ↗

frequently asked questions

What is Phi-4?

Phi-4 is a text-generation model from Microsoft, available through the Impossibl API.

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.

view the pricing table ↑

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.

follow the api quickstart →

When was Phi-4 released?

Microsoft released Phi-4 on December 12, 2024.

sources & coverage

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.

view the source catalog ↗

model descriptions and release dates, where available, use the creator sources linked in the faq. api prices and limits use the impossibl catalog. benchmark results, where available, are credited to Artificial Analysis in the benchmarks section. report a correction →