Models›Microsoft›Phi 4

Phi 4

by Microsoft · released Jan 10, 2025 · 1 provider
Model IDmicrosoft/phi-4
Free plan eligibleStructured outputsOpen weights · MIT

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.

Cheap mode · 20% off ↓
SAME MODEL · COMPARE API ROUTES

Cheap mode · 20% off

Fast mode prioritizes response speed. Cheap mode uses lower-cost capacity and may be a little slower. Both run Phi 4.

Per 1M tokens, including your 5% fee. Your selection carries into the playground and API example.

Per 1 million tokensFast modeCheap modeYou save
Input$0.0735$0.058820.0%
Output$0.147$0.117620.0%
ILLUSTRATIVE USAGE · TOKEN CHARGESAggregate usage across calls, not a single request.
$0.2205 → $0.1764Save $0.0441 · 20.0%

All displayed prices include the 5% Free-plan fee. Standard rates are OpenRouter’s published routing ceilings; the actual standard bill may be lower. Cheapest quote: DeepInfra. Savings compare uncached token rates; other provider charges and your usage mix can change the total. Availability is not guaranteed.

Quote checked 11/8/2026, 8:18:04 PM UTC.

Context
16k
tokens
Max output
15k
tokens per reply
Input
$0.07
provider baseline / 1M; fee applies
Output
$0.14
provider baseline / 1M; fee applies

Choose how to use Phi 4

Playground

Try prompts in your browser, create an agent, and see the cost of each reply. Your selected model carries into setup.

Model capabilities below describe the underlying model. Available playground features depend on its provider.

API

Connect your app with a Gizmo API key. Choose fastest or cheapest, stream text responses, and inspect timing, tokens, and charges in request logs.

A current API route is listed for this exact model. Gateway configuration is required for live calls.

Provider price + a transparent platform fee

RateProvider baselineFree plan · 5% feePaid plan · 4% fee
Input / 1M tokens$0.07$0.0735$0.0728
Output / 1M tokens$0.14$0.147$0.1456
API input / 1M tokens$0.07$0.0735$0.0728
API output / 1M tokens$0.14$0.147$0.1456

Legacy chat image rates use the catalog baseline. The dedicated image playground shows separate estimates and settles the provider’s metered usage. API rates are current routing ceilings; final API charges use provider-reported cost plus your fee. Cheapest routing compares eligible OpenRouter and Cheaper Inference rates for the same model; savings are not guaranteed. Cached input or other provider charges may differ. Compare all model rates and verified discounts →

How your plan pays for usage

API and playground share one included allowance. Usage including the fee draws from that allowance first, then your prepaid credits. Plans bill monthly; included usage resets weekly: Free $1, Starter $5, Growth $25, Scale $50.

A $1 provider charge becomes $1.05 on Free or $1.04 on a paid plan before included usage is applied. Plan eligibility still applies in the playground.

Free models and limits

Zero-cost models stay $0, including the fee, and do not consume your dollar allowance. Free accounts can make 1,000 free-model API requests per calendar month, resetting in UTC. Admitted requests count even if the provider fails.

Free includes 20 API requests/minute and 6 playground messages/minute. Paid plans raise these limits. See plan limits.

Before a text API request, Gizmo temporarily reserves included usage and, if necessary, prepaid credit for the model’s full context plus your maximum output. Image jobs reserve twice their displayed estimate. Unused funds return after metering. This hold can exceed the final charge; unconfirmed usage remains marked pending.

Overview

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.

At 14 billion parameters, it was trained on a mix of high-quality synthetic datasets, data from curated websites, and academic materials. It has undergone careful improvement to follow instructions accurately and maintain strong safety standards. It works best with English language inputs.

For more information, please see Phi-4 Technical Report(opens in new tab)

Benchmarks

Model Quality from the model card

CategoryBenchmarkphi-4 (14B)phi-3 (14B)Qwen 2.5 (14B instruct)GPT-4o-miniLlama-3.3 (70B instruct)Qwen 2.5 (72B instruct)
Popular Aggregated BenchmarkMMLU84.877.979.981.886.385.3
ScienceGPQA56.131.242.940.949.149.0
MathMGSM MATH80.6 80.453.5 44.679.6 75.686.5 73.089.1 66.3*87.3 80.0
Code GenerationHumanEval82.667.872.186.278.9*80.4
Factual KnowledgeSimpleQA3.07.65.49.920.910.2
ReasoningDROP75.568.385.579.390.276.7

Capabilities

Input
✍️ Text
Output
✍️ Text
✓ Structured outputs✓ JSON mode✓ Seeded sampling✓ Stop sequences✓ Logit bias

Sampling controls: temperature, top_p, top_k, min_p, max_tokens, frequency_penalty, presence_penalty, repetition_penalty.

Pricing on Gizmo

These are provider baseline rates before Gizmo’s 5% Free-plan or 4% paid-plan fee. Your included usage covers charges first; overage uses prepaid credits. See the fee-inclusive comparison above.

Provider baseline rates

Input
$0.07 / 1M
Output
$0.14 / 1M

Examples before the platform fee

Typical chat turn
$0.00021 2k in · 500 out
$1 of input
≈ 14.29M tokens
$1 of output
≈ 7.14M tokens
Full context, once
$0.0011
Free plan eligible. This model sits at or below the free tier’s price ceiling: $1 of usage covered every week, no card needed. Paid plans cover $5 to $50 weekly and add $25 in bonus credits.

Providers and pricing

2 ways to run Phi 4 on Gizmo, cheapest first. Requests follow your routing choice and fall back down this list if a provider fails.

ProviderRouteInput / 1MOutput / 1MContextUptime 24h
DeepInfra · bf16Lowest priceFlex tier: slower, discountedOpenRouter$0.056$0.1116k100%
DeepInfra · bf16OpenRouter$0.07$0.1416k100%

Rates are each provider’s, per million tokens, before Gizmo’s 5% (Free) or 4% (paid) fee. “Cheapest” routing starts at the top of this list; “Fastest” starts with the model’s maker.

Run Phi 4 in under a minute

1

Create your account

Sign up with just an email. Start on the free tier with no card, or pick a paid plan for a bigger weekly allowance and $25 in bonus credits.

2

Your agent is ready

Phi 4 is preselected as the brain of your first agent. Give it a name and a system prompt, or keep the defaults.

3

Chat, research, create

Live web research and image generation are built in. Every reply shows what it cost, and you can switch models anytime.

Sources. OpenRouter · Hugging Face · Microsoft documentation. Verified Sep 9, 2026. Baseline prices are the provider’s list prices at sync time. Gizmo adds a 5% fee on Free or 4% on paid plans; included usage is applied before overage credits.