How to use Claude Code and Codex without a subscription
Tyler J. CagleUpdated 8 min read
Key facts
- As of October 22, 2026, Claude Code runs without a Claude plan on a Claude Console account billed per token, and Codex runs without a ChatGPT plan on an OpenAI API key billed at standard API rates (Anthropic, OpenAI).
- The free claude.ai plan doesn't include Claude Code; it needs a Pro, Max, Team, Enterprise or Console account.
- On an API key, Auto's measured Claude Code tasks would have cost about $0.084 each on Claude Opus 5.5, $0.037 on Sonnet 5.5 and $0.0035 on Haiku 5.5 at October 28, 2026 list prices, or about $84, $37 and $3.50 per 1,000 tasks (data).
- Auto Pro includes usage each month and bills paid models at the provider's price plus 10%, so on the same models a direct API key costs less.
You can use both without a subscription. Use Auto Pro: Auto, the Mac app for all your coding agents, includes usage each month, gives every model in each of them, and bills paid models at the provider's price plus 10%. Natively, Anthropic's docs say Claude Code works with a Claude Console account billed per token, and OpenAI's docs say Codex signs in with an API key billed at standard API rates (both as of October 22, 2026). On the same models, a direct API key costs less, so Pro comes out ahead only when cheaper models take enough of your turns. If you're weighing whether to pay at all, Is Claude Code free? compares every way in. For a wider comparison of their plans, limits and features, see Codex vs Claude Code side by side.
Can you use Claude Code or Codex without a subscription?
Yes, both run on pay-per-token API billing. Anthropic's Claude Code setup docs say Claude Code requires a Pro, Max, Team, Enterprise or Console account, and that the free claude.ai plan doesn't include Claude Code (as of October 22, 2026). The Console account is the one without a plan: you buy credits and pay Anthropic's API prices per token.
OpenAI's Codex authentication docs say the Codex CLI, the IDE extension and the ChatGPT desktop app accept an API key, and that OpenAI bills that usage through your OpenAI Platform account at standard API rates (as of October 22, 2026).
How do you run Claude Code on an Anthropic API key?
Sign in with a Claude Console account, and Anthropic bills each request at its API prices. These steps follow Anthropic's Claude Code setup and authentication docs as of October 22, 2026.
- Create a Claude Console account at platform.claude.com and buy credits on its Billing page.
- Install Claude Code with Anthropic's native installer for macOS, Linux and WSL (first command below).
- Run
claudein your project. At the login prompt, choose the Anthropic Console account, then Sign in with your Console account, which creates no API key and needs Claude Code v2.1.242 or later. - Or, if you already have a Console API key, set
ANTHROPIC_API_KEYbefore you runclaudeand approve the key when Claude Code asks. - Inside Claude Code, run
/statusto see which credential is active and/usageto see the session's estimated cost.
curl -fsSL https://claude.ai/install.sh | bash
claude
The first Console sign-in creates a workspace called "Claude Code", where you can set a spend limit. The /usage figure is an estimate at list price, and the Console's Usage page is the authoritative bill.
How do you run Codex on an OpenAI API key?
Pipe an OpenAI API key into codex login, and OpenAI bills your Platform account at standard API rates. These commands come from OpenAI's Codex CLI and authentication docs as of October 22, 2026.
- Create an API key in the OpenAI dashboard and put it in the
OPENAI_API_KEYenvironment variable. - Install the Codex CLI with OpenAI's standalone installer for macOS and Linux (first command below) or
npm install -g @openai/codex. - Pipe the key to
codex loginthrough stdin. - Run
codex login statusto confirm the active sign-in method, then runcodexin your project.
curl -fsSL https://chatgpt.com/codex/install.sh | sh
printenv OPENAI_API_KEY | codex login --with-api-key
codex login status
codex
codex logout clears the stored key. The IDE extension and the ChatGPT desktop app take the key on their signed-out screens.
How does Auto Pro work without a subscription?
Auto Pro gives you every model in every coding agent you use with usage included each month, and it doesn't require any AI subscription. Auto adds models from different providers to the model picker in each of them (Claude Code, Codex, Cursor, etc.), plus one more choice called Auto, which picks a model for each turn. Paid models are billed at the provider's price plus 10%, first from the included usage and then from credits you top up.
With no plan to draw on, every turn is paid usage. AutoRouter works out how hard each turn is: hard work gets the best model, and other work goes to the cheapest model that clears the quality bar for the task, which is often a low-cost open model. Unclear work is never treated as a quick task. Every turn shows its model, what it cost and why. How AutoRouter picks a model covers the full order.
New Auto accounts get a week of Pro, until its included usage is spent if that comes first. After that, Pro is paid; see pricing. Auto runs on macOS 14 or later with Codex (the app and the CLI) and the Claude Code CLI, which needs Node 22.18 or later, and it is in beta. Requests pass through Auto's servers. Auto doesn't store transcripts, and it keeps the message that opens each turn, up to 4,000 characters, to review routing.
- Download Auto for macOS from autorouter.com.
- Open Auto, sign in or create an account, allow Accessibility, and click Enable for each app.
- Start a new session and choose AutoRouter as the model: in Codex, from the model menu under the message box; in Claude Code, with
/model.
A coding agent can do the setup by following autorouter.com/setup.md.
Which option costs less?
On the same models, a direct API key costs less. With a key you pay the provider's list price. Auto Pro bills that price plus 10%, first from the usage included each month and then from credits, plus Pro's own monthly fee (pricing). Auto wrote this post, so it starts with the case where a key wins. Prices are as of October 22, 2026, from Anthropic and OpenAI.
| Option | Works in | How you pay | Example price per million tokens (input / output) |
|---|---|---|---|
| Anthropic API key (Claude Console) | Claude Code | Console credits, per token | Claude Opus 5.5: $4 / $20. Claude Haiku 5.5, prompts up to 100,000 tokens: $0.10 / $0.50 |
| OpenAI API key | Codex CLI, IDE extension and ChatGPT desktop app | OpenAI Platform account, per token at standard API rates | GPT-6.1 Sol: $2 / $10. GPT-6 Luna: $0.10 / $0.50. Both for prompts up to 272K input tokens |
| Auto Pro with credits | Codex (app and CLI) and the Claude Code CLI, on macOS 14 or later | Usage included each month (pricing), then credits you top up | The provider's price plus 10% |
For scale, $150 is the low end of the $150 to $250 a month that Anthropic's Claude Code cost docs give as the average per developer across enterprise deployments, about $13 per active day (as of October 22, 2026). On the same date, Claude Pro cost $20 a month billed monthly and ChatGPT Plus cost $20 a month. If your API bill runs well past that, a plan may cost less; Subscription or API pricing works through that choice.
The case for Auto Pro rests on the price gap between models. At list prices on October 22, 2026, Claude Haiku 5.5 costs a fortieth of Claude Opus 5.5 per uncached token on prompts up to 100,000 tokens, and GPT-6 Luna costs a twentieth of GPT-6.1 Sol. A turn on the cheaper model costs well under a tenth as much, even with 10% added. Whether your month comes out ahead depends on how many of your turns are quick. How to send quick coding tasks to a cheaper model works through one turn's cost, and Auto's savings calculator works through a month of your turns at API list prices.
Questions
Can I use Codex without paying for ChatGPT Plus?
Yes, with an API key or a lower ChatGPT plan. OpenAI's Codex pricing page lists Codex in the ChatGPT Free and Go ($8 a month) plans for quick and lightweight coding tasks in the desktop app, subject to rollout, as of October 22, 2026. Plus, at $20 a month, includes Codex on the web, in the CLI, in the IDE extension and on iOS. Codex pricing: all Codex plans, prices and usage limits lists every plan beside the measured cost of a Codex task.
Which credential does Claude Code use if I have a plan and an API key?
Claude Code uses ANTHROPIC_API_KEY over your subscription login once you approve the key, according to Anthropic's authentication docs. Run unset ANTHROPIC_API_KEY to fall back to the subscription, and /status to check which one is active.
What do I lose by signing in to Codex with an API key?
You lose Codex cloud and its cloud-based features. OpenAI's authentication docs say Codex cloud requires signing in with ChatGPT, and its pricing page says the API-key option has no cloud-based features, such as GitHub code review or Slack (October 22, 2026). Local work in the CLI and IDE extension runs on the key.
What happens when Auto Pro's included usage runs out?
Auto asks you to top up, and you can top up any time. Paid models then bill from credits at the provider's price plus 10%, and credits you buy never expire. Included usage resets each month and doesn't roll over.
Sources
- Advanced setup, Claude Code docs, Anthropic. Install command and accounts that include Claude Code. Checked October 22, 2026.
- Authentication, Claude Code docs, Anthropic. Console sign-in,
ANTHROPIC_API_KEYand credential precedence. Checked October 22, 2026. - Manage costs effectively, Claude Code docs, Anthropic. Average cost per developer,
/usageand workspace spend limits. Checked October 22, 2026. - Pricing, Claude API docs, Anthropic. Per-token prices and buying credits. Checked October 22, 2026.
- Plans and pricing, Anthropic. Claude Pro price. Checked October 22, 2026.
- Codex CLI, OpenAI. Install commands. Checked October 22, 2026.
- OpenAI authentication, Codex docs, OpenAI. API-key sign-in, billing and Codex cloud. Checked October 22, 2026.
- Codex pricing, OpenAI. Plans that include Codex and the API-key option. Checked October 22, 2026.
- API pricing, OpenAI. Per-token prices. Checked October 22, 2026.