Back to guides
Pricing·October 3, 2026·8 min read

Claude Code pricing 2026: subscription costs, pay-as-you-go API pricing, and payment with Alipay or WeChat Pay

Claude Code costs are divided into two options: subscriptions and pay-as-you-go API billing. This article gives the prices for both options, an example cost calculation for a single session, and methods for paying with Alipay or WeChat Pay.

Claude Code has two payment options. The first is a Claude subscription: Pro costs $20 per month ($17 per month equivalent with annual billing), while Max costs $100 or $200 per month; both include Claude Code, while the free plan does not. Web subscriptions accept only credit or debit cards. The second is an API key billed by token, with no monthly fee and no effect on your subscription usage allowance; through Kunavo, you can top up with Alipay or WeChat Pay, with a minimum of $10. Mainland China is not included in Anthropic’s list of supported regions.

来源:订阅价格见 claude.com/pricing 和 Max plan details,付款方式见 Claude paid plans billing FAQ,支持地区见 Anthropic Supported Regions Policy,均核对于 October 3, 2026。Kunavo 的 token 价格从模型目录读取,核对于 October 3, 2026。

Comparison of the two options

Claude subscription (Pro / Max)Pay-as-you-go API key (Kunavo)
How are you charged?Fixed monthly fee, starting at $20 for ProBilled by token, with no monthly fee
Usage limitsThere is a usage cap (Pro’s session allowance resets every 5 hours, plus a weekly allowance); Pro and Max allowances are shared with Claude chatNo subscription usage window; you pay for what you use
Months when you do not use itYou still pay the monthly fee$0
Months when you use it heavilyYou must wait for the allowance to reset, or pay separately by enabling usage credits (additional usage)Costs increase with usage
Payment methodWeb subscriptions accept only credit or debit cards; in-app subscriptions are handled by the App Store or Google PlayAlipay, WeChat Pay, and bank cards (Visa, Mastercard, American Express, JCB, UnionPay)

How much does the subscription cost?

以下价格来自 claude.com/pricing,核对于 October 3, 2026,均为美元:

  • Free:不包含 Claude Code。Anthropic 的 Installation documentation也写明,Claude Code 需要 Pro、Max、Team、Enterprise 或 Console 账号。
  • Pro: $20 per month with monthly billing; $17 per month equivalent with annual billing, paid as $200 upfront. Includes Claude Code.
  • Max:价格页显示“From $100”。按 Max plan details,Max 5x 每月 $100,Max 20x 每月 $200,用量分别是 Pro 的 5 倍和 20 倍,都包含 Claude Code。
  • Team: Standard seats cost $20 per seat per month with annual billing and $25 with monthly billing; premium seats cost $100 per seat per month with annual billing and $125 with monthly billing.

The pricing page states that the prices above exclude taxes.

订阅的用量有上限。按 Pro plan details,Pro 的会话额度每五小时重置一次,另有一个对所有模型生效的每周额度。按 Using Claude Code with Pro / Max plans,Pro 和 Max 的额度由 Claude 聊天和 Claude Code 共用,两边的使用都计入同一份额度(均核对于 October 3, 2026)。

付款方面,Claude paid plans billing FAQ 写明:网页上购买的订阅只收信用卡或借记卡;通过 iOS 或 Android App 订阅的,可用的付款方式由 App Store 或 Google Play 决定(核对于 October 3, 2026)。网页订阅不支持支付宝和微信支付。

地区方面,Anthropic’s Supported Regions Policy 覆盖商业 API 和 Claude.ai,名单里没有中国大陆,也没有香港和澳门;Claude Code System requirements中的“Location”一项指向的就是这份名单(均核对于 October 3, 2026)。

How much does the pay-as-you-go API cost?

API 这条路没有月费,按 token 计费。下表是每百万 token 的美元价格,左边是 Anthropic 官方价(claude.com/pricing,核对于 October 3, 2026),右边是 Kunavo 的价格(从模型目录读取,核对于 October 3, 2026)。缓存价格按 5 分钟缓存计。

ModelOfficial pricing (input / output)Kunavo (input / output)Kunavo cache (read / write)Lower than the official price
Claude Sonnet 5
claude-sonnet-5
$2.00 / $10.00$1.40 / $7.00$0.14 / $1.7530%
Claude Opus 5.5
claude-opus-5-5
$4.00 / $20.00$2.80 / $14.00$0.14 / $3.5030%
Claude Opus 5
claude-opus-5
$5.00 / $25.00$3.50 / $17.50$0.35 / $4.37530%
Claude Haiku 4.5
claude-haiku-4-5
$1.00 / $5.00$0.70 / $3.50$0.07 / $0.87530%

