---
title: "Claude Code pricing: plans, API costs, and usage limits"
type: "guide"
url: "https://aifordevs.org/articles/claude-code-pricing"
markdown: "https://aifordevs.org/articles/claude-code-pricing.md"
publisher: "AI for Devs"
license: "https://aifordevs.org/reuse"
attribution: "Credit AI for Devs and link to https://aifordevs.org/articles/claude-code-pricing"
description: "Claude Code pricing as of November 16, 2026: Pro, Max, Ultra, Team, and Enterprise plans, how usage limits reset, API billing, and tested session costs."
author: "AI for Devs"
published: "2026-11-16"
level: "Intermediate"
topics: ["coding-agents", "apis"]
---

# Claude Code pricing: plans, API costs, and usage limits

Claude Code pricing as of November 16, 2026: Pro, Max, Ultra, Team, and Enterprise plans, how usage limits reset, API billing, and tested session costs.

> **TL;DR**
>
> - Claude Code pricing as of November 16, 2026: Pro costs $20 a month ($17 billed annually), Max $100, and Ultra $200, and all three charge the same $20 for each 1x of Pro weekly usage.
> - On API billing, this guide's tested calculator prices a 60-request Opus 5.5 session at $3.99 and a 200-request one at $27.33, because every request rereads the whole cached conversation.
> - Running `/clear` every 50 requests cuts that 200-request session to $14.12, and Sonnet 5.5 costs half of Opus 5.5 at every session length.
> - Plan limits reset on a 5-hour window that starts with your first message and a weekly window at a fixed time per account; verified Ultra accounts have no 5-hour limit.
> - The $100 to $500 of monthly API credits bundled with Max, Ultra, and Team cannot pay for Claude Code.

Claude Code pricing takes two forms: a Claude subscription whose usage limits reset every 5 hours and every week, or per-token API billing through the Claude Console. Anthropic changed both in the past month, renaming Max 20x to Ultra and dropping its 5-hour limit for verified accounts, then shipping Claude Fable 5.2 at lower per-token rates on November 9. Every price and limit here was read from Anthropic's own pages on November 16, 2026. The session estimates come from a TypeScript calculator that reproduces Anthropic's own `/usage` example to the cent.

## Claude Code pricing by plan

