Prezzi di OpenAI Codex: Quanto costa davvero la CLI nel 2026
OpenAI Codex CLI is a free, open-source tool — but it sends every prompt to the OpenAI API, which charges per token. One image compression task burned 7,675 tokens: between 3 and 11 cents. The default model, codex-mini-latest, costs $1.50 per million input tokens and $6.00 per million output tokens. Pointing Codex at RunAPI instead cuts those rates by 50%, with no other changes to your workflow.
Quanto costa OpenAI Codex?
The Codex CLI itself is free to download and run. The cost comes from API calls: every prompt, file read, and code generation goes to the OpenAI API. The default model is codex-mini-latest, priced at $1.50/1M input tokens and $6.00/1M output tokens through OpenAI directly. A moderate coding session — roughly 8M input and 2M output tokens per month — runs about $24 with OpenAI. The same usage through RunAPI costs $12. RunAPI is OpenAI-compatible, so you change two environment variables and nothing else. Tip: run /compact during long sessions to free up context and stop burning tokens on conversation history.
La CLI stessa non ha quota di abbonamento. Paghi solo per i token API consumati durante ogni sessione di codifica.
L'input di codex-mini-latest costa $1.50/1M token, l'output costa $6.00/1M token tramite l'API OpenAI.
RunAPI fornisce lo stesso modello al 50% di sconto. Imposta due variabili d'ambiente e Codex instrada automaticamente attraverso RunAPI.
Paga solo per quello che usi. Nessuna quota mensile per posto. Nessuna spesa minima. Le fatture si fermano nel momento in cui smetti di programmare.
Cosa viene contato come token?
Every message Codex sends to the API includes your prompt, the full context of files it has read, any tool results, and conversation history. That combined input is tokenized (roughly 750 words per 1,000 tokens). The model's response — edited code, explanations, next steps — counts as output tokens. Both directions are billed separately. Codex caches nothing between sessions, so a fresh session re-reads the same files and bills that context again. One real example from a developer testing image compression — a single 5 MB file task burned 7,675 tokens, or roughly 3 to 11 cents. Not very cheap for one file, but most coding sessions stay well under a dollar each.
Prezzi codex-mini-latest: OpenAI vs RunAPI
Prezzi in USD per milione di token. Le tariffe RunAPI sono il 50% dei prezzi di listino OpenAI.
Quanto costa un mese tipico?
Basato su codex-mini-latest a $1.50/$6.00 (OpenAI) e $0.75/$3.00 (RunAPI) per 1M di token.
Come usare Codex CLI con RunAPI
Installa Codex CLI
Crea un account RunAPI
Imposta le variabili d'ambiente
Esegui Codex
Verifica il modello
Domande comuni sui prezzi di Codex
Esplora altro
Prezzi API OpenAI
Gamma completa OpenAI — GPT-5.4, o3 e altro al 50% di sconto.
Prezzi Claude Code
Confronto costi Claude Code: fatturazione API vs abbonamento Max.
Claude Code vs Cursor
Confronto funzionalità e costi dei due principali strumenti AI per il coding.
RunAPI CLI
Esegui qualsiasi modello dal tuo terminale con un singolo comando.
Imposta due variabili d'ambiente e ogni sessione Codex viene eseguita attraverso RunAPI al 50% delle tariffe OpenAI. Nessun abbonamento, nessuna spesa minima — paghi solo per i token utilizzati.