Back to All Models
Microsoft · Instant

Phi 4

microsoft/phi-4
Use Model Now

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 respo...

Input Price / 1M Tokens
$0.11
Output Price / 1M Tokens
$0.22
Context Window
16K
Chat
Python Example — microsoft/phi-4
from openai import OpenAI

client = OpenAI(
    base_url="https://relaystack-ai.vercel.app/v1",
    api_key="sk-rs-your-key-here",
)

response = client.chat.completions.create(
    model="microsoft/phi-4",
    messages=[{"role": "user", "content": "Hello from RelayStack!"}],
)
print(response.choices[0].message.content)