Skip to content
FluxCDNFluxCDN
esc

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.

PlanInputOutput
Free27,32851,240
Pro26,20849,140
Max25,08847,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)