Codex Pricing in 2026: ChatGPT Plans, Usage Limits, Credits and API-Key Costs

This page is about what Codex costs: the ChatGPT plans that include it, the usage limits per model, credits, and API-key billing. It is not our Codex vs Claude Code comparison (which weighs the two agents feature by feature) and not our Claude Code pricing page (Anthropic's plans). If you already know which plan you are on and want to wire Codex to live X (Twitter) data, the Codex Twitter and Codex MCP guides cover the setup.
Every OpenAI price and limit below was read from OpenAI's own pages (the Codex pricing page at developers.openai.com/codex/pricing, the API pricing page, the ChatGPT pricing page and two Help Center articles) and is listed in the sources. OpenAI changes these often and says plainly that its message counts are estimates, not fixed limits, so treat the numbers as a snapshot and check your own usage dashboard.
The part you will not find on OpenAI's pages is what a real X-monitoring agent run costs. We pulled 1,000 recent posts from @OpenAIDevs and @OpenAI, counted their tokens with the same tokenizer OpenAI's current models use, and priced a run at each API model next to the cost of the X data itself.
Which ChatGPT plans include Codex, and what each one gets
OpenAI's Help Center says Codex is included across ChatGPT plans, including Free and Go, with usage limits that vary by plan. Codex Cloud (tasks that run in OpenAI's sandbox instead of on your machine) is available to eligible Plus, all Pro tiers, Business, Enterprise, Healthcare and Education accounts, and is not included with Free or Go.
Pro is three plans, not one. The ChatGPT pricing page lists Pro 100, Pro 200 and Pro 500, and each carries monthly API credits of $100, $200 or $500 respectively. The footnote says activation and eligibility requirements apply, the first grant is prorated, unused credits expire at the end of the billing cycle, and the benefit can change.
Business and Enterprise. Business, Enterprise and Edu are billed through a separate credit-based rate card, and workspaces on flexible pricing can buy more workspace credits instead of hitting a hard stop. Enterprise and Edu without flexible pricing get the same per-seat limits as Plus for most features. We do not quote Business seat prices here; see chatgpt.com/pricing for your region.
Shared allowance. OpenAI notes that ChatGPT Work and Codex share usage: Work inside ChatGPT uses the same pricing, credits and limits as Codex, so a long Work session leaves less room for coding the same day.
Codex usage limits: messages per five hours, by model
Codex limits are rolling windows, not a monthly quota. OpenAI publishes ranges for local messages per five-hour period on Plus and Standard Business seats, and stresses that cloud tasks may use more, that weekly limits may also apply, and that the numbers are estimates rather than fixed caps:
Why the range is so wide. OpenAI says model choice, context, reasoning, tool use, retrieval and caching all change what a message costs, so prompt length alone is not a reliable estimate. A small script may use a fraction of the allowance; a long session that holds a big context uses much more per message.
Speed modes multiply usage. Fast mode draws included subscription usage 2.5x faster than Standard (2x on purchased credits). GPT-6 Astra Ultrafast and GPT-6.1 Sol Ultrafast draw 8x on included usage and 6x on credits. Image generation uses included limits about 3 to 5x faster on average.
When you hit the limit mid-task. OpenAI says the agent can finish the turn already in progress, subject to fair use. After that, Plus and Pro users can buy credits; anyone can switch to an API key and keep working locally at standard API rates.
Where to see your remaining limit. The usage dashboard at chatgpt.com/codex/settings/usage shows current limits and reset times, and /status inside a Codex CLI session shows what is left.
Codex credits: what you pay once the plan limit runs out
Credits are the pay-as-you-go unit for ChatGPT plans. Your included usage is spent first; after that, eligible usage draws from your credit balance, and one balance covers Codex, ChatGPT Work, Word, Excel and PowerPoint. Plus and Pro users buy them from Settings > Usage in ChatGPT or Usage & Billing in the Codex app, and automatic reload is available on some accounts.
Codex credit usage is token-based. These are OpenAI's Standard-speed rates, in credits per 1M tokens, from the Codex pricing page and the ChatGPT rate card:
What a task costs in credits. OpenAI's own example: a typical GPT-5.6 Sol task may use 2 to 15 credits. There is no separate cache-write charge on Codex credit billing, and GPT-6.1 Sol drawn from a subscription has no long-context surcharge in Codex.
What OpenAI does not print. None of the pages we read gives a single dollar price per credit; the Codex page says credit purchase prices and discounts depend on your plan or agreement. Read the price at checkout before you turn on automatic reload, and note that a balance can go negative if concurrent tasks finish after it hits zero.
GPT-5.6 Sol promotion. OpenAI says GPT-5.6 Sol's promotional pricing runs at least through November 21, 2026, and applies to usage paid with purchased credits; included plan usage and the five-hour and weekly limits are unchanged.
Codex with an API key: per-token prices and when it is the better deal
Signing in to Codex with an API key switches the meter to OpenAI API pricing. The Codex pricing page lists what you get: Codex in the CLI, SDK or IDE extension, model availability that follows your key, and no cloud-based features (no Codex cloud, GitHub code review or Slack). OpenAI recommends this route for automation in shared environments such as CI.
These are Standard rates (short context) from OpenAI's API pricing page. Batch and Flex are half of Standard (gpt-6.1-sol $1.00 / $5.00), Fast is double ($4.00 / $20.00), and regional data-residency endpoints carry a 10% uplift for models released on or after March 5, 2026.
Plan or API key? A subscription is a flat ceiling: good when a person codes interactively and the five-hour windows rarely bite. An API key is a meter: good for scheduled or CI jobs, for bursts that would exhaust a window, and for teams that want spend per project. OpenAI itself warns not to use API token prices to estimate how many tasks a plan includes, because subscription usage is metered differently.
Model retirements differ by sign-in. GPT-5.5 was retired from Codex with ChatGPT sign-in on October 14, 2026, and GPT-5.4 and GPT-5.4 mini are no longer available there, but OpenAI notes that API access and Codex sessions on your own API key are not affected.
OpenAI API credits vs ChatGPT credits: two different balances
People searching for "openai api credits" or "chatgpt api credits" usually mean one of three things, and they are not interchangeable:
ChatGPT usage credits. The credits described above. They extend Codex, Work and Office add-ins after your plan limit and are separate from your ChatGPT wallet (a US-dollar balance that can hold gift-card funds). They do not pay for API calls.
Monthly API credits on Pro. Pro 100, Pro 200 and Pro 500 include $100, $200 or $500 of monthly API credits "to build your own apps and agents", per the ChatGPT pricing page. Unused amounts expire at the end of the billing cycle. If you are on Pro, this is the balance an API-key Codex session or your own agent would draw from first.
API billing. Everything else on an API key is billed at the per-token prices in the previous section, plus tool fees where you use them (OpenAI lists web search at $10.00 per 1,000 calls plus search content tokens, and hosted containers from $0.03 per 20-minute session).
The practical rule. Interactive Codex on a plan spends ChatGPT usage and then ChatGPT credits. Anything you script against the API, including codex exec on an API key and an agent that reads tweets, spends API credits. Our OpenAI API key guide covers creating and scoping the key.
What one X-monitoring agent run costs: model tokens plus tweet data
A common Codex or OpenAI agent job is "read what people posted about X today and summarize it". Two bills add up: the X data and the model tokens. We measured both on real posts instead of guessing: 1,000 recent posts from @OpenAIDevs and @OpenAI, tokenized with o200k_base, the encoding OpenAI's current models use.
The tweet object is heavy. A tweet as the API returns it (text, author block, entities, media, counts) has a median of 2,304 tokens (p90 3,905, max 8,590). The same tweet compacted to one line (handle, time, likes, reposts, views, text) has a median of 77 tokens (p90 108). A full 20-tweet page is 50,058 tokens raw versus 1,584 compacted, about 31.6x fewer.
The estimate. We priced a run as 1,500 instruction tokens plus the tweets in, 800 tokens out, at Standard uncached API rates. These are assumptions you should replace with your own prompt; the per-tweet token counts are measured.
Takeaway. Compacting tweets before they reach the model matters more than which plan you are on: on gpt-6.1-sol it turns a $0.51 run into a $0.028 run. With compacted input, the model costs about twice the data; with raw JSON, it costs over 30x the data.
Projected over a month. One 100-tweet run a day costs about $0.45 of X data plus $0.83 on gpt-6.1-sol (compacted), or $0.04 on gpt-6-luna. Hourly runs (720 a month) cost $10.80 of data plus $19.99 on gpt-6.1-sol; pasting raw JSON instead would push the model share to $370.14.
Inside Codex on a plan. If the agent runs as a Codex task on a ChatGPT plan, the same token volume draws on your five-hour window instead of dollars, and OpenAI's own tip applies: every MCP server you enable adds context to each message, so disable the ones a job does not need. The X data cost is the same either way.

