# Subscription or API: which is cheaper for coding agents?

Authors: AutoRouter
Published: 2026-10-23T02:20:02.599Z
Reading time: 8 min
Canonical: https://autorouter.com/blog/subscription-vs-api-pricing
Publisher: AutoRouter, the Mac app for Codex and Claude Code (https://autorouter.com)

> 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 Claude Code averaging $150 to $250 per developer per month at API prices across enterprise deployments, against $20 for Claude Pro and $100 or $200 for Max. AutoRouter, the Mac app for Codex and Claude Code, uses the ChatGPT and Claude plans you already pay for first and bills other models at the provider's price plus 10%.

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](https://code.claude.com/docs/en/costs), 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](https://autorouter.com), 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.

| Plan            | Price (October 22, 2026)                                                             | Coding agent | What the provider publishes about usage                                                   |
| --------------- | ------------------------------------------------------------------------------------ | ------------ | ----------------------------------------------------------------------------------------- |
| Claude Pro      | [$20 a month, or $17 a month billed annually](https://claude.com/pricing)            | Claude Code  | Five-hour and weekly limits; no fixed message count                                       |
| Claude Max 5x   | [$100 a month](https://support.claude.com/en/articles/11049741-what-is-the-max-plan) | Claude Code  | 5× Pro's usage, plus a weekly limit                                                       |
| Claude Max 20x  | [$200 a month](https://support.claude.com/en/articles/11049741-what-is-the-max-plan) | Claude Code  | 20× Pro's usage, plus a weekly limit                                                      |
| ChatGPT Plus    | [$20 a month](https://learn.chatgpt.com/docs/pricing)                                | Codex        | Estimates per five hours, such as 15 to 160 GPT-6.1 Sol messages; weekly limits may apply |
| ChatGPT Pro 100 | [$100 a month](https://help.openai.com/en/articles/9793128-about-chatgpt-pro-tiers)  | Codex        | No five-hour limit for now; no published allowance                                        |
| ChatGPT Pro 200 | [$200 a month](https://help.openai.com/en/articles/9793128-about-chatgpt-pro-tiers)  | Codex        | More than Pro 100                                                                         |
| ChatGPT Pro 500 | [$500 a month](https://help.openai.com/en/articles/9793128-about-chatgpt-pro-tiers)  | Codex        | The 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](https://claude.com/pricing), 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](/blog/claude-code-usage-limits) and [Codex usage limits](/blog/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](https://code.claude.com/docs/en/costs), 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](https://platform.claude.com/docs/en/about-claude/pricing). [OpenAI's price list](https://developers.openai.com/api/docs/pricing) has no cache-write price, so on GPT models they bill at the input rate.

| Model                                           | Input / cached input / output, per million tokens | One assumed request | Requests for $20 |
| ----------------------------------------------- | ------------------------------------------------- | ------------------- | ---------------- |
| Claude Fable 5.1                                | $10 / $0.25 / $50                                 | $0.174              | 115              |
| Claude Opus 5.5                                 | $4 / $0.20 / $20                                  | $0.074              | 270              |
| Claude Sonnet 5.5                               | $2 / $0.10 / $10                                  | $0.037              | 540              |
| Claude Haiku 5.5 (prompts up to 100,000 tokens) | $0.10 / $0.01 / $0.50                             | $0.0021             | 9,638            |
| GPT-6 Astra (input up to 272,000 tokens)        | $10 / $1 / $50                                    | $0.195              | 102              |
| GPT-6.1 Sol (input up to 272,000 tokens)        | $2 / $0.10 / $10                                  | $0.0345             | 579              |
| GPT-6 Luna (input up to 272,000 tokens)         | $0.10 / $0.01 / $0.50                             | $0.0020             | 10,256           |

```text
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](https://code.claude.com/docs/en/costs) 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](https://code.claude.com/docs/en/costs). The API also suits automation: OpenAI recommends API-key sign-in for Codex [in shared environments like CI](https://learn.chatgpt.com/docs/pricing).

[Codex with an API key](https://learn.chatgpt.com/docs/pricing) runs in the CLI, SDK and IDE extension, without cloud features such as GitHub code review. Claude Code with a [Claude Console account](https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan) 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](https://support.claude.com/en/articles/12429409-manage-usage-credits-for-paid-claude-plans) 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](https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan), so they don't extend its coding limits. On ChatGPT Plus and Pro, you can [buy credits](https://help.openai.com/en/articles/12642688-using-credits-for-flexible-usage-in-chatgpt-personal-plans) 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](/blog/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](https://claude.com/pricing).

### 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](https://learn.chatgpt.com/docs/pricing). New Pro 200 subscriptions [get a lower allowance](https://help.openai.com/en/articles/9793128-about-chatgpt-pro-tiers) 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](https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan), 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

- [Plans and pricing](https://claude.com/pricing), Anthropic, checked October 22, 2026
- [What is the Max plan?](https://support.claude.com/en/articles/11049741-what-is-the-max-plan), Claude Help Center
- [Use Claude Code with your Pro or Max plan](https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan), Claude Help Center
- [Manage usage credits for paid Claude plans](https://support.claude.com/en/articles/12429409-manage-usage-credits-for-paid-claude-plans), Claude Help Center
- [Pricing](https://platform.claude.com/docs/en/about-claude/pricing), Claude Platform docs
- [Manage costs effectively](https://code.claude.com/docs/en/costs), Claude Code docs
- [Pricing](https://learn.chatgpt.com/docs/pricing), Codex, OpenAI
- [About ChatGPT Pro tiers](https://help.openai.com/en/articles/9793128-about-chatgpt-pro-tiers), OpenAI Help Center
- [Using credits for flexible usage in ChatGPT](https://help.openai.com/en/articles/12642688-using-credits-for-flexible-usage-in-chatgpt-personal-plans), OpenAI Help Center
- [API pricing](https://developers.openai.com/api/docs/pricing), OpenAI

## Read next

- [How to use Claude Code and Codex without a subscription](https://autorouter.com/blog/no-subscription-coding-agents.md): Claude Code runs on a Claude Console account and Codex runs on an OpenAI API key, and both bill per token with no ChatGPT or Claude plan. AutoRouter, the Mac app for Codex and Claude Code, is a third option: AutoRouter Pro costs $20 a month with $20 of included usage 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.
- [How do Codex and Claude Code compare, and can you use both?](https://autorouter.com/blog/codex-vs-claude-code.md): As of October 2026, Codex is OpenAI's coding agent, included with every ChatGPT plan, and Claude Code is Anthropic's, included with every paid Claude plan; ChatGPT Plus and Claude Pro both cost $20 a month. They overlap on most features, so the choice comes down to the models you prefer (GPT-6.1 Sol and GPT-6 Luna, or Claude Opus 5.5, Sonnet 5.5 and Haiku 5.5) and the plan you already pay for, and both can share one AGENTS.md in the same repository. AutoRouter, the Mac app for Codex and Claude Code, works in both and picks a model for each turn by how hard it is.
- [Codex usage limits explained, and what to do when you run out](https://autorouter.com/blog/codex-usage-limits.md): As of October 2026, OpenAI estimates that ChatGPT Plus and standard Business seats get 15 to 160 local Codex messages on GPT-6.1 Sol per five-hour window, with weekly limits that may also apply, while ChatGPT Pro has no five-hour limit and no published message counts. At the limit, Codex finishes the turn it is on, and then you can wait for the reset, buy ChatGPT credits, upgrade, or sign in with an API key at API rates. AutoRouter, the Mac app for Codex and Claude Code, picks the model for each Codex turn so the ChatGPT plan goes to the work that needs it.

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

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