microsoft logo
microsoft

Microsoft: Phi 4

Source description (English)

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

Overview

Model specifications

Context
16,384 tokens
Maximum output
14,745 tokens
Architecture
text->text
Tokenizer
Other
Knowledge cutoff
2024-06-30
Moderated
No
OPENROUTER

Complete pricing

Synchronized OpenRouter rates. Token prices are shown per one million tokens.

Input
$0.07
per 1M tokens
Output
$0.14
per 1M tokens
API

Quick start

Set OPENROUTER_API_KEY locally. Python requires requests; JavaScript runs in Node.js. Keep the key on the server.

API documentation

curl --fail-with-body https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"microsoft/phi-4","messages":[{"role":"user","content":"Hello!"}]}'
Capabilities

Input → Output

Input
text
Output
text
API

Supported API parameters

frequency_penaltylogit_biasmax_tokensmin_ppresence_penaltyrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetop_ktop_p
Available providers

1 Provider

Checked: September 7, 2026

Live providers on OpenRouter

Provider availability, latency, throughput and routing can change continuously. Open the source page for current operational data.

OpenRouter

DeepInfra

bf16
Context
16K
Maximum output
15K
Input
$0.07
Output
$0.14
Cache read
Not provided
Cache write
Not provided
microsoft

4 models

All models
microsoft logomicrosoft

Microsoft: Microsoft-Decision-1

Microsoft-Decision-1 is a small model built for fast decision-making. Instead of generating text, it reads the provided content and returns a calibrated probability for each fixed answer option, so the...

Context
33K
Input
text
Output
decisions
Input: $0.042 per 1M tokensOutput: Free per 1M tokens
View model details →
microsoft logomicrosoft

Microsoft AI: MAI-Voice-2.1-Flash

MAI-Voice-2.1-Flash is a low-latency text-to-speech model from Microsoft AI, optimized for real-time responsiveness. It produces natural, expressive speech across 23 languages, with human-like intonation, rhythm, and emotional nuance. It is...

Context
Not provided
Input
text
Output
speech
Characters: $15 per million characters
View model details →
microsoft logomicrosoft

Microsoft AI: MAI-Voice-2.1

MAI-Voice-2.1 is Microsoft AI's highest-fidelity, most expressive text-to-speech model. It produces natural, studio-grade speech across 23 languages, with detailed prosody, nuanced expressiveness, and speaker consistency over long-form content. It is...

Context
Not provided
Input
text
Output
speech
Characters: $22 per million characters
View model details →
microsoft logomicrosoft

Microsoft AI: MAI-Image-2.6

MAI-Image-2.6 is an image generation and editing model from Microsoft AI, the precision tier of the MAI-Image-2.6 family alongside the faster MAI-Image-2.6 Flash. It is suited for design-ready visuals and...

Context
4K
Input
text · image
Output
image
Input: $5 per 1M tokensImage output: $38 per 1M tokens
View model details →