Every paid Claude plan includes Claude Code, and the individual plans scale in a straight line: Pro costs $20 a month for 1x usage, Max $100 for 5x, and Ultra $200 for 10x weekly usage. Team and Enterprise sell seats. The table follows [Anthropic's pricing page](https://claude.com/pricing) as of November 16, 2026.

> **Prices last checked**
>
> Prices last checked November 16, 2026, on claude.com/pricing and Anthropic's help center. Usage credits bought on or after December 7, 2026 expire 12 months after purchase; earlier purchases do not expire.

| Plan | Monthly price | Usage | Fable in Claude Code | Monthly API credits |
| --- | --- | --- | --- | --- |
| Free | $0 | No Claude Code | No | None |
| Pro | $20, or $17 billed annually | 1x | Usage credits | None |
| Max | $100, monthly only | 5x Pro, 5-hour and weekly | Up to 50% of weekly limit | $100 |
| Ultra | $200, monthly only | 10x Pro weekly, no 5-hour limit once verified | Up to 50% of weekly limit | $200 |
| Team standard seat | $25, or $20 billed annually | More than Pro, no multiple published | Not listed | Up to $500 pooled |
| Team premium seat | $125, or $100 billed annually | 5x a standard seat | Up to 50% of weekly limit | Same pool |
| Enterprise | $20 per seat billed annually, 20-seat minimum | Billed at API rates | Included | None |

Team covers 2 to 150 people, and [every Team seat includes Claude Code](https://support.claude.com/en/articles/11845131-use-claude-code-with-your-team-or-enterprise-plan). The [Ultra help article](https://support.claude.com/en/articles/17728952-what-is-the-ultra-plan) confirms that the old Max 20x plan is now Ultra at the same price.

**Figure 1.** Pro, Max, and Ultra all charge $20 a month for each 1x of Pro weekly usage. An upgrade buys headroom, the Fable allowance, and on verified Ultra accounts the end of the 5-hour window, not a lower unit price.

The monthly API credits on Max, Ultra, and Team [cannot be used in Claude Code](https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-max-or-ultra-plan) or the Claude apps. An `ANTHROPIC_API_KEY` in your shell also replaces your subscription login and bills API rates, so check `/status` after you log in.

## Claude Code usage limits and how they reset

Paid plans meter Claude Code against two windows shared with claude.ai and Claude Desktop: a 5-hour session limit and a weekly limit. The 5-hour clock starts with your first message and refills in full five hours later. The weekly limit resets at a fixed day and time assigned to your account, shown in Settings > Usage.

Anthropic publishes multiples, not token counts, and its [usage limits article](https://support.claude.com/en/articles/11647753-how-do-usage-and-length-limits-work) says the weekly limit covers all models. Max and Ultra add a separate weekly limit for Fable. Verified Ultra accounts have no 5-hour limit; an Ultra account still under verification shows a "Current session" bar.

At a limit, you can:

1. Let the current step finish. The wrap-up allowance applies once per weekly period on Pro and at each 5-hour limit on Max.
2. Turn on usage credits, billed at standard API rates up to a monthly spend limit you set.
3. Wait for the reset. On v2.1.234 or later, `/rate-limit-options` can wait and resume the interrupted task.
4. Switch models if the message names one family, such as "You've hit your Opus limit". A session or weekly limit covers every model.

Fast mode never draws on plan limits. On every subscription it bills to usage credits, even when plan usage remains.

## Claude Code API billing through the Claude Console

With an API key, Claude Code bills every token at Claude API rates and has no 5-hour or weekly limit, only your organization's rate and spend limits. Opus 5.5 is the default model on the Anthropic API. The full rate card is in the [Claude API pricing guide](https://aifordevs.org/articles/claude-api-pricing); the four models used most in Claude Code are below, per million tokens as of November 16, 2026.

| Model | Input | 5-minute cache write | Cache read | Output | Fast mode input and output |
| --- | --- | --- | --- | --- | --- |
| Fable 5.2 | $8 | $10 | $0.20 | $40 | $16 and $80 |
| Opus 5.5 | $4 | $5 | $0.20 | $20 | $8 and $40 |
| Sonnet 5.5 | $2 | $2.50 | $0.10 | $10 | Not offered |
| Haiku 5.5, 5x on prompts over 100,000 tokens | $0.10 | $0.125 | $0.01 | $0.50 | Not offered |

Fable 5.2 runs in Claude Code with `/model fable` on [v2.1.321 or later](https://code.claude.com/docs/en/model-config) and costs $8 and $40, against $10 and $50 for Fable 5.1; its cache reads cost the same $0.20 as Opus 5.5. The [LLM pricing dataset](https://aifordevs.org/data/llm-pricing) tracks these rates.

Signing Claude Code in to a Console account creates a workspace named "Claude Code" for all of its usage. Its spend limit and rate limit keep Claude Code from exhausting limits production traffic needs, and the Console's Claude Code dashboard shows spend per member. [Anthropic recommends](https://code.claude.com/docs/en/costs) per-user rate limits that fall as a team grows, since fewer people run sessions at once:

| Team size | Tokens per minute per user | Requests per minute per user |
| --- | --- | --- |
| 1 to 5 users | 200,000 to 300,000 | 5 to 7 |
| 5 to 20 users | 100,000 to 150,000 | 2.5 to 3.5 |
| 20 to 50 users | 50,000 to 75,000 | 1.25 to 1.75 |
| 50 to 100 users | 25,000 to 35,000 | 0.62 to 0.87 |
| 100 to 500 users | 15,000 to 20,000 | 0.37 to 0.47 |
| 500+ users | 10,000 to 15,000 | 0.25 to 0.35 |

[Prompt caching](https://aifordevs.org/glossary#prompt-caching) also changes on the API. Within plan usage, Claude Code requests a 1-hour cache for the main conversation; with an API key, usage credits, or a cloud provider it [defaults to 5 minutes](https://code.claude.com/docs/en/prompt-caching), so any break longer than that rewrites the whole conversation.

## Claude Code cost per session on API billing

A 60-request Opus 5.5 session that grows to 255,000 tokens costs $3.99 on API billing, and a 200-request session that grows to 921,000 tokens costs $27.33. Cost rises faster than length because every request resends the whole conversation and pays a cache read on it.

The token shapes are assumptions. Each session starts at 25,000 tokens of system prompt, tools, and CLAUDE.md, and each request adds its output, thinking included, plus a tool result: 600 and 2,000 tokens for the quick fix, 900 and 3,000 for the feature session, and 1,000 and 3,500 for the long run, all inside the 5-minute cache window.

| Session | Requests | Final prompt | Opus 5.5 | Sonnet 5.5 | Haiku 5.5 | Fable 5.2 | Opus 5.5 fast |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Quick fix | 12 | 54K | $0.50 | $0.25 | $0.01 | $0.91 | $0.99 |
| Feature | 60 | 255K | $3.99 | $1.99 | $0.57 | $6.34 | $7.97 |
| Long run | 200 | 921K | $27.33 | $13.66 | $5.64 | $35.93 | $54.66 |

Cache reads are $18.73 of the long run's $27.33 on Opus 5.5, or 69%. Both Fable 5.2 and Opus 5.5 read cache at $0.20 per million tokens, so Fable 5.2 costs 59% more on the feature session and only 31% more on the long run. Fast mode doubles every line. Haiku 5.5 crosses its 100,000-token tier at request 21 of the feature session, so 40 of its 60 requests bill at five times the base rate.

**Figure 2.** On Opus 5.5, a request late in a 200-request session costs $0.23, mostly rereading 916,000 cached tokens, and the session totals $27.33. Clearing every 50 requests keeps each request under $0.10 and the total at $14.12.

Two checks tie the model to Anthropic's numbers. The [costs page](https://code.claude.com/docs/en/costs) shows a `/usage` example of a Sonnet 4.6 session at $0.55, and the calculator returns $0.5526 for the same tokens ($0.55 on Opus 5.5 and $0.27 on Sonnet 5.5 at current rates). And two feature sessions plus three quick fixes on Opus 5.5 cost $9.46 a day, or $198.60 over 21 working days. Anthropic reports about $13 per developer per active day and $150 to $250 per month across enterprise deployments, with 90% of users under $30 a day.

## A tested Claude Code cost calculator

The calculator prices a session from the token counts that `/usage` and the API's `usage` object report. It applies both cache write multipliers, each model's cache read multiplier, and the Haiku 5.5 long-prompt tier. It ran on Node 26.12.1 with no dependencies and no network calls.

```ts title="claude-code-bill.ts"
// claude-code-bill.ts: price Claude Code sessions billed per token through an API key.
// Rates are USD per 1M tokens from Anthropic's pricing page, read November 16, 2026.
type Rate = { input: number; output: number; read: number; longAt?: number; longMult?: number };

export const MODELS: Record<string, Rate> = {
  "fable-5.2": { input: 8, output: 40, read: 0.025 },
  "opus-5.5": { input: 4, output: 20, read: 0.05 },
  "opus-5.5-fast": { input: 8, output: 40, read: 0.05 }, // fast mode; cache multipliers still apply
  "sonnet-5.5": { input: 2, output: 10, read: 0.05 },
  "haiku-5.5": { input: 0.1, output: 0.5, read: 0.1, longAt: 100_000, longMult: 5 },
  "sonnet-4.6": { input: 3, output: 15, read: 0.1 },
};

export type Usage = { input?: number; output: number; read?: number; write5m?: number; write1h?: number };
type Lines = { input: number; writes: number; reads: number; output: number };

export function bill(model: string, u: Usage) {
  const m = MODELS[model];
  if (!m) throw new Error(`Unknown model: ${model}`);
  const { input = 0, read = 0, write5m = 0, write1h = 0 } = u;
  // Haiku 5.5 reprices the whole request, cached tokens included, above 100K prompt tokens.
  const tier = m.longAt && input + read + write5m + write1h > m.longAt ? m.longMult! : 1;
  const usd = (tokens: number, perM: number) => (tokens * perM * tier) / 1e6;
  const lines: Lines = {
    input: usd(input, m.input),
    writes: usd(write5m, m.input * 1.25) + usd(write1h, m.input * 2),
    reads: usd(read, m.input * m.read),
    output: usd(u.output, m.output),
  };
  return { lines, total: lines.input + lines.writes + lines.reads + lines.output };
}

// A Claude Code session: every request resends the whole conversation. The prefix the
// previous request cached is read back; the new assistant turn and tool result are written.
export type Shape = {
  requests: number;
  base: number; // system prompt, tool definitions, CLAUDE.md, and the first prompt
  out: number; // output per request, thinking included
  tool: number; // tool result or user message added after each request
  ttl?: "5m" | "1h";
  breaks?: number[]; // requests that follow an idle gap longer than 5 minutes and shorter than 1 hour
};

export function session(model: string, s: Shape) {
  const ttl = s.ttl ?? "5m";
  const sum: Lines = { input: 0, writes: 0, reads: 0, output: 0 };
  const perRequest: number[] = [];
  let prompt = s.base;
  let cached = 0;
  for (let r = 1; r <= s.requests; r++) {
    const expired = ttl === "5m" && (s.breaks ?? []).includes(r);
    const read = expired ? 0 : cached;
    const fresh = prompt - read;
    const u: Usage = { output: s.out, read, [ttl === "5m" ? "write5m" : "write1h"]: fresh };
    const { lines, total } = bill(model, u);
    for (const k of Object.keys(sum) as (keyof Lines)[]) sum[k] += lines[k];
    perRequest.push(total);
    cached = prompt;
    prompt += s.out + s.tool;
  }
  const total = sum.input + sum.writes + sum.reads + sum.output;
  return { lines: sum, total, finalPrompt: cached, perRequest };
}

// Token shapes are assumptions, not measurements.
export const SHAPES = {
  quickFix: { requests: 12, base: 25_000, out: 600, tool: 2_000 },
  feature: { requests: 60, base: 25_000, out: 900, tool: 3_000 },
  longRun: { requests: 200, base: 25_000, out: 1_000, tool: 3_500 },
} satisfies Record<string, Shape>;

const $ = (n: number, d = 2) => `$${n.toFixed(d)}`;
const k = (n: number) => `${Math.round(n / 1000)}K`;

if (import.meta.main) {
  // 1. Anthropic's own /usage example: Sonnet 4.6, 1.2k input, 5.3k output, 940k read, 50k write, shown as $0.55.
  const example: Usage = { input: 1_200, output: 5_300, read: 940_000, write5m: 50_000 };
  console.log("Anthropic /usage example");
  for (const model of ["sonnet-4.6", "opus-5.5", "sonnet-5.5", "fable-5.2"]) {
    const r = bill(model, example);
    console.log(`  ${model.padEnd(13)} ${$(r.total, 4)}  reads ${$(r.lines.reads, 4)}  writes ${$(r.lines.writes, 4)}  output ${$(r.lines.output, 4)}`);
  }

  console.log("\nSession shapes, 5-minute cache, no breaks");
  for (const [name, shape] of Object.entries(SHAPES)) {
    const final = shape.base + (shape.requests - 1) * (shape.out + shape.tool);
    console.log(`  ${name}: ${shape.requests} requests, prompt grows to ${k(final)}`);
    for (const model of ["opus-5.5", "sonnet-5.5", "haiku-5.5", "fable-5.2", "opus-5.5-fast"]) {
      const r = session(model, shape);
      const l = r.lines;
      console.log(
        `    ${model.padEnd(13)} ${$(r.total).padStart(7)}  writes ${$(l.writes).padStart(6)}  reads ${$(l.reads).padStart(6)}  output ${$(l.output).padStart(6)}`,
      );
    }
  }

  console.log("\nLong run on Opus 5.5: one session against /clear every 50 requests");
  const one = session("opus-5.5", SHAPES.longRun);
  const quarter = session("opus-5.5", { ...SHAPES.longRun, requests: 50 });
  console.log(`  one 200-request session   ${$(one.total)}`);
  console.log(`  four 50-request sessions  ${$(quarter.total * 4)}`);
  console.log(`  last request alone        ${$(one.perRequest.at(-1)!, 4)}  first request ${$(one.perRequest[0], 4)}`);

  console.log("\nFeature session on Opus 5.5 with 20-minute breaks");
  for (const breaks of [[], [31], [21, 41]]) {
    const five = session("opus-5.5", { ...SHAPES.feature, breaks });
    const hour = session("opus-5.5", { ...SHAPES.feature, ttl: "1h", breaks });
    console.log(`  ${breaks.length} break(s): 5-minute TTL ${$(five.total)}  1-hour TTL ${$(hour.total)}`);
  }

  // Fast mode keeps its own cache, so turning it on rewrites the whole context once.
  const toggle = bill("opus-5.5-fast", { write5m: 200_000, output: 0 }).total;
  console.log(`\nTurning on fast mode at a 200K-token context on Opus 5.5: ${$(toggle)}`);

  const day = 2 * session("opus-5.5", SHAPES.feature).total + 3 * session("opus-5.5", SHAPES.quickFix).total;
  console.log(`\nOne active day on Opus 5.5 (2 feature + 3 quick-fix sessions): ${$(day)}`);
  console.log(`  21 active days: ${$(day * 21)}`);

  console.log("\nSubscription price per 1x of Pro weekly usage (monthly billing)");
  for (const [plan, price, mult] of [["Pro", 20, 1], ["Max", 100, 5], ["Ultra", 200, 10]] as const) {
    console.log(`  ${plan.padEnd(6)} $${price}/month, ${mult}x weekly: ${$(price / mult)} per 1x`);
  }
}
```

Run it with `node claude-code-bill.ts`. This is the real output:

```text
Anthropic /usage example
  sonnet-4.6    $0.5526  reads $0.2820  writes $0.1875  output $0.0795
  opus-5.5      $0.5488  reads $0.1880  writes $0.2500  output $0.1060
  sonnet-5.5    $0.2744  reads $0.0940  writes $0.1250  output $0.0530
  fable-5.2     $0.9096  reads $0.1880  writes $0.5000  output $0.2120

Session shapes, 5-minute cache, no breaks
  quickFix: 12 requests, prompt grows to 54K
    opus-5.5        $0.50  writes  $0.27  reads  $0.08  output  $0.14
    sonnet-5.5      $0.25  writes  $0.13  reads  $0.04  output  $0.07
    haiku-5.5       $0.01  writes  $0.01  reads  $0.00  output  $0.00
    fable-5.2       $0.91  writes  $0.54  reads  $0.08  output  $0.29
    opus-5.5-fast   $0.99  writes  $0.54  reads  $0.17  output  $0.29
  feature: 60 requests, prompt grows to 255K
    opus-5.5        $3.99  writes  $1.28  reads  $1.63  output  $1.08
    sonnet-5.5      $1.99  writes  $0.64  reads  $0.81  output  $0.54
    haiku-5.5       $0.57  writes  $0.11  reads  $0.36  output  $0.10
    fable-5.2       $6.34  writes  $2.55  reads  $1.63  output  $2.16
    opus-5.5-fast   $7.97  writes  $2.55  reads  $3.26  output  $2.16
  longRun: 200 requests, prompt grows to 921K
    opus-5.5       $27.33  writes  $4.60  reads $18.73  output  $4.00
    sonnet-5.5     $13.66  writes  $2.30  reads  $9.36  output  $2.00
    haiku-5.5       $5.64  writes  $0.53  reads  $4.64  output  $0.47
    fable-5.2      $35.93  writes  $9.20  reads $18.73  output  $8.00
    opus-5.5-fast  $54.66  writes  $9.20  reads $37.45  output  $8.00

Long run on Opus 5.5: one session against /clear every 50 requests
  one 200-request session   $27.33
  four 50-request sessions  $14.12
  last request alone        $0.2257  first request $0.1450

Feature session on Opus 5.5 with 20-minute breaks
  0 break(s): 5-minute TTL $3.99  1-hour TTL $4.75
  1 break(s): 5-minute TTL $4.65  1-hour TTL $4.75
  2 break(s): 5-minute TTL $5.31  1-hour TTL $4.75

Turning on fast mode at a 200K-token context on Opus 5.5: $2.00

One active day on Opus 5.5 (2 feature + 3 quick-fix sessions): $9.46
  21 active days: $198.60

Subscription price per 1x of Pro weekly usage (monthly billing)
  Pro    $20/month, 1x weekly: $20.00 per 1x
  Max    $100/month, 5x weekly: $20.00 per 1x
  Ultra  $200/month, 10x weekly: $20.00 per 1x
```

No Claude Code session or Claude request ran for this guide, so only the arithmetic is tested. The model leaves out compaction, subagents (which keep their own 5-minute cache), and the 1.1x US-only inference multiplier. To price your own work, swap in the token counts from `/usage`.

## Subscription or API: which plan to pick

Pick a subscription if you use Claude Code most working days and your week fits inside its limits. Pick API billing if you use it rarely, run it unattended, or need a hard dollar cap per developer. The tested day of Opus 5.5 work comes to $9.46 on the API, about $199 over 21 working days, against $100 for Max and $200 for Ultra.

Anthropic does not publish limits in tokens, so no calculator can say whether that day fits in Max. Run a week on your current plan and watch the weekly bar in `/usage`; if Pro's bar runs out by midweek, Max is the next step at the same unit price.

| Your situation | Pick | Why |
| --- | --- | --- |
| A few sessions a week | Pro, or the API | A quick fix costs $0.50 on Opus 5.5, so under 40 a month the API costs less than Pro |
| Daily coding, one session at a time | Max at $100 | 5x Pro at the same $20 per 1x, Fable included |
| Parallel sessions or long agent runs | Ultra at $200 | 10x Pro weekly, no 5-hour window once verified |
| Heavy Fable 5.2 use | Max or Ultra | Fable can use half the weekly limit; Pro pays API rates for it |
| A team of 2 to 150 | Team, premium seats for heavy users | Seats cap the bill; usage credits take per-member spend limits |
| CI jobs or a hard cap per person | API key through the Console | Workspace spend limits, `--max-budget-usd`, no seat fee |
| A large organization buying centrally | Enterprise | $20 a seat plus API-rate usage, about $219 a month at the tested day |

Fable 5.2's launch post added extra Fable usage for launch week on Pro and Team standard seats, but on November 16 the pricing page lists Pro as paying for Fable with usage credits. Model choice beyond price is covered in [the best LLM for coding](https://aifordevs.org/articles/best-llm-for-coding).

## See Claude Code usage and cost from inside the CLI

Run `/usage`, or its aliases `/cost` and `/stats`, for the session's tokens and estimated cost, plus plan usage bars on a subscription. `/status` shows whether the session bills to a subscription or an API key.

The Session block in `/usage` is computed locally at list price and resets when `/clear` starts a new session; subscribers can ignore its dollar figure. On v2.1.251 or later it adds a "Prompt cache (main)" line with the share of input served from cache. Subscribers also get a breakdown that attributes recent usage to skills, subagents, plugins, and MCP servers, with a recommendation for any behavior behind 10% or more of it. On v2.1.305 or later, pressing `f` applies the fixes Claude Code can make.

For a constant readout, the status line receives JSON with `cost.total_cost_usd`, `rate_limits.five_hour.used_percentage`, `rate_limits.seven_day.used_percentage`, and `prompt_cache.hit_ratio` after each response. The `rate_limits` fields appear only for Pro, Max, and Ultra subscribers. This script prints whichever fields are present:

```bash title="statusline-cost.sh"
#!/bin/bash
# Prints the session's estimated cost, plus plan usage when Claude Code sends it.
jq -r '
  "\(.model.display_name) · $\(.cost.total_cost_usd // 0 | . * 100 | round / 100)"
  + (if .rate_limits.five_hour then " · 5h \(.rate_limits.five_hour.used_percentage | round)%" else "" end)
  + (if .rate_limits.seven_day then " · 7d \(.rate_limits.seven_day.used_percentage | round)%" else "" end)
  + (if .prompt_cache.hit_ratio then " · cache \(.prompt_cache.hit_ratio * 100 | round)%" else "" end)
'
```

Fed sample input shaped like the example in Anthropic's [status line docs](https://code.claude.com/docs/en/statusline), it printed `Opus 5.5 · $3.99 · 5h 24% · 7d 41% · cache 91%` with jq 1.7.1, and `Sonnet 5.5 · $0.01` for an API-key session with no `rate_limits`. Registering it in `~/.claude/settings.json` was not run, since this guide changes no user configuration:

```json title="~/.claude/settings.json (not run)"
{
  "statusLine": { "type": "command", "command": "~/.claude/statusline-cost.sh" }
}
```

For unattended runs, `claude -p --max-budget-usd 5.00 "..."` stops a print-mode run once estimated spend reaches the cap, subagents included. Organizations on contracted rates can set the `modelPricing` managed setting so `/usage`, the status line, and OpenTelemetry report those rates.

## Cutting Claude Code cost

Shorter sessions save the most, because cache reads grow with every request. In the tested 200-request run, clearing every 50 requests cuts the Opus 5.5 bill from $27.33 to $14.12, and Sonnet 5.5 halves either figure. In order of effect:

1. Run `/clear` between unrelated tasks, after `/rename` so `/resume` can find the session. Models with a 1M-token [context window](https://aifordevs.org/glossary#context-window) auto-compact only near 967,000 tokens by default, so a session left open all day keeps rereading everything.
2. Match the model to the job: Sonnet 5.5 for most coding, Opus 5.5 for hard planning, and `model: haiku` for simple subagents, with Haiku 5.5 prompts kept under 100,000 tokens.
3. Choose the model and fast mode at the start. A model switch rereads the whole conversation without cache, and turning on fast mode at a 200,000-token context costs $2.00 on Opus 5.5 before it doubles every later token.
4. On the API, set `promptCacheTtl` to `1h` only if sessions break for 5 to 60 minutes twice or more. The tested feature session costs $3.99 on the 5-minute cache and $4.75 on the 1-hour cache; with two 20-minute breaks, the order flips to $5.31 and $4.75.
5. Shrink the prefix every request rereads: CLAUDE.md under 200 lines, workflow instructions moved into skills, unused MCP servers off, and hooks that trim test output. The [context engineering guide](https://aifordevs.org/articles/context-engineering) covers what belongs there.
6. Lower `/effort` for routine work. Thinking bills as output, and Opus 5.5, Sonnet 5.5, Haiku 5.5, and the Fable models cannot turn thinking off; all four default to `medium` effort in Claude Code.
7. Keep agent teams small. Anthropic says they use about 7x more tokens than a standard session when teammates run in plan mode.

## Control team Claude Code spend with an AI gateway

On API keys, Claude Code's own controls stop at one Console workspace with one spend limit and one rate limit for everyone. An [AI gateway](https://aifordevs.org/glossary#ai-gateway) in front of Anthropic gives each developer a key with its own budget, rate limit, model routing, and cost log.

[Bifrost](https://www.getmaxim.ai), an [open-source AI gateway](https://github.com/maximhq/bifrost), connects to Claude Code through an Anthropic-compatible `/anthropic` endpoint. Each developer sets `ANTHROPIC_BASE_URL` to that endpoint and `ANTHROPIC_AUTH_TOKEN` to a personal virtual key, which [Claude Code sends as a bearer token](https://docs.getbifrost.ai/cli-agents/claude-code). This configuration was not run:

```json title="~/.claude/settings.json (not run)"
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://bifrost.example.com/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "sk-bf-your-virtual-key"
  }
}
```

**Figure 3.** Each developer's Claude Code sends its own virtual key. Bifrost checks that key's budget and rate limit before the call, applies routing rules, and logs tokens and cost from each response.

| Team need | How Bifrost handles it |
| --- | --- |
| A dollar cap per developer | A budget on each [virtual key](https://docs.getbifrost.ai/features/governance/virtual-keys), resetting daily to yearly; a spent key gets HTTP 402 |
| Protect shared rate limits | [Token and request limits](https://docs.getbifrost.ai/features/governance/budget-and-limits) per key, team, or customer; excess gets HTTP 429 |
| Cap expensive models | [Model limits](https://docs.getbifrost.ai/features/governance/model-limits) per key, such as a daily Fable 5.2 budget |
| Steer model choice | [Routing rules](https://docs.getbifrost.ai/providers/routing-rules) in CEL match Claude Code's `user-agent` and can retarget once `budget_used` passes a threshold |
| Keep the prompt cache warm | [Session affinity](https://docs.getbifrost.ai/providers/session-affinity) keeps a session and its subagents on one provider key |
| See cost per developer | [Logs](https://docs.getbifrost.ai/features/observability/default) record tokens, cost, and latency per request, grouped by session |

A $250 monthly budget per key matches the top of Anthropic's reported $150 to $250 range. Bifrost forwards the `cache_control` markers Claude Code sends [unchanged](https://docs.getbifrost.ai/features/prompt-caching). Anthropic's docs warn that a gateway which strips them bills the whole conversation as uncached input on every turn.

Subscription teams can keep plan billing and still route through the gateway by signing in with `/login` and sending the virtual key in an `x-bf-vk` header; the plan's usage limits still apply. On Bifrost Enterprise, the Bifrost CLI signs developers in through the company identity provider and hands Claude Code a short-lived token through `apiKeyHelper`, and [access profiles](https://docs.getbifrost.ai/enterprise/access-profiles) give each user their own budget and rate-limit counters.

Claude Code runs on employee laptops, where any developer can unset `ANTHROPIC_BASE_URL` or paste a personal API key. Bifrost keeps [governance](https://www.getmaxim.ai/resources/governance) and security controls such as virtual keys, budgets, guardrails, and audit logs at the gateway, and [Bifrost Edge](https://www.getmaxim.ai/edge) extends them to each machine. Edge routes traffic from the Claude Code CLI through the gateway with no per-app setup, per its [supported applications](https://docs.getbifrost.ai/edge/supported-applications) list, and requires the Bifrost Enterprise gateway, priced per endpoint. The Bifrost details here reflect its docs as of November 16, 2026; more Claude Code guides are under the [coding agents topic](https://aifordevs.org/topics/coding-agents).

## Questions

### Is Claude Code free?

No. The Free Claude plan does not include Claude Code, so a session needs a paid plan or an API key. As of November 16, 2026, the cheapest plan with Claude Code is Pro at $20 a month, or $17 a month billed annually. API billing through the Claude Console has no monthly fee and charges only for the tokens you use.

### How much does Claude Code cost per month?

As of November 16, 2026, Claude Code costs $20 a month on Pro, $100 on Max, and $200 on Ultra, with Team seats at $25 or $125 billed monthly. On API billing, Anthropic reports an average of about $13 per developer per active day and $150 to $250 per developer per month across enterprise deployments.

### Is Claude Code cheaper on a subscription or the API?

A subscription is cheaper whenever your week fits inside its limits. The tested model in this guide prices a typical day of Opus 5.5 work at $9.46 on the API, about $199 over 21 working days, against $100 for Max. The API is cheaper for light or irregular use and suits CI jobs and teams that need hard per-user caps.

### When do Claude Code usage limits reset?

The 5-hour session limit starts with your first message and resets in full five hours later. The weekly limit resets at a fixed day and time assigned to your account, shown under Settings > Usage. Verified Ultra accounts have no 5-hour limit, and Max and Ultra also carry a separate weekly limit for Fable models.

### Can I use the API credits from Max, Ultra, or Team in Claude Code?

No. Anthropic's help center says the monthly API credits included with Max, Ultra, and Team plans cannot be used in Claude Code or the Claude apps, including for usage past your plan limits. They pay for Claude Platform API calls from your own code. Usage credits are a separate balance, billed at standard API rates.

### Can Claude Code use Claude Fable 5.2?

Yes. Run /model fable on Claude Code v2.1.321 or later. On the API, Fable 5.2 costs $8 input and $40 output per million tokens as of November 16, 2026. Max and Ultra include Fable for up to half the weekly limit, Team includes it on premium seats, and Pro pays for it with usage credits.

### How do I check what Claude Code has cost me?

Run /usage, or its aliases /cost and /stats. The Session block shows tokens and an estimated dollar cost at list price, and subscribers also see plan usage bars and a breakdown of what consumed them. Organizations on the API see per-member spend in the Console's Claude Code dashboard and in the Claude Code Analytics API.

## Sources

1. [Claude plans and pricing (read November 16, 2026)](https://claude.com/pricing)
2. [Anthropic docs, Pricing (read November 16, 2026)](https://platform.claude.com/docs/en/about-claude/pricing)
3. [Claude Code docs, Manage costs effectively (read November 16, 2026)](https://code.claude.com/docs/en/costs)
4. [Claude Code docs, How Claude Code uses prompt caching (read November 16, 2026)](https://code.claude.com/docs/en/prompt-caching)
5. [Claude Code docs, Model configuration (read November 16, 2026)](https://code.claude.com/docs/en/model-config)
6. [Claude Code docs, Fast mode (read November 16, 2026)](https://code.claude.com/docs/en/fast-mode)
7. [Claude Code docs, Status line (read November 16, 2026)](https://code.claude.com/docs/en/statusline)
8. [Claude Code docs, Commands (read November 16, 2026)](https://code.claude.com/docs/en/commands)
9. [Claude Code docs, CLI reference (read November 16, 2026)](https://code.claude.com/docs/en/cli-reference)
10. [Claude Help Center, Use Claude Code with your Pro, Max, or Ultra plan (read November 16, 2026)](https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-max-or-ultra-plan)
11. [Claude Help Center, How do usage and length limits work (read November 16, 2026)](https://support.claude.com/en/articles/11647753-how-do-usage-and-length-limits-work)
12. [Claude Help Center, Manage usage credits for paid Claude plans (read November 16, 2026)](https://support.claude.com/en/articles/12429409-manage-usage-credits-for-paid-claude-plans)
13. [Claude Help Center, What is the Max plan (read November 16, 2026)](https://support.claude.com/en/articles/11049741-what-is-the-max-plan)
14. [Claude Help Center, What is the Ultra plan (read November 16, 2026)](https://support.claude.com/en/articles/17728952-what-is-the-ultra-plan)
15. [Claude Help Center, Use Claude Code with your Team or Enterprise plan (read November 16, 2026)](https://support.claude.com/en/articles/11845131-use-claude-code-with-your-team-or-enterprise-plan)
16. [Anthropic, Introducing Claude Fable 5.2 and Claude Mythos 5.2 (November 9, 2026)](https://www.anthropic.com/claude-fable-and-mythos-5-2)
17. [Bifrost docs, Claude Code (read November 16, 2026)](https://docs.getbifrost.ai/cli-agents/claude-code)
18. [Bifrost docs, Virtual keys (read November 16, 2026)](https://docs.getbifrost.ai/features/governance/virtual-keys)
19. [Bifrost docs, Budget and limits (read November 16, 2026)](https://docs.getbifrost.ai/features/governance/budget-and-limits)
20. [Bifrost docs, Model limits (read November 16, 2026)](https://docs.getbifrost.ai/features/governance/model-limits)
21. [Bifrost docs, Routing rules (read November 16, 2026)](https://docs.getbifrost.ai/providers/routing-rules)
22. [Bifrost docs, Session affinity (read November 16, 2026)](https://docs.getbifrost.ai/providers/session-affinity)
23. [Bifrost docs, Auto prompt caching (read November 16, 2026)](https://docs.getbifrost.ai/features/prompt-caching)
24. [Bifrost docs, Built-in observability (read November 16, 2026)](https://docs.getbifrost.ai/features/observability/default)
25. [Bifrost docs, Access profiles (read November 16, 2026)](https://docs.getbifrost.ai/enterprise/access-profiles)
26. [Bifrost docs, Edge supported applications (read November 16, 2026)](https://docs.getbifrost.ai/edge/supported-applications)

## Cite this guide

AI for Devs. "Claude Code pricing: plans, API costs, and usage limits." Published November 16, 2026. https://aifordevs.org/articles/claude-code-pricing

- Page: https://aifordevs.org/articles/claude-code-pricing
- Markdown: https://aifordevs.org/articles/claude-code-pricing.md
- Reuse: Quote or summarize with a link to this page. Terms: https://aifordevs.org/reuse
- Publisher: AI for Devs
- Published: 2026-11-16