按 Cost documentation(核对于 October 3, 2026),Claude Code 每次请求都会带上整段对话,有提示缓存时这段历史按缓存读取的价格计费;所以缓存价格对账单影响很大,在下面的示例会话里,缓存读取约占 Claude Sonnet 5 费用的 51%。其他 Claude 模型的完整价格见 Claude API pricing,所有模型见 Pricing page。

How much does one Claude Code session cost? (Example calculation)

下面用 Anthropic Cost documentation(核对于 October 3, 2026)里 /usage 命令的示例输出做一次可复算的估算。假设如下:

  • The token counts are taken directly from the documentation example: 1,200 input tokens, 5,300 output tokens, 940,000 cache-read tokens, and 50,000 cache-write tokens. In the documentation, this is one Sonnet 4.6 session, shown at the list price of $0.55.
  • Apply the same token counts to each of the four models in the table below, changing only the unit prices.
  • Cache writes are priced as 5-minute cache storage. The documentation states that when using an API key, the cache is retained for 5 minutes by default (1 hour for subscriptions).
  • Thinking tokens are billed as output tokens (according to the same documentation), so the more thinking tokens are used, the higher the output cost.
  • Excludes background calls; the documentation says that background tasks typically cost less than $0.04 per session.
ModelAt Anthropic’s list priceAt Kunavo’s priceCache reads as a share of Kunavo’s cost
Claude Sonnet 5$0.368$0.258About 51%
Claude Opus 5.5$0.549$0.384About 34%
Claude Opus 5$0.921$0.645About 51%
Claude Haiku 4.5$0.184$0.129About 51%

For Claude Sonnet 5, this session costs approximately $0.258 on Kunavo, with cache reads accounting for about 51%. Claude Opus 5.5 costs approximately $0.384 on Kunavo, Claude Opus 5 costs approximately $0.645, and Claude Haiku 4.5 costs approximately $0.129.

This is example arithmetic, not a measured bill and not a cost ceiling. Your session may be much longer or much shorter. In Claude Code, run /usage to see the four token counts for the current session, then enter them into the code below to estimate the cost:

claude_code_cost.py
# 用 /usage 里的四个 token 数,按 Kunavo 价格估算一次会话的费用(美元)
RATES = {  # 每百万 token:(输入, 输出, 缓存读取, 缓存写入)
    "claude-sonnet-5": (1.40, 7.00, 0.14, 1.75),
    "claude-opus-5-5": (2.80, 14.00, 0.14, 3.50),
    "claude-opus-5": (3.50, 17.50, 0.35, 4.375),
    "claude-haiku-4-5": (0.70, 3.50, 0.07, 0.875),
}

def session_cost(model, inp, out, cache_read, cache_write):
    i, o, r, w = RATES[model]
    return (inp * i + out * o + cache_read * r + cache_write * w) / 1e6

print(round(session_cost("claude-sonnet-5", 1_200, 5_300, 940_000, 50_000), 3))

Note that the dollar amount shown by /usage is an estimate calculated locally by Claude Code at list price (the exact wording in the cost documentation is “at list price”). When using Kunavo, actual charges are determined by the usage records in the Kunavo dashboard. To estimate costs based on your own usage, you can also use the Claude token cost calculator.

As a general reference, the cost documentation gives an enterprise-deployment average of approximately $13 per developer per active day and $150–250 per month; 90% of users spend less than $30 per active day. These are enterprise-deployment averages, and the documentation does not specify which unit prices were used to calculate them.

Subscription or API: how to choose

  • Use it lightly, or your monthly usage fluctuates significantly: choose pay-as-you-go API billing. Based on the example session above, $20 on Kunavo covers approximately 77 sessions of the same size as Claude Sonnet 5; months when you do not use it cost nothing.
  • You use it intensively every day, and the subscription allowance is sufficient:订阅更划算,但网页订阅需要信用卡或借记卡付款。额度用完后要等额度重置(Pro 的会话额度每 5 小时重置,另有每周额度),或者开启 usage credits(额外用量),超出额度的部分另行付费(Cost documentation,核对于 October 3, 2026)。
  • The two options cannot be combined:按 Anthropic’s gateway documentation(核对于 October 3, 2026),设置了 ANTHROPIC_AUTH_TOKEN 这类凭证变量后,请求用这个凭证代替 claude.ai 订阅登录,订阅额度不再适用,费用按 token 记在凭证所有者名下。按 Gateway integration documentation,删掉这个变量,Claude Code 会回到已保存的 claude.ai 登录。

Use the API route with Alipay or WeChat Pay

