Which Codex Plan to Use: Three Ways to Pay Compared (Oct 2026)
Which Codex plan you need depends on how you use it. If you only run a few tasks now and then, signing in with a ChatGPT subscription is the easiest. If your usage is heavy, you need precise cost accounting, or you want to plug into a team workflow, pay-as-you-go with an API key is easier to control. If you don't want to hold an overseas account and credit card, there is also a third route: a compatible gateway. Below, each option is explained in line with the official documentation. This article reflects the situation as of October 2026. Plan names, quotas, and prices change often, so check OpenAI's official pages for current numbers; this article does not list prices.
What are the ways to pay for Codex?
When you use the Codex CLI, authentication and billing fall into three broad categories:
- Sign in with a ChatGPT account: you use the Codex usage included in ChatGPT plans such as Plus and Pro. You pay the monthly subscription fee, and usage is limited by the plan's quota and time window. Which plans include Codex and how much quota they give is defined by the official documentation.
- OpenAI API key: usage is billed per token against the balance on your OpenAI developer platform account, and it does not count against your ChatGPT subscription quota.
- Custom provider (compatible gateway): in
config.tomlyou point the endpoint at a third-party or self-hosted gateway, and the gateway decides the billing rules. For the config fields, see Codex config.toml field reference: model_providers, env_key, wire_api, and profiles.
The first two are official channels. With the third, you have to judge for yourself whether the gateway is reliable and whether its billing is transparent.
How do subscription login and API keys differ?
| Comparison | ChatGPT subscription login | API key |
|---|---|---|
| Billing model | Fixed monthly fee with a set amount of usage included | Per-token billing, pay for what you use |
| Cost predictability | High, the bill is the same every month | Depends on task size, you have to estimate it |
| Usage cap | Limited by plan quota and time window | Limited by account limits and balance |
| Best for | Personal day-to-day use, uneven usage | Large tasks, automation, centralized team billing |
| Prerequisite | A ChatGPT account, in a supported region | An API account and a payment method |
The main difference is whether your cost is fixed or variable. A subscription is like a monthly pass: if you use it little, it feels expensive, and if you use it a lot, you hit the quota. The API is like a utility meter: light use is very cheap, but a long-running agent task can accumulate a large number of tokens, and the month-end bill can exceed expectations. Claude Code has the same trade-off; see Claude Code: subscription login or API key, and how the two billing models compare.
How should I choose? Four steps
Step 1: Estimate your own usage
Track what you ask Codex to do over one week: roughly how many tasks, and whether each one edits a single function or refactors a whole module. Agent-style tasks repeatedly read files and call tools, so they use far more tokens than an ordinary chat. For an estimation method, see How to estimate Claude Code token usage and work out your monthly cost. The approach applies to Codex as well.
Step 2: Make a rough split by usage
- A few short tasks per week: subscription login is usually enough, and you don't have to think about tokens.
- Heavy daily use and frequent quota warnings: either upgrade your subscription tier or switch to an API key. Work out the monthly cost of both options and compare.
- CI, scripts, or shared by several people: use an API key, which makes it easier to split by project and reconcile the bill.
Step 3: Confirm that you can use the official channels
Both the official subscription and the API have requirements for supported regions and payment methods. Whether your region is supported and whether you have a usable payment method is determined by OpenAI's official statements. If you don't meet the conditions, do not try to bypass region or risk-control restrictions. That violates the terms of service and may get your account restricted. If your region is not supported, choose models and services available where you are, such as models from Chinese providers with their own APIs. The gateway route only fits the case where "your region is fine, but you lack a ChatGPT account or an overseas payment method." It cannot be used to keep using a service that is region-restricted for you.
Step 4: Try it on a small scale before committing
Start with a monthly plan or a small top-up, use it for two weeks, and record your real consumption before deciding whether to subscribe long term or add more credit. The cost of picking the wrong plan is mainly one month's fee, so there's no need to lock in a decision at once.
When does a compatible gateway make sense?
A gateway works like this: you still use Codex, but you change the endpoint to the address the gateway gives you and are billed through the gateway's API key. It fits cases such as having no ChatGPT account, having no overseas credit card, or wanting to pay in RMB and switch between several models.
Things you need to verify yourself:
- Whether billing is transparent, and whether the gateway's token counts match your local estimates. See Why is my API bill wrong: token counting rules, duplicate charges, and line-by-line checks.
- Whether the data policy and uptime are public. For an evaluation checklist, see How to choose an API relay: 8 verifiable checks on uptime, billing, and data policy.
- How to set the endpoint and key. See Custom API endpoints for Claude Code, Codex, and OpenCode.
Using Codex through AGI Plan
AGI Plan is a commercial partner of cdnping, so the following is not a neutral review. AGI Plan is a multi-provider LLM aggregation gateway with monthly subscriptions, billed in RMB, with no overseas credit card required. It offers a step-by-step Codex tutorial, and you don't need a ChatGPT account: you change a single endpoint address to connect. Note that the service states explicitly that it is not an officially authorized channel, and some models are marked "overseas only." Check the AGI Plan models page for specifics. Plans and metering are on the pricing page, and setup steps are in the quick start. Whether it suits you depends on whether you care more about an official channel, or about paying in RMB and switching between models.
How do I verify my choice?
Whichever you pick, do three things before you rely on it:
- Read Where AI API latency comes from first, then use the speed test on the cdnping home page to see the first-connection time and round trip from your network to each API.
- When you hit errors or slowdowns, check /en/status/openai and /en/down/codex first to tell a server-side problem from a local network problem.
- Compare a week of real tasks against your bill to confirm how far actual spending is from your expectation.
Summary and next steps
Track your usage for a week, then decide. If usage is low and steady, choose subscription login. If usage is high or you need to account for costs, choose an API key. If you lack an account or an overseas payment method, evaluate a compatible gateway and check its billing and data policy item by item. To learn more about subscription trade-offs for coding tools, read How to choose an AI coding tool subscription: editor plans, official plans, and API gateways.