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
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 |
| GPT-5.2 | 30.4 | — | $2.43 | $19.47 |
| GPT-5.2 Chat | — | 400K | $1.93 | $15.40 |
| GPT-5.2 Chat Latest | — | 400K | $1.84 | $14.70 |
Prices are Api.Airforce pay-as-you-go rates per 1M tokens. Context is the maximum input length.
Related models
GPT-5.2OpenAI · $2.43 / 1MGPT-5.2 ChatOpenAI · $1.93 / 1MGPT-5.2 Chat LatestOpenAI · $1.84 / 1MGPT-5.2 CodexOpenAI · $1.84 / 1MGPT-5.2 ProOpenAI · $22.05 / 1MGPT-5.3 ChatOpenAI · $4.65 / 1MGPT-5.3 Chat LatestOpenAI · $1.84 / 1MGPT-5.3 CodexOpenAI · $1.40 / 1MGPT-5.3 Codex SparkOpenAI · $0.96 / 1MGPT-5.3 Codex XhighOpenAI · $1.75 / 1MGPT-5.4OpenAI · $1.25 / 1MGPT-5.4 High OpenAI CompactOpenAI · $1.30 / 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);