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 parameters, it was trained on a mix of high-quality synthetic datasets, data from curated websites, and academic materials. It has undergone careful improvement to follow instructions accurately and maintain strong safety standards. It works best with English language inputs. For more information, please see Phi-4 Technical Report
- Input / output price
- $0.07 / $0.14 per 1M
- Context
- 16K tokens
- Released
- Dec 12, 2024
Paste into Claude Code, Cursor, or Codex
Help me set up the Respan gateway: fetch and follow https:/
Providers
2 providers, cheapest first, OpenRouter last, priced per 1M tokens after gateway discounts.
| Provider | Input | Output |
|---|---|---|
DeepInfra deepinfra/phi-4 | $0.07/M | $0.14/M |
OpenRouter openrouter/phi-4 | $0.07/M | $0.14/M |
Is a provider down? OpenRouter status
Pricing
Averaged across 2 providers, in USD per 1M tokens after gateway discounts.
- Average input
- $0.07 per 1M
- Average output
- $0.14 per 1M
Cost by volume
Total cost from 0 to 1T tokens.
Throughput and latency
30-day averages from requests through the Respan gateway. Under each figure, every model on the gateway by its average, this one in blue.
Output speed
Higher is better12tokens/sacross providers
Response latency
Lower is better0.3sacross providers
Benchmarks
The Respan Index plus 14 published scores from 4 sources, each linked to where it was published.
9.2/ 100
Respan Index#173 of 175
- 173Phi-49.2
- 172Qwen2.5 72B Instruct10.0
- 174Llama 3.1 8B Instruct7.2
Published scores
| Benchmark | Score | Source | Published |
|---|---|---|---|
| HumanEval+microsoft.com | 82.8% | microsoft.com | Dec 12, 2024 |
| HumanEvalmicrosoft.com | 82.6% | microsoft.com | Dec 12, 2024 |
| Benchmark | Score | Source | Published |
|---|---|---|---|
| GPQA DiamondEpoch AI | 56.1% | Epoch AI | Oct 5, 2026 |
| GPQA Diamondmicrosoft.com | 56.1% | microsoft.com | Dec 12, 2024 |
| Chess PuzzlesEpoch AI | 1% | Epoch AI | Oct 5, 2026 |
| Benchmark | Score | Source | Published |
|---|---|---|---|
| MATHmicrosoft.com | 80.4% | microsoft.com | Dec 12, 2024 |
| MATH Level 5Epoch AI | 64.9% | Epoch AI | Oct 5, 2026 |
| OTIS Mock AIME 2024-2025Epoch AI | 13.8% | Epoch AI | Oct 5, 2026 |
| Benchmark | Score | Source | Published |
|---|---|---|---|
| MMLUmicrosoft.com | 84.8% | microsoft.com | Dec 12, 2024 |
| MMLU-Promicrosoft.com | 70.4% | microsoft.com | Dec 12, 2024 |
| IFEvalmicrosoft.com | 63% | microsoft.com | Dec 12, 2024 |
| Benchmark | Score | Source | Published |
|---|---|---|---|
| ArenaHardmicrosoft.com | 75.4% | microsoft.com | Dec 12, 2024 |
| LMArena EloLMArena | 1256 Elo · #177 of 187 | LMArena | Nov 18, 2026 |
Compare Phi 4: Phi-4 vs GPT-6 Astra, Phi-4 vs Gemini 4 Argon
Apps
Use Phi 4 in the tools you already run. Each guide points the app at the Respan gateway.
Setup guides for more apps are in the integration docs.
Phi 4 FAQ
Short answers, built from the data on this page.
Phi 4 is a model from Microsoft, released on Dec 12, 2024. 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 parameters, it was trained on a mix of high-quality synthetic datasets, data from curated websites, and academic materials. It has undergone careful improvement to follow instructions accurately and maintain strong safety standards. It works best with English language inputs. For more information, please see Phi-4 Technical Report.
On the Respan gateway, Phi 4 costs $0.07 per 1M input tokens and $0.14 per 1M output tokens on every provider, after gateway discounts.
Phi 4 is available through 2 providers: DeepInfra and OpenRouter.
Phi 4 accepts up to 16K tokens of context on its largest provider route.
Point any OpenAI-compatible SDK at https://gateway.respan.ai/v1 with your Respan API key and set the model to "phi-4". To set it up with a coding agent, copy the agent setup prompt at the top of this page.
Phi 4 scores 9.2 out of 100 on the Respan Index v1.1, ranking #173 of 175 models. By category: Coding 0.6 (estimated), Agents 1.0, Reasoning 17.2, Knowledge & language 4.8, and Human preference 27.1. The Respan Index combines independent and lab-reported benchmark results into one score, using benchmark data collected by Respan.
Phi 4 has 14 published benchmark scores, including HumanEval+ 82.8%, BALROG 11.6%, and GPQA Diamond 56.1%. Each score links to where it was published; the data is collected by Respan.
Certified where it counts.
Built to meet the security and privacy standards that enterprise and healthcare teams require.
ISO 27001
The internationally recognized standard for information security management.
SOC 2
Secure, compliant management of your data across all of our systems.
GDPR
Operated under GDPR, the world's strictest standard for data privacy.
HIPAA
HIPAA compliant, with a BAA available for healthcare teams.