Phi-4 API pricing

3 providers serve Phi-4. Phi-4 is an open-weight model (MIT) with 14.7B total parameters, up to 16K context. Prices below are per 1M tokens, cheapest input first (self-hosting math further down).

Refreshed 2026-08-23 · list prices from provider APIs
Input floor $0.070/1M at DeepInfra and OpenRouter Output floor $0.140/1M at DeepInfra and OpenRouter Find your workload winner →
Provider Input $/1M Output $/1M Cache read $/1M Context
DeepInfra $0.070 $0.140output floor - 16K Use
OpenRouter marketplace quote $0.070 $0.140 - 16K Use
Azure AI Foundry $0.125 $0.500 - 16K Use

The cheapest way to run Phi-4

On an illustrative 70M-input / 30M-output monthly workload, today's lowest listed cost is roughly $9.10/month — the same at DeepInfra and OpenRouter. Input-heavy, output-heavy and cache-heavy workloads can produce different winners. Use the live mix calculator below rather than combining floors from two different providers. On output-token cost alone, a busy self-hosted deployment can work out cheaper (~$0.027/1M output on V100). See the math below. Run your own numbers in the breakeven calculator, or read the breakeven math.

Your actual monthly cost

Uses today's list prices

Cache read uses the listed cache rate where available; otherwise it falls back to normal input price. Batch, write-cache, volume and negotiated discounts are excluded.

Or run it yourself: Phi-4 self-hosting economics

Phi-4 is open-weight (MIT), so the API price above competes with the GPU-hour market. 14.7B total parameters needs roughly 21 GB VRAM at FP8 or 11 GB at INT4, KV-cache headroom included.

GPU that fits (FP8, single card)VRAMFrom $/hrCheapest at
V100 32 GB $0.022marketplace Vast.ai Rent
RTX 3090 24 GB $0.068marketplace Vast.ai Rent
RTX 4090 24 GB $0.134marketplace Vast.ai Rent
RTX A5000 24 GB $0.160community RunPod Rent
A10 24 GB $0.241marketplace Vast.ai Rent
A6000 48 GB $0.287marketplace Vast.ai Rent
Breakeven estimate: a well-batched vLLM deployment on one V100 ($0.022/hr) at ~459 aggregate tok/s and 50% utilization works out to roughly $0.027 per 1M output tokens, versus $0.140 via the cheapest output-token API (DeepInfra and OpenRouter). Self-hosting wins on cost if you can keep the GPU busy. Planning estimate: throughput varies with hardware, quantization, batch size and context. Tune it in the calculator.

FAQ

What is the cheapest API for Phi-4?

As of 2026-08-23, the lowest input price for Phi-4, $0.070 per 1M tokens, is the same list price at DeepInfra and OpenRouter. The lowest output price, $0.140 per 1M tokens, is likewise shared by the same providers. The cheapest provider for a real workload depends on its input/output mix. The next-lowest input price is Azure AI Foundry at $0.125, a 79% difference.

How much VRAM do you need to self-host Phi-4?

Phi-4 has 14.7B parameters, so plan for roughly 21 GB of VRAM at FP8 or 11 GB at INT4/AWQ, KV-cache headroom included. A single V100 (32 GB) fits it.

← All models · GPU rental prices · Breakeven calculator · Get this data as JSON