The X data side: TwitterAPI.io vs the official X API
To read X posts as structured data (text, author, counts), an agent needs an X data source. Two priced options:
Per 1,000 tweets that is $5 on X's pay-per-usage rate card (docs.x.com/x-api/getting-started/pricing) against $0.15, about 33x. X also gives $20 of credits on a first eligible card and matches the first auto-recharge up to $50.
How TwitterAPI.io bills. Tweet endpoints such as /twitter/tweet/advanced_search and /twitter/user/last_tweets cost 15 credits per tweet returned ($1 = 100,000 credits), with a minimum of 15 credits per request: a full 20-tweet page is $0.003, and a search that finds nothing costs the $0.00015 minimum. That floor matters for agents that poll: checking every 60 seconds for a month is 43,200 checks, $6.48 if every one comes back empty; every 5 minutes, $1.30. You pay only for the data returned, no X account is needed for reads, and purchased credits never expire.
Plans and rate limits. Pay as you go, or subscribe (Starter $29, Builder $99, Pro $199, Scale $499, Business $1,499 a month; details on the pricing page). Accounts run at 0.2 requests per second before the first payment and 20 once paid. New accounts that pass the automatic bot check get up to $1 of free credits (at most 100,000 credits, no card, one per person or network, expiring after 31 days).
If the agent should post. Writes are a separate product: one /twitter/user_login_v2 login ($0.10, with a proxy you supply) returns login_cookies, then each /twitter/create_tweet_v2 post is 60 credits ($0.0006), billed per HTTP 200 call. The call acts as that account, so X can rate-limit, lock or suspend it; keep a human pace, and expect the session to need a re-login now and then.
How we collected this: 1,000 posts from @OpenAIDevs and @OpenAI
Question. How many tokens does a real page of tweets occupy when handed to an OpenAI model, and therefore what does an X-reading agent run cost? As a side question: how much of OpenAI's own posting is about Codex, and how often those posts mention pricing or limits?
Accounts and method. Two public organization accounts, @OpenAIDevs and @OpenAI, read with /twitter/user/last_tweets (newest first, replies excluded), 25 pages each: 50 requests, 1,000 posts, $0.15 of data. Codex posts are those whose text, quoted text or card mentions "codex"; pricing posts are Codex posts mentioning prices, plans, credits, limits or costs. Tokens were counted with tiktoken o200k_base.
Window and sample. The most recent 500 posts of each account at collection time, collected in 2026: about 104 days for @OpenAIDevs (4.8 posts a day) and about 532 days for @OpenAI (0.9 a day).
What it shows. Codex is close to a third of @OpenAIDevs' timeline, and Codex originals get slightly higher median views and likes than the rest on both accounts (@OpenAI: 6,026 vs 4,619 median likes). Only 36 of 229 Codex posts touch pricing or limits, so check the pricing page itself rather than the timeline for price changes.
What it cannot show. Token counts depend on the tokenizer and on what you put in each line; a prompt with long instructions or tool schemas shifts the totals. Org-account posts are longer and richer in media than an average search result, so a keyword search may run lighter. The model prices are estimates from list prices, not invoices; we did not call an OpenAI model in this study.
Privacy. Aggregates only. Both accounts are organizations; reposted and quoted authors were not analyzed, raw pages stayed off the repository, and the committed sample keeps only de-identified counts.
Cut the bill, then build the agent
Compact before you prompt. Send one line per tweet, not the API object; on our sample that is about 31.6x fewer input tokens.
Pick the model per step. Classification and filtering run fine on gpt-6-luna ($0.10 / $0.50 per 1M tokens); keep gpt-6.1-sol or gpt-5.3-codex for the summary or the code change.
Fetch only new tweets. Use a since_time: cursor in /twitter/tweet/advanced_search so an hourly run pays for new posts plus the $0.00015 minimum when nothing changed.
Trim Codex context. Keep AGENTS.md short and enable only the MCP servers a job uses, as OpenAI's own usage tips recommend.
Use Batch for overnight digests. OpenAI prices Batch at half of Standard, which suits a nightly summary that does not need an instant answer.
Start building. Create a key on the dashboard, run the snippet below to measure your own prompt, and read the endpoint reference at docs.twitterapi.io. The Codex MCP guide shows how to give Codex the same X data as tools.
pip install requests tiktoken
export TWITTERAPI_IO_API_KEY=your_key_from_the_dashboard
python3 codex_x_cost.py # prints tweets, input tokens, data cost and model cost per runimport os
import requests
import tiktoken # pip install tiktoken requests
BASE = "https://api.twitterapi.io"
HEADERS = {"X-API-Key": os.environ["TWITTERAPI_IO_API_KEY"]}
# OpenAI API Standard prices per 1M tokens (input, output); check
# developers.openai.com/api/docs/pricing before you rely on them.
PRICES = {"gpt-6.1-sol": (2.00, 10.00), "gpt-6-luna": (0.10, 0.50), "gpt-5.3-codex": (1.75, 14.00)}
DATA_PRICE_PER_TWEET = 0.00015 # TwitterAPI.io: 15 credits per tweet returned
def search(query, max_tweets=100):
"""Pull recent tweets for a query, following next_cursor."""
tweets, cursor = [], ""
while len(tweets) < max_tweets:
r = requests.get(
f"{BASE}/twitter/tweet/advanced_search",
headers=HEADERS,
params={"query": query, "queryType": "Latest", "cursor": cursor},
timeout=30,
)
r.raise_for_status()
body = r.json()
tweets.extend(body.get("tweets", []))
if not body.get("has_next_page"):
break
cursor = body.get("next_cursor", "")
return tweets[:max_tweets]
def compact(t):
"""One short line per tweet instead of the full JSON object."""
a = t.get("author") or {}
return (f"@{a.get('userName', '')} | {t.get('createdAt', '')} | likes {t.get('likeCount', 0)} "
f"rt {t.get('retweetCount', 0)} views {t.get('viewCount', 0)} | {t.get('text', '').strip()}")
tweets = search("codex (pricing OR \"usage limits\") -filter:retweets lang:en", max_tweets=100)
prompt = ("Summarize what developers say about Codex pricing in five bullets. "
"Quote no handles.\n\n" + "\n".join(compact(t) for t in tweets))
open("digest_input.txt", "w").write(prompt)
enc = tiktoken.get_encoding("o200k_base")
in_tok, out_tok = len(enc.encode(prompt)), 800 # 800 = output budget you allow
print(f"{len(tweets)} tweets, {in_tok:,} input tokens")
print(f"X data: ${len(tweets) * DATA_PRICE_PER_TWEET:.4f}")
for model, (p_in, p_out) in PRICES.items():
print(f"{model}: ${in_tok / 1e6 * p_in + out_tok / 1e6 * p_out:.4f} per run (estimate)")
# Hand digest_input.txt to codex exec, the Agents SDK or the Responses API.
Questions readers ask
Is Codex free?
Codex is included in ChatGPT Free and Go with limited access (GPT-6 Luna at Standard speed in the desktop app, subject to rollout). Codex Cloud, code review and the GPT-6.1 models need Plus ($20 a month) or higher.
How much does Codex cost per month?
Nothing extra on top of your ChatGPT plan: Plus is $20 a month and Pro starts at $100 a month in three tiers (Pro 100, 200 and 500). Past the plan limit you buy credits; with an API key you pay per token instead.
What are the Codex usage limits on Plus?
OpenAI estimates 15 to 160 local GPT-6.1 Sol messages per five hours on Plus, 35 to 285 on GPT-6.1 Terra and 350 to 3,000 on GPT-6 Luna. Weekly limits may also apply, cloud tasks use more, and Pro currently has no five-hour limit. Run /status in the CLI to see what is left.
What happens when I hit the Codex usage limit?
The current turn can finish, subject to fair use. Then Plus and Pro users can buy credits, Business, Enterprise and Edu workspaces on flexible pricing can buy workspace credits, and anyone can switch to an API key at standard API rates.
How much does Codex cost with an API key?
Standard API rates per 1M tokens, for example gpt-6.1-sol $2.00 input and $10.00 output, gpt-5.3-codex $1.75 and $14.00, gpt-6-luna $0.10 and $0.50. API-key sessions have no cloud features such as Codex cloud or GitHub code review.
Are ChatGPT credits the same as OpenAI API credits?
No. ChatGPT usage credits extend Codex, Work and Office add-ins after your plan limit. API credits pay for API calls. Pro tiers include $100, $200 or $500 of monthly API credits that expire at the end of each billing cycle.
How much does it cost for Codex to read 100 tweets?
In our measurement, about $0.015 for the tweets on TwitterAPI.io plus about $0.028 on gpt-6.1-sol if each tweet is compacted to one line, or $0.51 if the raw JSON is pasted in. The official X API would charge $0.50 for the same 100 post reads.
Does Codex Fast mode cost more?
Yes. Fast mode uses included subscription usage 2.5x faster than Standard and purchased credits at 2x; Ultrafast on GPT-6 Astra or GPT-6.1 Sol uses 8x and 6x. On the API, Fast is double the Standard per-token price.
Continue
- OpenAI: Codex pricing (plans, usage limits per five hours, speed multipliers, credit rates, API-key option)
- OpenAI API pricing (Standard, Batch, Fast per-token prices; gpt-5.3-codex)
- OpenAI: ChatGPT pricing (Free, Go, Plus, Pro tiers and monthly API credits)
- OpenAI Help Center: Using Codex with your ChatGPT plan
- OpenAI Help Center: ChatGPT rate card (credit-based pricing for Codex)
- X API pricing (pay-per-usage rate card)
- X (Twitter) API guide: endpoints, pricing and access
- Connect Codex to live Twitter (X) data
- Codex MCP setup: give Codex X data as tools
- Codex vs Claude Code compared side by side
- Claude Code pricing: plans and usage limits
- How to create and scope an OpenAI API key
- TwitterAPI.io pricing: pay per tweet returned
- Get a TwitterAPI.io API key on the dashboard
- 01Twitter (X) API License: The Developer Agreement in Plain English
- 02n8n Pricing in 2026: Plans, Executions and the Twitter (X) Data Cost
- 03Claude Managed Agents: What It Is, What It Costs, and a Twitter (X) Monitoring Agent Built on It
- 04Cursor vs Claude Code: Plans, MCP Setup and Headless Runs Compared for Twitter (X) Data Work
- 05Claude Code --dangerously-skip-permissions: what it skips, what it still blocks, and a safer unattended setup
- 06Claude Code Pricing in 2026: Plans, Usage Limits and the Real Cost of an Always-On Agent
- 07Claude API Pricing in 2026: Per-Token Rates and What 1,000 Tweets Really Cost
- 08How to Use OpenAI Codex with the Twitter (X) API
Stop reading. Start building.
Starter credits cover real testing on real data. Google sign-in, no card, no application queue.
Get an API keyAlready building with TwitterAPI.io? Publish an honest tutorial or build log about it and earn up to $200 a month in API credits.