Monday, 21 September 2026 | Updating Daily AI insight, written for builders

Phi-4

Phi-4 — Specifiche

Compiled by Mustafa Ihsan from the vendor’s published documentation · Last updated

Sviluppatore Microsoft
Tipo LLM (densa)
Modalità Testo → Testo
Parametri 14B
Finestra contestuale 16K
Licenza MIT (open)
Pesi aperti
Pubblicato 2025
Prezzo dell’input $0.07 /1M
Prezzo dell’output $0.14 /1M
Provider API Azure, OpenRouter, Ollama

Esegui localmente

VRAM (4-bit) ~9 GB
GPU minima RTX 4070 12 GB / RTX 3060 12 GB

Pagina ufficiale →

What is Phi-4?

Phi-4 is Microsoft’s compact 14B reasoning model, MIT-licensed, which punches well above
its size on mathematics and logic. It needs about 9 GB of VRAM at 4-bit, running comfortably
on an RTX 4070 or RTX 3060 12GB, and costs $0.07 in / $0.14 out per million tokens
hosted.

The Phi line’s whole thesis is that curated, textbook-quality training data beats raw
scale for reasoning tasks, and Phi-4 is the clearest evidence for it — a 14B model competing
on maths and logic benchmarks with models several times larger. The cost of that focus is the
16K context window, by far the narrowest in this database and a hard limit for any workload
involving documents, long conversations or retrieval. Read it as a specialist: excellent for
structured reasoning over short inputs — maths tutoring, logic and code puzzles, deterministic
extraction from small payloads — and the wrong tool the moment your prompt grows. If you need
Phi-4’s reasoning with room to work, a 128K-context model in the same hardware bracket such
as Qwen3 14B is the better trade.

Phi-4 pricing: API cost per 1M tokens

Input (per ogni milione di token)$0.0700
Output (per ogni milione di token)$0.140
Rapporto output/input
Combinato (4:1 in:out)$0.0840 per 1 milione di token

What Phi-4 costs per month

Spesa mensile reale con un mix input-to-output 4:1 — il rapporto effettivamente prodotto da un tipico carico di lavoro basato su chat o RAG.

Carico di lavoroToken/meseCosto/mese
Progetto secondario 1 milione in ingresso / 0,25 milioni in uscita $0.11
Piccolo team 20 milioni in ingresso / 5 milioni in uscita $2.10
Produzione 200 milioni in ingresso / 50 milioni in uscita $21

Calcola i tuoi numeri personalizzati nel Calcolatore dei costi delle API per l'IA.

Cheaper alternatives to Phi-4

ModelloCosto combinato ($/1 milione)Risparmi
Mistral 7B aperta $0.0220 74% cheaper
Llama 3.1 8B aperta $0.0220 74% cheaper
Mistral NeMo 12B aperta $0.0240 il 71% più economica

Eseguirlo in autonomia o pagare l’API?

Phi-4 is open-weight, so you can run it yourself. It needs ~9 GB of VRAM at 4-bit (RTX 4070 12GB / RTX 3060 12GB). Self-hosting only beats the API once your volume is high enough to keep that hardware busy — the calcolatore self-hosting vs API calcola il punto di pareggio in base al tuo volume di token.

Domande frequenti

How much does Phi-4 cost per 1M tokens?

Phi-4 costs $0.0700 per 1M input tokens and $0.140 per 1M output tokens. At a typical 4:1 input-to-output mix that blends to about $0.0840 per 1M tokens.

How much does Phi-4 cost per month?

A small-team workload of 20M input and 5M output tokens a month costs about $2.10 on Phi-4. A side project (1M in / 0.25M out) costs roughly $0.11.

What is a cheaper alternative to Phi-4?

Mistral 7B is the strongest cheaper option in our database at $0.0220 per 1M blended — about 74% less than Phi-4. It is also open-weight, so self-hosting is an option.

Can I run Phi-4 locally?

Yes. Phi-4 is open-weight and needs about ~9 GB of VRAM at 4-bit quantisation (RTX 4070 12GB / RTX 3060 12GB).

Why does Phi-4 charge more for output than input?

Output tokens are generated one at a time and cannot be batched the way a prompt can, so they cost the provider more to serve. Phi-4 charges 2× more for output, which is why prompt-heavy workloads are far cheaper to run than generation-heavy ones.

I prezzi indicati sono le tariffe ufficiali pubblicate per l'API principale del modello e vengono aggiornati man mano che i fornitori li modificano. Sconti per volumi elevati, elaborazione batch e input memorizzati nella cache non sono inclusi. Confronta tutti i modelli fianco a fianco nel Database di modelli IA o il Classifica LLM.

Compare Phi-4 head-to-head

Scroll to Top