Models / Phi 4ID: azure_ai/Phi-4
chat model by Microsoft

Phi 4

Phi-4 is Microsoft's 14-billion parameter language model engineered for complex reasoning, mathematical problem solving, and code generation, trained on synthetic reasoning datasets and curated web texts.

Certified & verified by nRouter· facts checked 2026-09-16 against 2 official sources

Context window16.4K
Max output4K
Maker

Microsoft

Served On

Azure Foundry

Specifications

Context window, ranked against other chat models

Proportional scale: 0 to 131.1K tokens. Not ranked, no published context window: glm-5.3-prime, qwen3-235b-a22b-2507, qwen3.7-max-2026-05-17, claude-opus-5-5.

Context window

16.4K

Source: learn.microsoft.com
Max output

4K

Source: learn.microsoft.com
Modality

chat

Vision
Function calling
System prompt

Benchmarks

not listed on arena.ai text leaderboard as of 2026-09-15

Pricing

Rates are read live

Pricing for Phi-4 is fetched from the live catalogue on load, so it is never served from a cache that could outlive a repricing.

Availability

Not enough data yet

We have not collected enough health probes for this model to publish an uptime or latency figure. A percentage from a handful of samples is fabricated precision, so none is shown until the sample count supports one.

How Phi 4 is billed

Billed at the provider's list price, with no per-token markup.

Exact list price
Tokens settle at the published rate of the model that served your call.
Cache discounts passed through
Provider prompt-caching discounts reach your balance with no added fee.
Cost on every response
Each response carries the x-nr-request-cost header, so you can reconcile spend per request.

More from Microsoft

Start building with Phi-4

One API key, three steps. Choose your tool to begin.

  1. Set your API key

    export NROUTER_API_KEY="<YOUR_API_KEY>"
  2. Configure Claude Code

    Choose a tool, then copy its setup from the panel.

npm install -g @anthropic-ai/claude-code
Claude Code · azure_ai/Phi-4
# Point Claude Code to nRouter gateway
export ANTHROPIC_BASE_URL="https://api.nrouter.ai"
export ANTHROPIC_API_KEY="$NROUTER_API_KEY"

# Launch with azure_ai/Phi-4
claude --model azure_ai/Phi-4