Microsoft (Phi)
Phi 4
phi-4Context
16K
Input / 1M tokens
$0.0560
Output / 1M tokens
$0.1120
Cached input / 1M tokens
— (bills at input price)
Cache write / 1M tokens
— (bills at input price)
Prices checked 2026-10-31 11:51 UTC
About this model
Phi 4
Phi 4 is a model by Microsoft (Phi), available through the Anoman AI OpenAI-compatible API with a 16K-token context window. It costs $0.0560 per 1M input tokens and $0.1120 per 1M output tokens, and is available from the Plus Pass plan.
Key facts
- Maker
- Microsoft (Phi)
- Context window
- 16K tokens
- Max output
- 15K tokens
- Lane
- Guarded: the provider has confirmed it does not train on your data
- Modality
- Text
- Input price
- $0.0560 per 1M tokens
- Output price
- $0.1120 per 1M tokens
- Processing region(s)
- global
- Route
- Via OpenRouter
- Quantization
- Served at bf16
- Cheapest plan
- Available from the Plus Pass plan
Ways to call
Ways to call Phi 4
Each model ID below is callable through the Anoman AI API. Price and processing region depend on the route.
| Model ID | Route | Input / output per 1M tokens | Region(s) | Lane | Context |
|---|---|---|---|---|---|
| phi-4 | Via OpenRouter | $0.0560 / $0.1120 | global | Guarded | 16K |
| openrouter/phi-4 | Via OpenRouter | $0.0700 / $0.1400 | us | Guarded | 16K |
Code example
Chat completion with Phi 4
from openai import OpenAI
client = OpenAI(
base_url="https://api.anoman.io/v1",
api_key="anm-sk-..."
)
response = client.chat.completions.create(
model="phi-4",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)Alternatives
Similar models in our catalog
Same maker first, then the closest price to Phi 4 in the Anoman catalog.