أسعار OpenAI Codex: التكلفة الحقيقية لـ CLI في 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.
كم تبلغ تكلفة 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.
لا توجد رسوم اشتراك على CLI نفسه. تدفع فقط مقابل رموز API المستهلَكة خلال كل جلسة برمجة.
يكلف إدخال codex-mini-latest $1.50/مليون رمز، والإخراج $6.00/مليون رمز عبر واجهة برمجة تطبيقات OpenAI.
تقدم RunAPI النموذج نفسه بخصم 50%. اضبط متغيري بيئة ويتوجه Codex عبر RunAPI تلقائيًا.
ادفع فقط مقابل ما تستخدمه. لا رسوم اشتراك شهري. لا حد أدنى للإنفاق. تتوقف الفواتير فور توقفك عن البرمجة.
ما الذي يُحتسب كرمز؟
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.
أسعار codex-mini-latest: OpenAI مقابل RunAPI
الأسعار بالدولار الأمريكي لكل مليون رمز. أسعار RunAPI تعادل 50% من أسعار OpenAI الرسمية.
ما تكلفة الشهر النموذجي؟
مستنَد إلى codex-mini-latest بسعر $1.50/$6.00 (OpenAI) و$0.75/$3.00 (RunAPI) لكل مليون رمز.
كيفية استخدام Codex CLI مع RunAPI
تثبيت Codex CLI
إنشاء حساب RunAPI
ضبط متغيرات البيئة
تشغيل Codex
التحقق من النموذج
أسئلة شائعة حول أسعار Codex
استكشف المزيد
اضبط متغيرَي بيئة اثنين وستعمل كل جلسة Codex عبر RunAPI بخصم 50% من أسعار OpenAI. بلا اشتراك، ولا حد أدنى للإنفاق — تدفع فقط مقابل الرموز المستخدَمة.