Beta
Download

How to use Claude Code and Codex without a subscription

AutoRouter8 min read

You can use both without a subscription. 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). AutoRouter, the Mac app for Codex and Claude Code, is a third option: AutoRouter Pro costs $20 a month with $20 of included usage, gives every model in both apps, and bills paid models at the provider's price plus 10%. On the same models, a direct API key costs less, so Pro comes out ahead only when cheaper models take enough of your turns.

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.

  1. Create a Claude Console account at platform.claude.com and buy credits on its Billing page.
  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 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.
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.

  1. Create an API key in the OpenAI dashboard 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.
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 AutoRouter Pro work without a ChatGPT or Claude plan?

AutoRouter Pro gives you every model in Codex and Claude Code for $20 a month with $20 of included usage, and it doesn't require a ChatGPT or Claude subscription. AutoRouter, the Mac app for Codex and Claude Code, adds 20+ models to the model picker in both apps, plus one more choice called AutoRouter, 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 AutoRouter accounts get their first month free, until $20 of usage is spent if that comes first. After that, Pro is $20 a month. AutoRouter 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 AutoRouter's servers. AutoRouter doesn't store transcripts, and it keeps the message that opens each turn, up to 4,000 characters, to review routing.

  1. Download AutoRouter for macOS from autorouter.com.
  2. Open AutoRouter, 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.

Which option costs less?

On the same models, a direct API key costs less. With a key you pay the provider's list price. AutoRouter Pro bills that price plus 10%, and the first $20 each month comes from the included usage. AutoRouter wrote this post, so the math below starts with the case where a key wins. Prices are as of October 22, 2026, from Anthropic and OpenAI.

OptionWorks inHow you payExample price per million tokens (input / output)
Anthropic API key (Claude Console)Claude CodeConsole credits, per tokenClaude Opus 5.5: $4 / $20. Claude Haiku 5.5, prompts up to 100,000 tokens: $0.10 / $0.50
OpenAI API keyCodex CLI, IDE extension and ChatGPT desktop appOpenAI Platform account, per token at standard API ratesGPT-6.1 Sol: $2 / $10. GPT-6 Luna: $0.10 / $0.50. Both for prompts up to 272K input tokens
AutoRouter Pro with creditsCodex (app and CLI) and the Claude Code CLI, on macOS 14 or later$20 a month with $20 of included usage, then credits you top upThe provider's price plus 10%

The $20 of included usage covers the first $18.18 of list-price usage each month ($20 divided by 1.1). Past that, each $1 at list price costs $1.10. Here is the same set of turns, on the same models, billed both ways.

Usage in a month, at list priceDirect API keyAutoRouter Pro, same models
$10$10$20 ($9 of included usage unused)
$50$50$55
$150$150$165

$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 AutoRouter 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.

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.

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 AutoRouter Pro's included usage runs out?

AutoRouter 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