Kunavo 是兼容 Anthropic 和 OpenAI 接口的 API 网关,Claude Code 可以直接接入。充值走 Stripe 托管的结账页,付款方式里有Alipay、WeChat Pay和银行卡。价格按美元定,在中国大陆打开结账页时,金额会换算成人民币显示,付款前就能看到具体数字。按 Stripe’s Adaptive Pricing documentation,这个人民币金额所用的汇率含 2–4% 的货币转换费,由付款人承担(核对于 October 3, 2026),所以会比按市场汇率直接换算的数字略高。

  • Minimum top-up: $10, with bonuses for larger top-ups: 充 $100 到账 $110、充 $1000 到账 $1200、充 $5000 到账 $6250.
  • Prepaid balance, with no monthly fee and no expiration; failed requests (4xx/5xx) are not charged.
  • 作为对照,Anthropic Help center写明,直接购买的 API 预付额度自购买之日起一年后过期(核对于 October 3, 2026)。

For complete QR code payment instructions, see the Claude API guide to adding funds with Alipay and WeChat Pay. When you're ready, sign up for a Kunavo account, add funds, and then create a key beginning with sk-kn- at /app/keys.

Connect Claude Code to Kunavo

Claude Code reads the API endpoint and credentials from environment variables. Add the following six lines to your shell configuration file, then open a new terminal:

~/.zshrc
export ANTHROPIC_BASE_URL=https://api.kunavo.com   # 只写到域名,不要加 /v1
export ANTHROPIC_AUTH_TOKEN=sk-kn-...
export ANTHROPIC_MODEL=claude-sonnet-5
export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5-5
export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5

ANTHROPIC_AUTH_TOKEN 会作为 Authorization: Bearer 请求头发送(Environment variables documentation,核对于 October 3, 2026)。也可以把这几项写进 ~/.claude/settings.json 的 env 块;shell 和 settings 文件同时设置同一个变量时,以 settings 文件为准(Gateway integration documentation)。

Why fix the model.按 Model configuration documentation(核对于 October 3, 2026),别名“point to the recommended version for your provider and update over time”。Claude Code 的默认模型和 opus 别名跟随最新的 Opus,Kunavo 不一定已经上架最新型号,所以要用后四行把模型固定在 Kunavo 提供的版本上。目前在 Anthropic API 上,sonnet 别名指向 Sonnet 5.5,这个模型 Kunavo 暂未提供;不设 ANTHROPIC_DEFAULT_SONNET_MODEL 的话,/model sonnet、opusplan 的执行阶段和设成 model: sonnet 的子代理都会返回 404,所以上面把它固定为 claude-sonnet-5。opus 别名固定为 Opus 5.5(claude-opus-5-5),需要 Claude Code v2.1.280 或更高版本,旧版本先运行 claude update。想临时换用表里的其他模型,可以在 /model 里写完整模型名,例如 claude-haiku-4-5。ANTHROPIC_DEFAULT_HAIKU_MODEL 还决定后台任务用哪个模型。

After configuring it, start claude and run /status: the Anthropic base URL line should show https://api.kunavo.com, and the Auth token line should point to ANTHROPIC_AUTH_TOKEN. For more client configuration options, see Claude Code integration instructions; for the complete process from installation onward, see the Claude Code installation tutorial.

如果用 npm 安装时下载失败,可以按 npmmirror 文档给这一条命令指定镜像源(npm 包需要 Node.js 22 或更高版本,Anthropic 文档提醒不要用 sudo npm install -g):

终端
# npm 安装需要 Node.js 22 或更高版本;不要用 sudo npm install -g
npm install -g @anthropic-ai/claude-code --registry=https://registry.npmmirror.com

How to lower your bill

  1. Make caching work. When using an API key, the cache is retained for only 5 minutes by default; if you return after more than 5 minutes away, the first message processes the entire context again (cost documentation). During continuous work, cache reads are far cheaper than input; see Cache documentation for the explanation.
  2. Use /clear between unrelated tasks. Claude Code includes the entire conversation in every request; the cost documentation recommends using /clear to start over when switching to unrelated work.
  3. Choose the model for the task. The cost documentation says that Sonnet handles most programming tasks and costs less than Opus; reserve Opus for complex architectural decisions and multi-step reasoning.
  4. Assign background tasks to Haiku.ANTHROPIC_DEFAULT_HAIKU_MODEL determines which model background tasks use; the configuration above sets it to Claude Haiku 4.5.
  5. Lower the thinking intensity for simple tasks. Thinking tokens are billed as output; you can use /effort to lower the intensity (cost documentation).

Limitations to know

  • Kunavo does not issue Chinese VAT invoices; view top-up records (date, amount, and status) on the Billing page.
  • Automatic top-ups can use only bank cards or Link; Alipay and WeChat Pay require a manual top-up each time.
  • This is a token-billed API, not a Claude subscription: after setting ANTHROPIC_AUTH_TOKEN, Claude Code no longer uses the subscription allowance, and charges are deducted from your Kunavo balance.
  • ANTHROPIC_BASE_URL 指向非 Anthropic 的地址时,Remote Control 不可用,MCP tool search 默认关闭(Environment variables documentation,核对于 October 3, 2026)。
  • Anthropic 不为第三方网关产品背书、维护或审计(Gateway documentation,核对于 October 3, 2026)。
  • Kunavo has not conducted network connectivity tests in mainland China.

