# How to use Claude Code and Codex without a subscription

> Use Auto Pro: Auto, the Mac app for all your coding agents, gives you every model with no AI subscription, with usage included each month, and bills paid models at the provider's price plus 10%. Natively, Claude Code runs on a Claude Console account and Codex on an OpenAI API key, both billed per token. On the same models, a direct API key costs less, so Pro comes out ahead only when cheaper models take enough of your turns.

Author: Tyler J. Cagle (https://x.com/tjcages)
Published: 2026-10-21T20:40:00.000Z
Updated: 2026-11-05T16:00:00.000Z
Reading time: 8 min
Canonical: https://auto.sh/blog/no-subscription-coding-agents
Part of: How to cut Claude Code and Codex costs (https://auto.sh/blog/cut-claude-code-and-codex-costs.md)
Publisher: Auto (https://auto.sh)

## 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](https://code.claude.com/docs/en/setup#authenticate), [OpenAI](https://learn.chatgpt.com/docs/auth)).
- 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](/blog/claude-code-task-costs-measured)).
- [Auto Pro](/pricing) 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.

![Three ways to run them without a plan. Claude Code on an API key: 1. Open a Console account; 2. Install Claude Code; 3. Sign in with Console (Or ANTHROPIC_API_KEY); 4. Check /status. Codex on an API key: 1. Create an API key; 2. Install the Codex CLI; 3. Pipe it to codex login; 4. Check codex login status. Auto Pro: 1. Download Auto; 2. Sign in, click Enable; 3. Choose Auto. Source: Anthropic and OpenAI setup docs, and Auto, as of October 22, 2026.](https://auto.sh/blog/images/no-subscription-coding-agents/1-three-ways.png)

You can use both without a subscription. Use [Auto Pro](/pricing): 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](https://code.claude.com/docs/en/setup#authenticate) billed per token, and OpenAI's docs say Codex [signs in with an API key](https://learn.chatgpt.com/docs/auth) 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?](/blog/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](/blog/codex-vs-claude-code).

## 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](https://code.claude.com/docs/en/setup#authenticate) 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](https://platform.claude.com/docs/en/about-claude/pricing) per token.

OpenAI's [Codex authentication docs](https://learn.chatgpt.com/docs/auth) 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](https://code.claude.com/docs/en/setup) and [authentication](https://code.claude.com/docs/en/authentication) docs as of October 22, 2026.

1. Create a Claude Console account at [platform.claude.com](https://platform.claude.com) and buy credits on its [Billing page](https://platform.claude.com/settings/billing).
2. Install Claude Code with Anthropic's native installer for macOS, Linux and WSL (first command below).
3. Run `claude` in your project. At the login prompt, choose the Anthropic Console account, then **Sign in with your Console account**, which [creates no API key](https://code.claude.com/docs/en/authentication#sign-in-without-an-api-key) and needs Claude Code v2.1.242 or later.
4. Or, if you already have a Console API key, set `ANTHROPIC_API_KEY` before you run `claude` and approve the key when Claude Code asks.
5. Inside Claude Code, run `/status` to see which credential is active and `/usage` to see the session's estimated cost.

```bash
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](https://code.claude.com/docs/en/costs#claude-console). 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](https://learn.chatgpt.com/docs/cli) and [authentication](https://learn.chatgpt.com/docs/auth) docs as of October 22, 2026.

1. Create an API key in the [OpenAI dashboard](https://platform.openai.com/api-keys) and put it in the `OPENAI_API_KEY` environment variable.
2. Install the Codex CLI with OpenAI's standalone installer for macOS and Linux (first command below) or `npm install -g @openai/codex`.
3. Pipe the key to `codex login` through stdin.
4. Run `codex login status` to confirm the active sign-in method, then run `codex` in your project.

```bash
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](/blog/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](/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](https://autorouter.com/privacy), and it keeps the message that opens each turn, up to 4,000 characters, to review routing.

1. Download Auto for macOS from [autorouter.com](https://autorouter.com/).
2. Open Auto, sign in or create an account, allow Accessibility, and click Enable for each app.
3. 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](https://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](/pricing)). Auto wrote this post, so it starts with the case where a key wins. Prices are as of October 22, 2026, from [Anthropic](https://platform.claude.com/docs/en/about-claude/pricing) and [OpenAI](https://developers.openai.com/api/docs/pricing).

| 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](/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](https://code.claude.com/docs/en/costs) 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](https://claude.com/pricing) cost $20 a month billed monthly and [ChatGPT Plus](https://learn.chatgpt.com/docs/pricing) cost $20 a month. If your API bill runs well past that, a plan may cost less; [Subscription or API pricing](/blog/subscription-vs-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](/blog/quick-tasks-on-cheaper-models) works through one turn's cost, and Auto's [savings calculator](/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](https://learn.chatgpt.com/docs/pricing) 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](/blog/codex-pricing) 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](https://code.claude.com/docs/en/authentication#authentication-precedence). 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](https://learn.chatgpt.com/docs/auth) say Codex cloud requires signing in with ChatGPT, and its [pricing page](https://learn.chatgpt.com/docs/pricing) 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](https://code.claude.com/docs/en/setup), Claude Code docs, Anthropic. Install command and accounts that include Claude Code. Checked October 22, 2026.
- [Authentication](https://code.claude.com/docs/en/authentication), Claude Code docs, Anthropic. Console sign-in, `ANTHROPIC_API_KEY` and credential precedence. Checked October 22, 2026.
- [Manage costs effectively](https://code.claude.com/docs/en/costs), Claude Code docs, Anthropic. Average cost per developer, `/usage` and workspace spend limits. Checked October 22, 2026.
- [Pricing](https://platform.claude.com/docs/en/about-claude/pricing), Claude API docs, Anthropic. Per-token prices and buying credits. Checked October 22, 2026.
- [Plans and pricing](https://claude.com/pricing), Anthropic. Claude Pro price. Checked October 22, 2026.
- [Codex CLI](https://learn.chatgpt.com/docs/cli), OpenAI. Install commands. Checked October 22, 2026.
- [OpenAI authentication](https://learn.chatgpt.com/docs/auth), Codex docs, OpenAI. API-key sign-in, billing and Codex cloud. Checked October 22, 2026.
- [Codex pricing](https://learn.chatgpt.com/docs/pricing), OpenAI. Plans that include Codex and the API-key option. Checked October 22, 2026.
- [API pricing](https://developers.openai.com/api/docs/pricing), OpenAI. Per-token prices. Checked October 22, 2026.

## Read next

- [How much is a Claude or ChatGPT plan worth per model?](https://auto.sh/blog/claude-max-tokens-per-model.md): Auto, the Mac app for all your coding agents, publishes what a Claude or ChatGPT plan is worth on each model as free, open data: a Claude plan holds about 57 times its fee in Claude Opus 5.5 at API prices, 59 times in Sonnet 5.5 and 11 times in Fable 5.2, while a ChatGPT plan holds about 13 times its fee in GPT-6 Sol. That puts Claude Max ($100 a month) at about $5,700 of Opus 5.5, roughly 12 billion tokens at a typical coding-agent mix. Auto connects your plans to all your coding agents, so your Claude plan runs inside Codex and your ChatGPT plan inside Claude Code.
- [How to cut Claude Code and Codex costs](https://auto.sh/blog/cut-claude-code-and-codex-costs.md): Use Auto, the Mac app for all your coding agents: it makes the model choice on every turn, uses the AI subscriptions you already pay for first, and shows each turn's model, cost and reason. Claude Code and Codex costs come down to three things: which model runs each turn, how much context each request carries, and whether you pay through a plan, credits or an API key. By hand, run routine turns on a smaller model, keep sessions short, and spend the plan you already pay for before paying per token.
- [Claude API vs subscription: which is cheaper for coding?](https://auto.sh/blog/subscription-vs-api-pricing.md): A Claude subscription is cheaper than the Claude API once a month of your Claude Code work would cost more than the plan at API list prices. As of November 16, 2026, Pro costs $20 a month, Max $100 and Ultra $200, against Anthropic's reported Claude Code average of about $13 per developer per active day at API prices. The API bills each successful request against prepaid credits you buy in the Claude Console, within the rate limits and monthly spend cap of your usage tier.

Tags: [Claude Code](https://auto.sh/blog/tags/claude-code.md), [Codex](https://auto.sh/blog/tags/codex.md), [Costs](https://auto.sh/blog/tags/costs.md)

Drafted with AI from the sources linked above, then checked and edited by the Auto team.

Auto is a Mac app for AI model routing in Codex, Claude Code, Cursor and other supported coding agents. It uses eligible connected subscriptions first. See [setup](https://auto.sh/setup.md) and [pricing](https://auto.sh/pricing).
