logo
blogtopicsabout
logo
blogtopicsabout

OpenAI Codex Embraces Token-Based Pricing: A Deep Dive for Developers

AI DevelopmentOpenAICodexAPIPricingTokensCost ManagementGPT-5
April 6, 2026

TL;DR

  • •OpenAI Codex is transitioning from per-message pricing to a more granular API token usage model.
  • •The new model charges based on input tokens, cached input tokens, and output tokens, offering greater transparency into credit consumption.
  • •Different Codex models (e.g., GPT-5.4, GPT-5.4-Mini) have varying credit rates per million tokens.
  • •Existing Plus/Pro/Edu and Enterprise/Edu customers will temporarily remain on a legacy per-message rate card until fully migrated.
  • •Developers can monitor token usage in Codex settings and should optimize for token consumption to manage costs, with average costs estimated at $100-$200/developer/month.

Exciting news from OpenAI for anyone leveraging their powerful Codex models! OpenAI has announced a significant shift in its pricing structure for Codex, moving from an average per-message estimate to a more transparent and granular API token usage model. This change promises developers a clearer understanding of their credit consumption and more flexibility in managing costs.

What's Changing: From Messages to Tokens

Previously, Codex usage was often calculated using approximate average credits per message or pull request. While useful for rough planning, this approach could obscure the actual credit usage, which varies based on task size, model choice, and reasoning requirements.

The new flexible pricing structure for Plus, Pro, Business, and Enterprise/Edu plans now ties Codex usage directly to API token usage. This means you'll be charged based on three distinct categories of tokens:

  • Input Tokens: The tokens sent to the model for processing.
  • Cached Input Tokens: Tokens from inputs that have been previously processed and cached, often at a significantly lower cost.
  • Output Tokens: The tokens generated by the model as its response.

This direct mapping between token usage and credits provides a far more precise view of how your interactions with Codex impact your credit balance. Understanding tokens is crucial here; if you need a refresher, OpenAI provides a helpful guide on what tokens are and how to count them (opens in a new tab).

The New Codex Rate Card: Credits Per Million Tokens

The table below details the new credit rates, expressed as credits per 1 million tokens for each token type across various Codex models:

ModelInput Tokens (credits/1M)Cached input tokens (credits/1M)Output Tokens (credits/1M)
GPT-5.462.506.250375
GPT-5.4-Mini18.751.875113
GPT-5.3-Codex43.754.375350
GPT-5.2-Codex43.754.375350
GPT-5.243.754.375350
GPT-5.1-Codex-Max31.253.125250
GPT-5.1-Codex-mini6.250.62550

Important Considerations:

  • Fast Mode: Be aware that enabling fast mode will consume 2x as many credits.
  • Code Review: Tasks involving code review utilize the GPT-5.3-Codex model.
  • GPT-5.3-Codex-Spark: This model may be available as a research preview, and its credit rates are not yet final.

Managing Your Codex Usage and Costs

OpenAI estimates that, on average, Codex costs ~$100-$200 per developer per month. However, this can vary significantly based on the model used, the number of instances running, automations, and whether fast mode is frequently engaged.

To help you stay on top of your usage, you can monitor your workspace's token consumption in the Codex settings under the Usage panel. OpenAI also provides best practices (opens in a new tab) for maximizing your rate limits and efficiently managing token consumption.

Legacy Rate Card and Migration for Existing Users

If you're an existing Plus/Pro, Business, Enterprise, or Edu customer, it's important to note that you will continue to use the legacy rate card for a period. OpenAI will migrate you to the new token-based rates in the future.

Legacy Rates (Approximate Average Credits Per Message/Pull Request)

Task TypeUnitGPT-5.4GPT-5.3-CodexGPT-5.1-Codex-mini
Local Tasks1 message~7 credits~5 credits~1 credit
Cloud Tasks1 message~34 credits~25 creditsNot available

Migration Information:

  • Plus/Pro and Edu users should keep an eye on OpenAI's release notes for updates on when the new rates will apply to them.
  • Enterprise admins and owners will receive specific migration details, including timelines, via email. If you have questions, contact your OpenAI sales representative.

Conclusion

The move to token-based pricing for OpenAI Codex represents a step towards greater transparency and control for developers. While existing users will experience a phased migration, everyone can benefit from understanding the new model and actively managing their token consumption. This change empowers developers to make more informed decisions about model selection and usage, ultimately leading to more efficient and cost-effective AI development.

Stay tuned to OpenAI's official channels for the latest updates on your migration timeline and best practices for optimizing your Codex usage!

Source:

Hacker News Best ↗