{"id":755,"date":"2026-02-12T10:23:39","date_gmt":"2026-02-12T10:23:39","guid":{"rendered":"https:\/\/aiopsschool.com\/blog\/?p=755"},"modified":"2026-02-12T10:23:40","modified_gmt":"2026-02-12T10:23:40","slug":"codex-quota-exceeded-check-your-plan-and-billing-details","status":"publish","type":"post","link":"https:\/\/aiopsschool.com\/blog\/codex-quota-exceeded-check-your-plan-and-billing-details\/","title":{"rendered":"Codex: Quota exceeded. Check your plan and billing details"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">1) Why you get \u201cQuota exceeded\u201d even with 1000 Codex credits<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Codex has <strong>two sign-in modes<\/strong><\/h3>\n\n\n\n<p>Codex supports:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Sign in with ChatGPT<\/strong> \u2192 uses your <strong>ChatGPT\/Codex plan limits + credits<\/strong><\/li>\n\n\n\n<li><strong>Sign in with API key<\/strong> \u2192 uses <strong>OpenAI Platform (API) billing<\/strong> at standard API rates (<a href=\"https:\/\/developers.openai.com\/codex\/auth\/\">OpenAI Developers<\/a>)<\/li>\n<\/ul>\n\n\n\n<p>So if your CLI is currently authenticated with an <strong>API key<\/strong>, Codex is trying to charge your <strong>Platform API account<\/strong>, not your Codex credits. (<a href=\"https:\/\/developers.openai.com\/codex\/auth\/\">OpenAI Developers<\/a>)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Your 1000 credits are \u201cFlexible usage credits\u201d (Codex + Sora), not API credits<\/h3>\n\n\n\n<p>Credits are a <strong>pay-as-you-go add-on for Codex &amp; Sora<\/strong> when you exceed plan limits. They are <strong>not<\/strong> the same thing as Platform API billing. (<a href=\"https:\/\/help.openai.com\/en\/articles\/12642688-using-credits-for-flexible-usage-in-chatgpt-freegopluspro-sora\">OpenAI Help Center<\/a>)<\/p>\n\n\n\n<p>That\u2019s also why your <strong>Platform usage can stay at $0<\/strong>: if the API request is blocked due to quota\/billing, it may fail before any billable usage is recorded.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2) Fix: make Codex CLI actually use your Codex credits<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step A \u2014 Check what auth mode your CLI is using<\/h3>\n\n\n\n<p>Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>codex login status\n<\/code><\/pre>\n\n\n\n<p>This prints the <strong>active authentication mode<\/strong>. (<a href=\"https:\/\/developers.openai.com\/codex\/cli\/reference\/\">OpenAI Developers<\/a>)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step B \u2014 If it\u2019s using API key mode, wipe credentials and re-login with ChatGPT<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>codex logout\ncodex login\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>codex logout<\/code> removes saved credentials (both API key and ChatGPT auth). (<a href=\"https:\/\/developers.openai.com\/codex\/cli\/reference\/\">OpenAI Developers<\/a>)<\/li>\n\n\n\n<li><code>codex login<\/code> (without flags) starts the <strong>ChatGPT OAuth login<\/strong> by default. (<a href=\"https:\/\/developers.openai.com\/codex\/cli\/reference\/\">OpenAI Developers<\/a>)<\/li>\n<\/ul>\n\n\n\n<p>If you\u2019re on a headless\/remote machine:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>codex login --device-auth\n<\/code><\/pre>\n\n\n\n<p>(<a href=\"https:\/\/developers.openai.com\/codex\/auth\/\">OpenAI Developers<\/a>)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step C \u2014 Make sure you\u2019re not forcing API-key auth accidentally<\/h3>\n\n\n\n<p>Check and remove any API-key forcing:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Environment variable in your shell:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>echo $OPENAI_API_KEY\n<\/code><\/pre>\n\n\n\n<p>If it prints something, unset it (for this terminal):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>unset OPENAI_API_KEY\n<\/code><\/pre>\n\n\n\n<p>Also note Codex caches login locally (often at <code>~\/.codex\/auth.json<\/code> or keychain). (<a href=\"https:\/\/developers.openai.com\/codex\/auth\/\">OpenAI Developers<\/a>)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step D \u2014 Confirm inside Codex<\/h3>\n\n\n\n<p>In a running Codex session, use:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>\/status<\/code> to view remaining limits during the session (<a href=\"https:\/\/developers.openai.com\/codex\/pricing\/\">OpenAI Developers<\/a>)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3) If you <em>want<\/em> to use API keys (Platform billing), here\u2019s what \u201cQuota exceeded\u201d usually means<\/h2>\n\n\n\n<p>If you authenticate with an API key, you must have <strong>Platform billing enabled<\/strong> (payment method\/credits\/spend limit &gt; 0). Codex pricing explicitly says API-key usage is <strong>usage-based<\/strong> and charged at <strong>standard API rates<\/strong>. (<a href=\"https:\/\/developers.openai.com\/codex\/pricing\/\">OpenAI Developers<\/a>)<\/p>\n\n\n\n<p>So the fix is on the Platform side:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add a payment method \/ enable pay-as-you-go<\/li>\n\n\n\n<li>Ensure the <strong>project\/org<\/strong> tied to that API key has a non-zero spend allowance<\/li>\n<\/ul>\n\n\n\n<p>(Your Platform Usage page showing $0 doesn\u2019t prove billing is enabled\u2014it just means no successful billable calls happened.)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4) About your other error: <code>organization_id did not match the target organization<\/code><\/h2>\n\n\n\n<p>That happens when credentials\/tokens were created for <strong>one org\/workspace<\/strong> but you\u2019re trying to use them against another context (common when switching accounts, workspaces, or mixing keys\/logins). Codex explicitly notes it caches credentials and reuses them until you logout. (<a href=\"https:\/\/developers.openai.com\/codex\/auth\/\">OpenAI Developers<\/a>)<br><strong>Solution:<\/strong> <code>codex logout<\/code> + login again with the correct account\/workspace.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">5) Very important: you pasted a live API key in chat<\/h2>\n\n\n\n<p>Please <strong>revoke that key immediately<\/strong> in the Platform dashboard and create a new one. Treat it like a password.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Quick \u201cwho tracks what?\u201d (so you\u2019re no longer confused)<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">ChatGPT \/ Codex \/ Sora (consumer apps)<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Usage &amp; credits appear in <strong>Codex usage dashboard<\/strong> and <strong>Sora usage<\/strong> (<a href=\"https:\/\/help.openai.com\/en\/articles\/12642688-using-credits-for-flexible-usage-in-chatgpt-freegopluspro-sora\">OpenAI Help Center<\/a>)<\/li>\n\n\n\n<li>Credits are flexible across Codex + Sora (for supported plans\/features) (<a href=\"https:\/\/help.openai.com\/en\/articles\/12642688-using-credits-for-flexible-usage-in-chatgpt-freegopluspro-sora\">OpenAI Help Center<\/a>)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">OpenAI Platform (API)<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Usage appears in <strong>Platform Usage<\/strong><\/li>\n\n\n\n<li>Charged by <strong>tokens (LLMs)<\/strong> or <strong>per-second (video)<\/strong> depending on model type (<a href=\"https:\/\/openai.com\/api\/pricing\/?utm_source=chatgpt.com\">OpenAI<\/a>)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">If you do just one thing now<\/h2>\n\n\n\n<p>Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>codex logout\ncodex login\ncodex login status\n<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1) Why you get \u201cQuota exceeded\u201d even with 1000 Codex credits Codex has two sign-in modes Codex supports: So if [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-755","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=755"}],"version-history":[{"count":1,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/755\/revisions"}],"predecessor-version":[{"id":756,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/755\/revisions\/756"}],"wp:attachment":[{"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aiopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}