← All models
Input / 1M
$0.070
Output / 1M
$0.140
Context
16K tokens
Max output
15K tokens
Input
Text
Released
1y ago
Pricing
Input tokens$0.070 per 1M
Output tokens$0.140 per 1M
Provider list priceExactly what your balance is debited; our fee is charged when you buy credits
About Phi 4
Open-weight instruction model for adaptable chat and self-hosted production workloads
What it supports
- Tool calling (function calling)
- JSON mode and structured output
- Image input (vision)
- Audio input
- Extended reasoning
- Streaming responses
- OpenAI SDK, Anthropic SDK and any OpenAI-compatible client
Make a request
curl https://rapidrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $RAPIDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "microsoft/phi-4",
"messages": [{ "role": "user", "content": "Hello" }]
}'Frequently asked
How do I call Phi 4 through an OpenAI-compatible API?
Point any OpenAI-compatible client at https://rapidrouter.ai/api/v1 with a Rapid Router API key and set the model to microsoft/phi-4. The chat completions endpoint is https://rapidrouter.ai/api/v1/chat/completions.
What is the context window of Phi 4?
Phi 4 has a context window of 16,384 tokens on Rapid Router, and returns up to 14,745 output tokens per reply.
Is there a free version of Phi 4?
Yes. Call microsoft/phi-4:free and the request is paid for from Rapid Router's sponsored daily pool, within the free tier's daily request limit.
What can Phi 4 do?
On Rapid Router, Phi 4 supports JSON mode.
More Phi models
Phi 3 Medium 4K Instruct$0.140/M in · $0.140/M outPhi 4 Multimodal$0.050/M in · $0.100/M outPhi 4 Multimodal (free)Free/M in · Free/M outPhi-4-reasoning-plus$0.070/M in · $0.350/M outPhi-4-reasoning-plus (free)Free/M in · Free/M outWizardLM 2 7B$0.055/M in · $0.055/M outEvery Microsoft model, priced →