microsoft logo
microsoft

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. $0.07 per million input tokens, $0.14 per million output tokens. 16,384 token context window, maximum output of 16,384 tokens. Includes independent benchmarks from Artificial Analysis.

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
/M tokens
Output
$0.14
/M tokens
API

Quick start

Call this exact model ID through OpenRouter’s OpenAI-compatible API.

curl 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

InputOutput

Input
text
Output
text
API

Supported API parameters

frequency_penaltylogit_biasmax_tokensmin_ppresence_penaltyrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetop_ktop_p
Available providers

1 Provider

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.070
Output
$0.140
Cache read
Not provided
Cache write
Not provided
microsoft

models

All models
microsoft logomicrosoft

Microsoft: MAI-Image-2.5 Pro

Microsoft's MAI-Image-2.5 is a high-quality image generation model available via Azure AI Foundry. It produces photorealistic and artistic images from text prompts with support for various aspect ratios.

Context
4K
Input
text · image
Output
image
Input: $5.00Output: Freeper 1M tokens
View model details
microsoft logomicrosoft

Microsoft: MAI-Voice-2-Flash

MAI-Voice-2-Flash is a low-latency text-to-speech model from Microsoft for voice agents, assistants, call centers, accessibility, narration, and other interactive applications. It generates expressive 24 kHz mono speech across 15 languages...

Context
Not provided
Input
text
Output
speech
Input: $15.00Output: Freeper 1M tokens
View model details
microsoft logomicrosoft

Microsoft: MAI-Voice-2

MAI-Voice-2 is an expressive text-to-speech model from Microsoft. It is suited for conversational assistants, media narration, accessibility, education, and other long-form voice applications. It supports 15 languages across 18 locales,...

Context
Not provided
Input
text
Output
speech
Input: $22.00Output: Freeper 1M tokens
View model details
microsoft logomicrosoft

Microsoft: MAI-Transcribe 1.5

MAI-Transcribe 1.5 is a multilingual speech-to-text model from Microsoft AI. It is suited for captions, call transcription, subtitling, accessibility, and other voice-enabled applications, with reliable transcription across 43 languages, diverse...

Context
Not provided
Input
audio
Output
transcription
Input: $360000.00Output: Freeper 1M tokens
View model details