Microsoft: Phi 4
Microsoft Research 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.
- Input
- 27,328 Toman/M tokens
- Output
- 51,240 Toman/M tokens
- Context
- 16K
- Max output
- 15K
- Published
- Jan 10, 2025
- Maker
- Microsoft
Free plan prices, in Toman at today's rate. Plans and prices
Price by plan
Toman per million tokens at today's rate. A plan lowers the price of your usage up to a limit each period.
| Plan | Input | Output |
|---|---|---|
| Free | 27,328 | 51,240 |
| Pro | 26,208 | 49,140 |
| Max | 25,088 | 47,040 |
Capabilities
- Text
- JSON
What it takes and gives
Accepts
- Text
Creates
- Text
Call it
Pass microsoft/phi-4 as the model name, or let router/auto choose for you.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://ai.fluxcdn.cloud/api/v1",
api_key=os.environ["FLUXCDN_API_KEY"],
)
resp = client.chat.completions.create(
model="router/auto",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
