RunsOnMy ModelsGPUs & MacsAPI pricesVRAM calculatorNew

Microsoft: Phi 4 API pricing

$0.07 per 1M input tokens and $0.14 per 1M output tokens on OpenRouter. Context window: 16,384 tokens.

$0.07input / 1M tokens
$0.14output / 1M tokens
16Kcontext
text->textmodality

What it costs in practice

WorkloadCost
Chatbot: 10,000 messages (1,500 in / 400 out tokens each)$1.61
RAG: 1,000 queries (8,000 in / 600 out each)$0.644
Summarize 100 long documents (50,000 in / 1,000 out each)$0.364

Cross-check against the provider's list price

No first-party entry for this model in LiteLLM's price map, so this price comes from OpenRouter only.

Price history

No price change recorded since we started tracking on Nov 17, 2026. We check every 6 hours and log every change.

Run it yourself instead

The open weights are on Hugging Face. See the VRAM phi 4 needs and which GPUs fit it →

Cheaper alternatives with similar context

Text models with at least 16K context and a lower blended price (75% input, 25% output). Price only, not a quality ranking.

ModelInput / 1MOutput / 1MContext
IBM: Granite 4.2 8B$0.06$0.15128K
Qwen: Qwen3.5-9B$0.073$0.107256K
Google: Gemma 3 12B$0.05$0.15128K
DeepSeek: DeepSeek V4 Flash 0731 (batch)$0.048$0.1441M
Meta: Llama 3.2 1B Instruct$0.027$0.20159K
OpenAI: GPT-5 Nano (batch)$0.025$0.20391K
inclusionAI: Ling 3.1 Flash$0.045$0.135977K
Cohere: Command R7B (12-2024)$0.0375$0.15125K

Source: OpenRouter listing via the public models API. Prices checked Nov 17, 2026. Model ID microsoft/phi-4, listed Jan 10, 2025. Report an error.