LLM API pricing
Phi-4 API pricing: cheapest provider
2 providers sell Phi-4. DeepInfra is cheapest; the most expensive charges 2.5× as much for the same model.
- Cheapest$0.0875per 1M · DeepInfra
- Input · output$0.07 / $0.14per 1M tokens
- Price gap2.5×across 2 providers
- Accuracy56.1%GPQA
- Context16Kmax tokens
Standard list prices in USD from each provider's pricing page · last price change Sep 28, 2026 · How we collect and rank prices
Ranked for your volume
Phi-4 monthly cost by provider
Change the monthly tokens and the ranking updates instantly, using each provider's standard list price.
More requirements: caching, context, features, provider
| Provider | Estimated / month | Input / 1M | Output / 1M | Context |
|---|---|---|---|---|
1 DeepInfraInference provider - lowest for your volumePricing page | $0.98 | $0.07 | $0.14 | 16,384 |
2 Microsoft Azure AI FoundryCloud platformPricing page | $2.25 | $0.125 | $0.50 | 16,384 |
Order depends on listed price for your volume only. No provider pays for its position.
Input volume includes the cached share, not an additional token volume. This is a list-price estimate, not a quote: cache-write charges, cache eligibility/TTL, batch discounts, long-context surcharges, regional pricing and taxes are excluded. Check the provider's terms for your workload before switching.
Accuracy: GPQA Diamond (graduate-level science questions) measured by Epoch AI (CC BY 4.0) on phi-4, run Jan 31, 2025. The model is the same at every provider, though quantized deployments can score lower.
Price history
The cheapest price has not changed since tracking started on Sep 28, 2026: $0.0875 per 1M tokens at DeepInfra. All price changes
Switch to the cheapest provider
Already using the OpenAI SDK? Change the base URL, key and model name:
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.deepinfra.com/v1/openai",
api_key=os.environ["DEEPINFRA_API_KEY"],
)
response = client.chat.completions.create(
model="microsoft/phi-4",
messages=[{"role": "user", "content": "Hello"}],
)Compare Phi-4 with another model
Or pick any model