Choose Microsoft: Phi 4 if…
- cost matters at scale — it is 33% cheaper on a typical 3:1 input/output mix ($8.05 vs $11.63 a month for 50,000 support chats)
Neither wins outright: Microsoft: Phi 4 is the pick when cost matters at scale, OpenAI: gpt-oss-safeguard-20b when you need to fit long inputs in one request.
| Spec | Microsoft: Phi 4 | OpenAI: gpt-oss-safeguard-20b |
|---|---|---|
| Provider | Microsoft | OpenAI |
| Input price (per 1M tokens) | $0.07 | $0.07 |
| Output price (per 1M tokens) | $0.14 | $0.30 |
| Blended price (3:1 input/output) | $0.09 | $0.13 |
| Cheaper than … of all models we track | 82% | 76% |
| Context window | 16K tokens (~25 pages) | 131K tokens (~197 pages) |
| Larger context than … of all models | 4% | 22% |
| Max output per response | 15K tokens (~11,100 words) | 66K tokens (~49,200 words) |
| Input types | text | text |
| Output types | text | text |
| Free variant | No | No |
| Listed since | 2025-01-10 | 2025-10-29 |
Monthly cost at list price for five common workloads. Token counts per unit are stated so you can scale them to your own traffic. A workload that does not fit a model's context window is marked rather than priced.
| Workload (per month) | Microsoft: Phi 4 | OpenAI: gpt-oss-safeguard-20b | Difference |
|---|---|---|---|
| Customer-support chatbot 50,000 conversations — each a 6-turn conversation (1,500 in / 400 out tokens) | $8.05 | $11.63 | Microsoft: Phi 4 saves $3.57 |
| RAG search over documents 20,000 questions — each a question answered from ~8 retrieved passages (6,000 in / 500 out tokens) | $9.80 | $12.00 | Microsoft: Phi 4 saves $2.20 |
| Coding / tool-using agent 2,000 tasks — each a multi-step task with tool calls and file context (60,000 in / 6,000 out tokens) | Doesn't fit context | $12.60 | — |
| Batch summarisation 10,000 documents — each a 6,000-word report summarised to a page (8,000 in / 600 out tokens) | $6.44 | $7.80 | Microsoft: Phi 4 saves $1.36 |
| Long-document analysis 500 documents — each a 150-page contract or codebase read in one pass (100,000 in / 2,000 out tokens) | Doesn't fit context | $4.05 | — |
| Capability | Microsoft: Phi 4 | OpenAI: gpt-oss-safeguard-20b | What it lets you do |
|---|---|---|---|
| Tool / function calling | — | ✓ Yes | call your APIs and run agent loops |
| Structured output (JSON schema) | ✓ Yes | ✓ Yes | return JSON that validates against your schema |
| Reasoning / thinking mode | — | ✓ Yes | spend extra tokens thinking before answering hard problems |
| Image input | — | — | read screenshots, charts and scanned pages |
| Audio input | — | — | take speech or audio directly |
| File / PDF input | — | — | accept documents without your own parsing step |
| Image output | — | — | generate images, not just text |
| Built-in web search | — | — | answer from live web results |
| Seed (reproducible sampling) | ✓ Yes | ✓ Yes | repeat a generation for tests and evals |
| Log-probabilities | — | — | read token confidence for classification and scoring |
From each model's published parameters and input/output types. “—” means not advertised, not proven absent.
| Date | Model | Input / 1M | Output / 1M |
|---|---|---|---|
| 2026-08-06 | Microsoft: Phi 4 | $0.07 | $0.14 |
| 2026-03-31 | Microsoft: Phi 4 | $0.07 | $0.14 |
Neither wins outright: Microsoft: Phi 4 is the pick when cost matters at scale, OpenAI: gpt-oss-safeguard-20b when you need to fit long inputs in one request. In short: Microsoft: Phi 4 when cost matters at scale; OpenAI: gpt-oss-safeguard-20b when you need to fit long inputs in one request, you need tool / function calling, you need reasoning / thinking mode, you generate long outputs in one go, you want the newer model.
Microsoft: Phi 4 is cheaper: $0.09 vs $0.13 per 1M tokens at a typical 3:1 input/output mix, 33% less. For 50,000 support conversations a month that is $8.05 against $11.63.
Microsoft: Phi 4 costs $0.07 per 1M input tokens and $0.14 per 1M output tokens; OpenAI: gpt-oss-safeguard-20b costs $0.07 input and $0.30 output. Output tokens are billed separately, so long answers shift the gap.
OpenAI: gpt-oss-safeguard-20b: 131K tokens, about 197 pages, against 16K (about 25 pages) for Microsoft: Phi 4.
Tool calling — Microsoft: Phi 4: not advertised, OpenAI: gpt-oss-safeguard-20b: yes. JSON-schema structured output — Microsoft: Phi 4: yes, OpenAI: gpt-oss-safeguard-20b: yes.
Neither accepts image input — both are text-in models.
No free variant is listed for either; both are pay-per-token.
Microsoft: Phi 4 can write up to 15K tokens (about 11,100 words) per response; OpenAI: gpt-oss-safeguard-20b up to 66K (about 49,200 words).
Microsoft: Phi 4 was listed on 2025-01-10; OpenAI: gpt-oss-safeguard-20b on 2025-10-29.
Microsoft: Phi 4: input price raised 7% ($0.07 → $0.07/1M) on 2026-08-06 (2 price changes since 2026-03-10). OpenAI: gpt-oss-safeguard-20b: price unchanged since we started tracking it on 2026-03-10.
[Microsoft Research](/microsoft) 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. At 14 billion...
Full Microsoft: Phi 4 specs →gpt-oss-safeguard-20b is a safety reasoning model from OpenAI built upon gpt-oss-20b. This open-weight, 21B-parameter Mixture-of-Experts (MoE) model offers lower latency for safety tasks like content classification, LLM filtering, and trust...
Full OpenAI: gpt-oss-safeguard-20b specs →