Beta
Download

Subscription or API: which is cheaper for coding agents?

AutoRouter8 min read

A Claude or ChatGPT plan costs less than paying per token once a month of your coding would cost more than the plan at API list prices, and the plan's limits still hold that work. As of October 22, 2026, Anthropic reports that Claude Code costs about $13 per developer per active day, or $150 to $250 a month, at API prices across enterprise deployments, more than Claude Pro at $20 a month or Max 5x at $100. Neither provider publishes a token allowance for any plan, so check the break-even point against your own usage. AutoRouter, the Mac app for Codex and Claude Code, wrote this post; it uses the ChatGPT and Claude plans you already pay for first.

What do Claude and ChatGPT plans cost for coding?

As of October 22, 2026, Claude Pro and ChatGPT Plus each cost $20 a month, Claude Max costs $100 or $200, and ChatGPT Pro costs $100, $200 or $500.

PlanPrice (October 22, 2026)Coding agentWhat the provider publishes about usage
Claude Pro$20 a month, or $17 a month billed annuallyClaude CodeFive-hour and weekly limits; no fixed message count
Claude Max 5x$100 a monthClaude Code5× Pro's usage, plus a weekly limit
Claude Max 20x$200 a monthClaude Code20× Pro's usage, plus a weekly limit
ChatGPT Plus$20 a monthCodexEstimates per five hours, such as 15 to 160 GPT-6.1 Sol messages; weekly limits may apply
ChatGPT Pro 100$100 a monthCodexNo five-hour limit for now; no published allowance
ChatGPT Pro 200$200 a monthCodexMore than Pro 100
ChatGPT Pro 500$500 a monthCodexThe most of the three, with Ultrafast mode

Max 5x costs five times Pro's price for five times its usage, so it buys the same usage per dollar. Max 20x costs ten times Pro's price for 20 times its usage, twice as much per dollar. OpenAI publishes no such multiples for its Pro tiers. On Claude Pro, Claude Fable 5.1 runs on usage credits, so Fable work there bills at API rates from the first request. Day-to-day limits are covered in How Claude Code usage limits work and Codex usage limits.

What does the same work cost on the API?

On the API you pay per million tokens, and as of October 22, 2026 list prices run from $0.10 of input for Claude Haiku 5.5 and GPT-6 Luna up to $10 of input and $50 of output for Claude Fable 5.1 and GPT-6 Astra. Claude Code sends your full conversation with every request, so most input tokens are cache reads, which both providers price far below new input.

The table prices one assumed agent request: 45,000 cached input tokens, 5,000 new input tokens and 2,000 output tokens, thinking included. On Claude models the new tokens bill at the 5-minute cache-write rate. OpenAI's price list has no cache-write price, so on GPT models they bill at the input rate.

ModelInput / cached input / output, per million tokensOne assumed requestRequests for $20
Claude Fable 5.1$10 / $0.25 / $50$0.174115
Claude Opus 5.5$4 / $0.20 / $20$0.074270
Claude Sonnet 5.5$2 / $0.10 / $10$0.037540
Claude Haiku 5.5 (prompts up to 100,000 tokens)$0.10 / $0.01 / $0.50$0.00219,638
GPT-6 Astra (input up to 272,000 tokens)$10 / $1 / $50$0.195102
GPT-6.1 Sol (input up to 272,000 tokens)$2 / $0.10 / $10$0.0345579
GPT-6 Luna (input up to 272,000 tokens)$0.10 / $0.01 / $0.50$0.002010,256
Claude Opus 5.5, one assumed request, list prices as of October 22, 2026
  45,000 cached input  x  $0.20 per million  =  $0.009
   5,000 new input     x  $5.00 per million  =  $0.025  (5-minute cache write)
   2,000 output        x $20.00 per million  =  $0.040
  Total                                         $0.074

When does a plan beat per-token pricing?

