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
Chalk Labs
Need help deploying Phi 4?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
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
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get Phi 4 running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
Phi 4: price, context window, tool use. Agent Mart. https://agentmart.dev/models/microsoft-phi-4 (last updated 2026-10-26)