Phi 4
azure-maas
microsoft/phi-4
16K context
Context Window
16K
16,384 tokens
Max Output
4K
4,096 tokens
About this model
Microsoft Phi-4 compact model, fast and affordable
This model supports up to 16K tokens of context. It provides strong code generation and debugging capabilities.
Access it through Chuizi.AI with a single ck- API key β no separate Microsoft account needed.
Highlights
16K context window
4K max output
Strong code generation
Best For
Code generationRefactoringDebuggingDocumentation
2024-12-12
Capabilities
ChatCodetools
Aliases
phi-4Pricing (per 1M tokens)
| Pricing (per 1M tokens) | / 1M tokens |
|---|---|
| Input / 1M | $0.08 |
| Output / 1M | $0.16 |
Final prices shown
Quick Start
main.py
from openai import OpenAI client = OpenAI( base_url="https://api.chuizi.ai/v1", api_key="ck-your-key-here", ) response = client.chat.completions.create( model="microsoft/phi-4", messages=[{"role": "user", "content": "Hello!"}], ) print(response.choices[0].message.content)