A plan beats the API when the work you do inside its limits would cost more than the plan at list prices. At Anthropic's enterprise average of $13 per active day, Pro's $20 matches about 1.5 active days of Claude Code at API prices, Max 5x's $100 about 7.7 days and Max 20x's $200 about 15.4 days. A developer at that average who codes more than about 15 days a month would spend more on the API than on any Claude plan, provided the plan's limits hold those days.

Those limits are the open question, and Anthropic says costs vary widely by model, codebase size and usage pattern. To measure your own, use the Session block of /usage in Claude Code, which computes a session's dollar cost from token counts at list price. On Pro or Max that figure isn't your bill, so total it over a week and compare it with the plan's price.

When is the API the better deal?

The API costs less when a month of your work at list prices comes in under the plan's price, which is common with occasional use. At the assumed request size, $20 buys about 540 Claude Sonnet 5.5 requests or 579 GPT-6.1 Sol requests, and Claude Code sends a new request each time it uses a tool. The API also suits automation: OpenAI recommends API-key sign-in for Codex in shared environments like CI.

Codex with an API key runs in the CLI, SDK and IDE extension, without cloud features such as GitHub code review. Claude Code with a Claude Console account bills at standard API rates, separate from any Pro or Max plan.

What happens when you go past a plan's limits?

Past the limit, both providers bill extra work per use, so a heavy month costs the plan price plus the overflow. On Claude Pro and Max, usage credits bill at standard API rates, work in Claude Code and stop at any monthly spend limit you set. Max's monthly API credits can't be used in Claude Code, so they don't extend its coding limits. On ChatGPT Plus and Pro, you can buy credits once the included usage runs out. OpenAI doesn't publish a dollar price per credit; it says prices vary by account, region and plan.

Why should a router spend the plan first?

A router should spend the plan first because a request inside the plan's limits adds no cost, while the same request on the API or on credits costs its list price. Within the plan, hard work should come first, because quick work has a cheap substitute and hard work doesn't. At the assumed request size, a quick request moved to Claude Haiku 5.5 costs $0.0021 at list price, while a hard request that overflows to Claude Opus 5.5 at API rates costs $0.074, about 36 times as much. Anthropic doesn't publish how each model counts against plan limits, so this compares only what the work costs outside the plan.

AutoRouter follows that order. In Codex, OpenAI models run on the ChatGPT plan, and in Claude Code, Claude models run on the Claude plan. Hard work goes to the most capable model your plans cover, and to credits only when none is strong enough. Everything else goes to the model that costs you least, which is often your plan or a low-cost open model, and every turn shows its model, what it cost and why. The full order is in How AutoRouter picks a model.

As of October 22, 2026, AutoRouter Free costs $0 a month, and routing across your ChatGPT and Claude plans is free. AutoRouter Pro costs $20 a month with $20 of included usage and adds every other model, billed at the provider's price plus 10%, so the included $20 covers $18.18 at the provider's price. AutoRouter earns the 10% on paid models and nothing on plans. It runs on macOS 14 or later and is in beta.

Questions

Is Claude Max worth it over Pro?

Claude Max is worth it when you would otherwise spend more than the price difference on usage credits. As of October 22, 2026, Max 5x costs $80 a month more than Pro, so it pays off once your overflow at API rates passes $80 a month, if its limits hold that work. Max also lets Claude Fable models use up to half of its weekly limits.

Is ChatGPT Pro worth it for Codex?

ChatGPT Pro is worth it when Plus limits stop your Codex work, and OpenAI says Pro plans currently have no five-hour limit. New Pro 200 subscriptions get a lower allowance than earlier ones, so watch your usage dashboard for a week before you upgrade.

Is Claude Code using my plan or my API key?

Claude Code uses your API key whenever the ANTHROPIC_API_KEY environment variable is set, even if you are signed in to Pro or Max, and those requests bill at API rates. Remove the variable from your shell profile to put Claude Code back on your plan.

Can I use a coding agent without any subscription?

Yes. Claude Code and Codex both accept an API key billed per token. AutoRouter Pro also works without a ChatGPT or Claude plan: it gives every model, with $20 of included usage each month.

Sources