THE MODEL, IN DETAIL / Microsoft Research

phi-4

microsoft/phi-4Open weightsUnspecified source configuration configuration

[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...

OpenRouter
Source-linked model intelligenceCatalog added 10 Jan 2025Specifications observed 28 Oct 2026

Specifications and providers describe Microsoft: Phi 4. Evaluation scores retain the exact Unspecified source configuration configuration.

GPQA Diamond

56.1%

Source-reported

Context window

16.4K

14.7K max output tokens

Input price

$0.07

USD / million input tokens

Output price

$0.14

USD / million output tokens

Inference providers

1

2 provider routes observed

Measured output speed

—

No model-level measurement

01 / PERFORMANCE

A clearer view of capability.

Read the score, understand the context, and explore where this model sits among its peers.

Performance fingerprint

Individual published accuracy scores · not a composite index

Individual benchmark accuracy. Axes represent different tasks, not a composite index.GPQA DiamondMATH Level 5OTIS Mock AIME …GPQA Diamond: 56.1MATH Level 5: 64.9OTIS Mock AIME 2024–2025: 13.8Each axis: 0–100% · Individual evaluations

Performance meets price

GPQA Diamond · same published source and version

In good company

GPQA Diamond · Epoch AI · benchmark data

96.4
Google DeepMind
95.8
OpenAI
95.6
Anthropic
57.2
Google DeepMind
57.1
Google DeepMind,Google
56.8
Alibaba
56.5
DeepSeek
56.1
Alibaba
56.1
Mistral AI
56.1
This model

Rank #153 in this published cohort. 325 models in the source cohort. Showing selected nearby models. Evaluation settings can differ.

Evidence, by task.

Coverage is not a capability score.

3published results
1 evaluation source
Reasoning3 evaluations
CodingAwaiting evidence
Mathematics2 evaluations
VisionAwaiting evidence
AgenticAwaiting evidence
Long contextAwaiting evidence

Documented features, task evaluations, and preference rankings describe different things. Missing coverage does not imply a model cannot perform a task.

Explore our methodology

02 / BENCHMARK EXPLORER

The numbers behind the model.

Original results, exact versions, and a direct path to the evidence behind every score.

3 published results

3 percentage-based evaluations. Each benchmark measures a different task; compare results within the same evaluation and protocol.

Published benchmark results for phi-4
BenchmarkScoreVersion & metricSourcePublishedEvidence
Epoch AI · independent runsAccuracy · Higher is betterEpoch AI · benchmark dataSource-reportedNot available
Epoch AI · independent runsAccuracy · Higher is betterEpoch AI · benchmark dataSource-reportedNot available
Epoch AI · independent runsAccuracy · Higher is betterEpoch AI · benchmark dataSource-reportedNot available

03 / COST & VALUE

Know what your workload costs.

Explore token prices, see where the spend goes, and model a workload of your own.

Input$0.07per million tokens
Output$0.14per million tokens
Cache read—per million tokens
Cache write—per million tokens

Workload cost calculator

Change the numbers. See the trade-offs.

Cache-read pricing is not documented for this selection.

Token estimate only. Excludes cache writes, tools, and other provider fees. Actual token usage and provider limits vary.

Your estimated spend

1,000 requests · 11M tokens

$0.84estimated total
Uncached input$0.7
Cached input$0
Output$0.14
Per request$0.0008
Without cache discount$0.84
Estimated cache savings$0

04 / INFERENCE NETWORK

One model. Different ways to run it.

Compare inference routes by price, context, quantization, and reported availability.

1 providers · 2 routes
Provider routes for phi-4, observed 28 Oct 2026
Provider / routeInput / MOutput / MCache / MContextOutput limitSpeedLatencyAvailability · 1dRates
DDeepInfraBF16 · flex$0.056$0.112—16.4K14.7K——100%
DDeepInfraBF16$0.07$0.14—16.4K14.7K——99.73%

Snapshot observed 28 Oct 2026. Speed and latency are the reported 30-minute median when available. This is a dated snapshot, not live monitoring.

Provider price comparison

USD per million tokens · input and output rates

InputOutput
DeepInfrabf16 · flex
Input
$0.056
Output
$0.112
DeepInfrabf16
Input
$0.07
Output
$0.14

Reported availability

Provider availability over the selected observation window

DeepInfra · flex · BF16100%
DeepInfra · BF1699.73%

Output speed

Reported 30-minute p50 · tokens per second

No provider throughput measurements were returned in this snapshot.

Response latency

Reported 30-minute p50 · seconds

No provider latency measurements were returned in this snapshot.

Context by provider

Actual route limits can differ from the catalog maximum

DeepInfra · flex · BF1616.4K
DeepInfra · BF1616.4K

05 / CAPABILITIES & MODALITIES

What goes in. What comes out.

A map of documented interfaces and API features, separate from benchmark performance.

INPUT MODALITIES

Text
phi-4Model interface

OUTPUT MODALITIES

Text

Feature support

Listed catalog API parameters and documented pricing features

ReasoningNot listed
Tool callingNot listed
Tool choiceNot listed
Structured outputsSupported
Response formatSupported
Reasoning detailsNot listed
Seed controlSupported
Stop sequencesSupported
Prompt cachingNot documented
TemperatureSupported

Room to work

Context capacity and completion limits

16.4Ktotal context tokens
Context window
14.7Kmax output

Output tokens share the total context budget. The maximum completion length is a separate limit, and individual provider routes may have smaller limits.

Catalog context
16,384 tokens
Maximum output
14,745 tokens
Top-provider context
16,384 tokens

Features vary by route

Check the provider before depending on a specific API feature.

API feature support by provider
Provider routeReasoningToolsStructured outputResponse formatImplicit caching
DeepInfra · flex · BF16Not listedNot listedSupportedSupportedNot listed
DeepInfra · BF16Not listedNot listedSupportedSupportedNot listed

06 / UNDER THE HOOD

The complete specification sheet.

Exact identities, model architecture, limits, and the defaults that shape a request.

Identity & architecture

Developer
Microsoft Research
Exact identity
phi-4
Subject
Model Configuration
Access
Open weights
License
Not disclosed
Parameters
Not disclosed
Tokenizer
Other
Instruction format
Not disclosed

Reasoning & controls

Reasoning
Not listed
Mandatory reasoning
Not documented
Reasoning by default
Not documented
Published configuration
Unspecified source configuration
Supported reasoning efforts
Not documented
Default reasoning effort
Not disclosed
API parameters
13
Provider moderation
No
Quantization variants
bf16

Dates & limits

Catalog added
10 Jan 2025
Knowledge cutoff
2024-06-30
Catalog expiration
Not documented
Specifications observed
28 Oct 2026
Providers observed
28 Oct 2026
Request limits
Provider-specific / not supplied
Canonical catalog ID
microsoft/phi-4

API parameters & defaults

Availability is catalog-wide. Defaults can vary across providers.

frequency_penaltySupported · default not supplied
logit_biasSupported · default not supplied
max_tokensSupported · default not supplied
min_pSupported · default not supplied
presence_penaltySupported · default not supplied
repetition_penaltySupported · default not supplied
response_formatSupported · default not supplied
seedSupported · default not supplied
stopSupported · default not supplied
structured_outputsSupported · default not supplied
temperatureSupported · default not supplied
top_kSupported · default not supplied
top_pSupported · default not supplied

07 / BUILD WITH THIS MODEL

From exploration to your first request.

Use the documented catalog identifier and keep your API key in an environment variable.

Make an API request

const response = await fetch(
  "https://openrouter.ai/api/v1/chat/completions",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.OPENROUTER_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "model": "microsoft/phi-4",
      "messages": [
        {
          "role": "user",
          "content": "Explain the trade-offs in this design."
        }
      ]
    }),
  },
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
console.log(data.choices[0].message.content);

