Microsoft model page

Microsoft: Phi 4

microsoft/phi-4

[Microsoft Research](/microsoft) 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...

TextStructured outputReasoning
Input / 1M
$0.09
Output / 1M
$0.18
Context
16K
Markup
30%

Use this model through UAI

A dedicated public landing page for this synced catalog row.

Provider
Microsoft

Synced from the active catalog

Context window
16K tokens

Validated for gateway requests

UAI input
$0.09

Charged from your UAI balance

UAI output
$0.18

Same API key and billing flow

This page exists for direct linking, onboarding, and SEO. The same model row powers /v1/models, the public catalog, the app pricing screen, and request validation for /v1/chat/completions.

Why use this model through UAI

The same model route, but with one account, one balance, and one API shape.

Reasoning workloads

Use Microsoft: Phi 4 for multi-step prompts, planning, and deeper analysis while keeping the same OpenAI-compatible UAI endpoint.

OpenAI-compatible access

Call microsoft/phi-4 with the same UAI API key, the same /v1/chat/completions shape, and the same request validation used across the rest of the catalog.

Shared pricing and billing

Pricing, balance, and request history stay consolidated in one UAI account instead of spreading usage across separate Microsoft dashboards.

Pricing and access

Current synced numbers for this exact model row.

UAI input / 1M tokens
$0.09
UAI output / 1M tokens
$0.18
Microsoft input / 1M
$0.07
Microsoft output / 1M
$0.14
Context window
16,384
Current markup
30%

Need another option? Browse the full models catalog or compare rows in the signed-in pricing table.

Quickstart

Use this model with your UAI key over the standard OpenAI-compatible route.

Create a key in API Keys, then send requests to https://uai.sh/v1/chat/completions.

curl
curl https://uai.sh/v1/chat/completions \
  -H "Authorization: Bearer uai-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "microsoft/phi-4",
    "messages": [{"role": "user", "content": "Say hi in one short sentence."}],
    "stream": false
  }'
Python (OpenAI SDK)
from openai import OpenAI

client = OpenAI(base_url="https://uai.sh/v1", api_key="uai-YOUR_API_KEY")
response = client.chat.completions.create(
    model="microsoft/phi-4",
    messages=[{"role": "user", "content": "Say hi in one short sentence."}],
    stream=False
)
print(response.choices[0].message.content)
Node.js (OpenAI SDK)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://uai.sh/v1",
  apiKey: "uai-YOUR_API_KEY"
});

const response = await client.chat.completions.create({
  model: "microsoft/phi-4",
  messages: [{ role: "user", content: "Say hi in one short sentence." }],
  stream: false
});

console.log(response.choices[0].message.content);

Related models

Other active rows to compare without leaving the public catalog.

microsoft
WizardLM-2 8x22B
microsoft/wizardlm-2-8x22b
Input / 1M$0.81
Context66K tokens
nvidia
NVIDIA: Nemotron 3.5 Lightning
nvidia/nemotron-3.5-lightning
Input / 1M$0.09
Context262K tokens
qwen
Qwen: Qwen3 Coder 30B A3B Instruct
qwen/qwen3-coder-30b-a3b-instruct
Input / 1M$0.09
Context262K tokens