Available now
Azure
Microsoft

phi-4

Microsoft Research Phi-4 is designed to perform well in complex reasoning tasks and can operate efficiently in situations with limited memory or where quick responses are needed. At 14 billion...

TextOpen Weights128K
InputFree
OutputFree
Context128K
Endpointsopenai

Capabilities

Structured

Modalities

Input
text
Output
text

Quick stats

Context window128K
Max output16.4K
Modechat
TokenizerOther
Knowledge cutoff2024
Quantizationbf16
Hugging Facemicrosoft/phi-4

Performance

Loading performance data...

Supported parameters

ParameterAlwaysDefault
frequency_penalty-
logit_bias--
logprobs--
max_tokens-
min_p--
presence_penalty-
repetition_penalty-
response_format-
seed-
stop-
structured_outputs-
temperature-
top_k--
top_logprobs--
top_p-
§ 01

Pricing

Input price$0.00 · 1M tokens
Output price$0.00 · 1M tokens
Context window128K tokens
Compatible endpointsopenai
VendorMicrosoft
§ 02

Call phi-4 from your code

Point any OpenAI-compatible SDK at UnoRouter and request the model by name. Replace YOUR_API_KEY with a real key from your dashboard.

bash
curl https://api.unorouter.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "phi-4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Sign in to auto-fill your API key

§ 03

Frequently asked questions

How much does phi-4 cost per 1M tokens?

Input is priced at $0.00 per 1M tokens, output at $0.00 per 1M tokens. Billing is per token, no rounding to batch sizes.

How do I access phi-4 via API?

Send requests to the UnoRouter /v1/chat/completions endpoint with model=phi-4. Any OpenAI-compatible client library works. Authentication uses a standard Bearer token.

What is the context window of phi-4?

phi-4 supports a context window of 128K tokens, shared between your prompt and the model's response.

§ 04

Similar models

Try phi-4 now

Create an API key and start making requests in under a minute.

View all models