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…
Model by Microsoft
Install
Pick your client. Read the repository before you give any tool access to your data.
{
"model": "microsoft/phi-4",
"baseURL": "https://openrouter.ai/api/v1"
}OpenAI-compatible API: point any OpenAI SDK at the base URL and use this model id.
Settings it needs
OPENROUTER_API_KEYrequiredsecret
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: model-inference
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Price and limits
| Variant | Input $/M tokens | Output $/M tokens | Cached input $/M |
|---|---|---|---|
| Standard | $0.07 | $0.14 | — |
Price as of Oct 26, 2026 from OpenRouter. Prices change often; check before you rely on one.
- Provider
- Microsoft
- Model id
microsoft/phi-4- Context window
- 16,384 tokens (16K)
- Max output
- 14,745 tokens
- Input
- text
- Output
- text
- Tool calling
- Not listed
- Structured outputs
- Yes
- Reasoning
- No
- Weights
- Open: microsoft/phi-4
- Released
- Jan 10, 2025
- Knowledge cutoff
- 2024-06-30
Details
- Auth
- API key
- License
- License unknown
- First seen
- Oct 24, 2026
- Last checked
- Oct 26, 2026
- Source
- OpenRouter
More from Microsoft
- 0.643score
azure-prepare
MicrosoftOfficial
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd)…
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
azure-kubernetes
MicrosoftOfficial
Plan, create, and configure production-ready Azure Kubernetes Service (AKS) clusters.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
appinsights-instrumentation
MicrosoftOfficial
Guidance for instrumenting webapps with Azure Application Insights.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
azure-app-onboard
MicrosoftOfficial
End-to-end orchestrator: from a business idea, app idea, or existing app to running Azure deployment with cost estimates and pre-deploy approval.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
azure-compliance
MicrosoftOfficial
Run Azure compliance and security audits with azqr plus Key Vault expiration checks.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
foundry-iq
MicrosoftOfficial
Foundry IQ knowledge bases.
SkillAFreshness: A★ 3.1KClaude Code +9
Cite this page
Phi 4: price, context window, tool use. Agent Mart. https://agentmart.dev/models/microsoft-phi-4 (last updated 2026-10-26)