08 / PROVENANCE & HISTORY

Every number has a story.

Follow the source, check the observation date, and distinguish published results from model specifications.

The observation trail

Recorded events, in chronological order

Added to the model catalog

Catalog creation date, as recorded by OpenRouter.

Provider routes observed

2 inference routes in this snapshot.

Model specifications observed

Catalog pricing, limits, and supported parameters captured.

Observation dates describe when data was captured. They do not represent newly run evaluations or continuous performance monitoring.

Published observation ledger

Historical evidence, with source and version preserved.

Published observation history for phi-4
ObservedBenchmarkScoreVersionSourceVerification
28 Oct 2026OTIS Mock AIME 2024–2025Epoch AI · independent runsEpoch AI · benchmark dataSource-reported
28 Oct 2026MATH Level 5Epoch AI · independent runsEpoch AI · benchmark dataSource-reported
28 Oct 2026GPQA DiamondEpoch AI · independent runsEpoch AI · benchmark dataSource-reported
28 Oct 2026OTIS Mock AIME 2024–2025Epoch AI · independent runsEpoch AI · benchmark dataSource-reported
28 Oct 2026MATH Level 5Epoch AI · independent runsEpoch AI · benchmark dataSource-reported
28 Oct 2026GPQA DiamondEpoch AI · independent runsEpoch AI · benchmark dataSource-reported
28 Oct 2026OTIS Mock AIME 2024–2025Epoch AI · independent runsEpoch AI · benchmark dataSource-reported
28 Oct 2026MATH Level 5Epoch AI · independent runsEpoch AI · benchmark dataSource-reported
28 Oct 2026GPQA DiamondEpoch AI · independent runsEpoch AI · benchmark dataSource-reported

09 / A FEW MORE DETAILS

Questions worth asking.

Quick answers, drawn from this model’s connected specifications.

How much does phi-4 cost?

Catalog starting rates are $0.07 per million input tokens and $0.14 per million output tokens. Compare provider routes and service tiers above for their specific prices.

How much context can it handle?

16,384 tokens in the catalog context window. The catalog lists a maximum of 14,745 completion tokens. Provider limits can differ.

Does it support tools and structured output?

Tool calling: not listed. Structured outputs: listed as supported. See the provider feature matrix for route-specific differences.

How should I interpret these benchmark results?

Read the benchmark name, exact version, metric, source, and model configuration together. Different evaluation settings can change the result. Preference ratings and source-defined composite indices remain separate from task accuracy.

Are these prices and provider measurements live?

This page uses dated source snapshots. Catalog data was observed on 28 Oct 2026. Provider routes were observed on 28 Oct 2026. Missing measurements are not estimated or treated as zero.

THE RIGHT MODEL STARTS WITH THE RIGHT CONTEXT.

Put the details side by side.

Explore the trade-offs in a direct model comparison.

Compare phi-4
phi-4 — Singularity Logs