MicrosoftPaidOperational
Phi 4
API model name: phi-4
Phi 4 is Microsoft's chat model, served on the Api.Airforce unified API. It is priced at $0.08 per million input tokens and $0.16 per million output tokens. That is below the provider's $0.07 official input rate. Access it through the OpenAI-compatible API with one key, alongside 100+ other models on Api.Airforce.
Pricing
Api.Airforce price vs. the provider's official rate.
Specifications
- Provider
- Microsoft
- Type
- chat model
Benchmarks
Independent evaluations and measured speed from Artificial Analysis.
MMLU-Pro71%
GPQA Diamond57%
Humanity's Last Exam4%
LiveCodeBench23%
AIME 202518%
MATH-50081%
Output speed43.2 tok/s
Time to first token0.91 s
Phi-4
Source: Benchmark data by Artificial Analysis (artificialanalysis.ai)
What is Phi 4 used for?
- Chatbots & assistants — conversational AI, drafting, summarizing and Q&A.
Phi 4 vs. similar models
| Model | Intelligence | Context | Input / 1M | Output / 1M |
|---|---|---|---|---|
| Phi 4 | — | — | $0.08 | $0.16 |
| o3 Deep Research | — | — | $10.50 | $42.00 |
| o3 Mini | — | — | $1.16 | $4.62 |
| o3 Mini | — | 200K | $0.95 | $3.79 |
Prices are Api.Airforce pay-as-you-go rates per 1M tokens. Context is the maximum input length.
Related models
o3 Deep ResearchOpenAI · $10.50 / 1Mo3 MiniOpenAI · $1.16 / 1Mo3 MiniOpenAI · $0.95 / 1Mo3 ProOpenAI · $15.11 / 1Mo4OpenAI · $2.91 / 1Mo4 MiniOpenAI · $0.87 / 1Mo4 Mini Deep ResearchOpenAI · $2.10 / 1MOmni FastMiniMaxOmni Fast V2vMiniMaxOpen Mistral NemoMistral AI · FreeOpen Mistral NemoMistral AI · FreePalmyra X5Writer · $0.66 / 1M
Phi 4 — frequently asked questions
- How much does Phi 4 cost?
- Phi 4 is billed pay-as-you-go at $0.08 per 1M input tokens and $0.16 per 1M output tokens. There is no subscription — you only pay for what you use.
- What can Phi 4 do?
- Phi 4 is Microsoft's chat model, accessible through the Api.Airforce API.
- Is Phi 4 free to use?
- Phi 4 is a paid, pay-as-you-go model — no subscription, you are only charged for usage.
- How do I use Phi 4 via the API?
- Phi 4 is OpenAI-compatible. Point any OpenAI SDK at https://api.airforce/v1 and pass the model ID phi-4 with your Api.Airforce API key.
- Who makes Phi 4?
- Phi 4 is Microsoft's chat model, served through the unified Api.Airforce gateway alongside 100+ other models.
Loading live metrics…
Loading live metrics…
Loading live metrics…
Use Phi 4 via the API
OpenAI-compatible — point any OpenAI SDK at https://api.airforce/v1 and pass phi-4 as the model.
cURL
curl https://api.airforce/v1/chat/completions \
-H "Authorization: Bearer $AIRFORCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "phi-4",
"messages": [{ "role": "user", "content": "Hello!" }]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.airforce/v1", api_key="$AIRFORCE_API_KEY")
r = client.chat.completions.create(
model="phi-4",
messages=[{"role": "user", "content": "Hello!"}],
)
print(r.choices[0].message.content)JavaScript
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.airforce/v1", apiKey: process.env.AIRFORCE_API_KEY });
const r = await client.chat.completions.create({
model: "phi-4",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(r.choices[0].message.content);