Frequently asked questions

Does Claude Code cost money? Is there a free version?

It requires payment. Anthropic's installation documentation states that Claude Code requires a Pro, Max, Team, Enterprise, or Console account; the free version of Claude does not include Claude Code. If you do not want a monthly subscription, you can pay per token with an API key: there is no monthly fee, and months with no usage incur no charges.

How much does Claude Code cost per month? What is the difference between Pro and Max?

According to claude.com/pricing and the Anthropic Help Center (checked on October 3, 2026): Pro costs $20 per month when paid monthly, or the equivalent of $17 per month when paid annually ($200 paid once); Max 5x costs $100 per month, and Max 20x costs $200 per month, with usage limits of 5 and 20 times Pro's limits, respectively. These prices exclude taxes and include Claude Code. Pro's session allowance resets every five hours, with an additional weekly allowance, and is shared with Claude chat.

Can Claude Code be paid for with Alipay or WeChat Pay? How can users in mainland China pay?

Claude subscriptions cannot use these methods: Anthropic's Help Center states that subscriptions purchased on the web accept only credit or debit cards, while payment methods for in-app mobile subscriptions are determined by the App Store or Google Play. The API key route is available: Kunavo top-ups use Stripe Checkout, where Alipay, WeChat Pay, or bank cards may be available; when opened in mainland China, amounts are displayed in RMB, with a minimum of $10. In addition, mainland China is not included in Anthropic's list of supported regions.

Which is more cost-effective: a Claude Code subscription or pay-as-you-go API billing?

It depends on how much you actually use each month. Using the /usage example session in Anthropic's documentation (1,200 input, 5,300 output, 940,000 cached-read, and 50,000 cached-write tokens), one session uses Claude Sonnet 5 and costs approximately $0.258 at Kunavo's rates; $20 covers approximately 77 sessions of the same size. If you use it lightly or your monthly usage varies significantly, pay-as-you-go is cheaper, and months with no usage cost $0; if you use it intensively every day and the subscription allowance is sufficient, a subscription is more cost-effective, but web subscriptions require payment by credit or debit card.

Can I use the API after buying Claude Pro? Can the two be combined?

Subscriptions and the API use two separate billing systems and cannot be combined. After ANTHROPIC_AUTH_TOKEN is set, Claude Code sends requests using this key, the subscription's usage allowance no longer applies, and charges are recorded against the key owner; remove this environment variable and Claude Code returns to the saved claude.ai login.

Approximately how much does it cost to code with Claude Code for one day?

Anthropic's cost documentation provides these reference figures: in enterprise deployments, the average cost is approximately $13 per developer per active day and $150–250 per month, with 90% of users spending less than $30 per active day. These are averages for enterprise deployments. The documentation does not specify the unit prices used in the calculation, so these figures cannot be directly converted into spending on Kunavo. Token unit prices for Claude models on Kunavo are 30% lower than Anthropic's official prices. Actual spending depends on the model, context size, and cache hits. Run /usage in Claude Code to see the token count for the current session.

What is Kunavo's minimum top-up? Do balances expire? Can you issue invoices?

The minimum is $10; larger top-ups include a bonus: Top up $100, receive $110、充 $1000 到账 $1200、充 $5000 到账 $6250. This is a prepaid balance with no monthly fee; the balance does not expire, and failed requests (4xx/5xx) are not charged. By comparison, Anthropic's Help Center states that API prepaid credits purchased directly expire after one year. Kunavo does not issue Chinese VAT invoices; top-up records (date, amount, status) can be viewed on the Billing page.

Why set these ANTHROPIC_MODEL variables?

Because Claude Code’s default model and aliases such as opus and sonnet change with version updates; Anthropic’s documentation states that aliases “update over time.” Currently on the Anthropic API, the default model and the opus alias point to Opus 5.5, while the sonnet alias points to Sonnet 5.5; the default model and opus alias follow the latest Opus, which Kunavo may not have listed yet. Kunavo also does not currently offer Sonnet 5.5, so without fixing the sonnet alias, /model sonnet, the execution phase of opusplan, and subagents configured with sonnet will all return 404. Fixing ANTHROPIC_MODEL, ANTHROPIC_DEFAULT_OPUS_MODEL (set to claude-opus-5-5; requires Claude Code v2.1.280 or later; on older versions, run claude update first), ANTHROPIC_DEFAULT_SONNET_MODEL, and ANTHROPIC_DEFAULT_HAIKU_MODEL ensures that requests continue to use models provided by Kunavo; ANTHROPIC_DEFAULT_HAIKU_MODEL also determines which model background tasks use.