Billing

How to use Claude Code without an overseas credit card

An official Claude subscription needs a foreign card, which stops a lot of people at the door. This compares four workable routes on cost, friction and risk, then walks through the CNY pay-as-you-go one with cost estimates by usage level.

Verified 2026-10-26Applies to
Claude Code 2.xCodex CLI 0.154.0

The short answer

Claude Code is a client, and the client is free. What you pay for is the model behind it. That splits "using Claude Code" into two very different problems:

  • Buying Anthropic's service: subscription or API. Needs a foreign card.
  • Pointing the client at a model elsewhere: the client is free, you pay per token in CNY.

This guide is about the second kind, plus the part of the first kind that actually blocks people.

Four routes compared

RouteBarrierCost structureGood for
Official subscription (Pro / Max)Foreign credit cardFlat monthly fee, capped usageSteady usage, need every official feature
Official API, pay as you goForeign card + FXUSD per million tokensBursty usage
CNY gateway + clientTop up from ¥10CNY per million tokensMost developers outside the US
Self-hosted open modelA GPU that can run itElectricityData that cannot leave the building

If you do have a foreign card and depend heavily on vision input or WebSearch, the official subscription is still the least friction. Otherwise the third route usually costs an order of magnitude less.

Route three: CNY pay-as-you-go

Step 1 · Sign up and top up

Balances are denominated in CNY, from ¥10. Top-ups carry a bonus: 3% at ¥200, 8% at ¥1000. Start small, get the loop working, then scale.

Step 2 · Create an API key

Create a ks- key in the dashboard. Use one key per project so you can revoke a single project without touching the rest.

Step 3 · Configure Claude Code

Shell · Claude Code
export ANTHROPIC_BASE_URL="https://api.kimiseek.app"
export ANTHROPIC_AUTH_TOKEN="ks-your-key"
export ANTHROPIC_MODEL="deepseek-v4-pro-0813"

claude

Or put it in the settings file so you do not re-export every shell:

JSON · ~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.kimiseek.app",
    "ANTHROPIC_AUTH_TOKEN": "ks-your-key",
    "ANTHROPIC_MODEL": "deepseek-v4-pro-0813"
  }
}

Step 4 · Use a cheaper model for light work

Commit messages and typo fixes do not deserve the most expensive model:

Shell · Claude Code (cheaper model)
export ANTHROPIC_BASE_URL="https://api.kimiseek.app"
export ANTHROPIC_AUTH_TOKEN="ks-your-key"
export ANTHROPIC_MODEL="deepseek-v4.1-flash"

claude

Estimating the cost

The billing formula is straightforward:

Billing formula
# All rates below are CNY per 1,000,000 tokens.
cost_cny = (
    (input_tokens - cached_input_tokens) * input_rate
    + cached_input_tokens * cached_input_rate
    + output_tokens * output_rate
) / 1_000_000

# Example: 1,000,000 uncached input tokens at CNY 4.5 / million,
# with no output tokens, cost CNY 4.5.

Claude Code usage has one defining property: input dwarfs output. Every turn re-sends the context, so the bill is dominated by input. That is exactly why a cached-input price at a tenth of the input price matters.

Rough estimate on DeepSeek V4 Pro off-peak rates (input ¥4.5, cached ¥0.45, output ¥13.5 per million tokens):

Usage levelInput per dayOutput per dayMonthly cost, off-peak
Light (1–2 hours a day)~0.3M~0.03M~¥40–60
Moderate (full-time)~1.5M~0.15M~¥200–300
Heavy (long context, multi-agent)~5M~0.5M~¥650–900

On deepseek-v4.1-flash (¥1 input, ¥4 output off-peak) the moderate profile drops to a few tens of yuan a month.

Three variables move the real bill:

  1. Peak doubles the price. Peak rates are exactly twice off-peak, so batching work into off-peak hours halves it.
  2. Cache hit rate. More hits, lower cost — but the rate is decided upstream.
  3. Context length. Long context does not raise the unit price, but every request re-sends everything, so the money goes into repeated input.

These are estimates, not quotes. Live prices come from the pricing page, which reads the model catalog config directly.

Invoices and company purchasing

  • Top-ups and consumption both appear in the dashboard, itemised per call for reconciliation.
  • For invoices or company purchasing, contact support to confirm the process. Validate the integration with a small top-up before buying in bulk.
  • Use one key per project so the bill can be split by key.

Risk notes (read this part)

These shortcuts look cheap and cost more:

  • Shared accounts / split subscriptions: against the terms, ban risk at any time, and your code passes through someone else's account.
  • Third-party top-up services: a stranger logs into your account, and leaked keys bill to you.
  • Unknown shared keys: same as above, plus you cannot tell when it will be revoked.

The correct approach is unglamorous: your own account, your own key, paying for what you use. Small usage means a small top-up — the ¥10 minimum exists for exactly that.

Versions and verification

  • Claude Code: 2.x; Codex CLI: 0.154.0 (configuration in the Codex guide)
  • Verified: 2026-10-26
  • Pricing source: the model catalog (CNY per million tokens, peak and off-peak bands); top-up bonus rates follow the dashboard

FAQ

Is ¥10 enough to try it out?

Yes. Configuring the client and verifying the tool-call chain on a cheap model usually costs well under ¥1. What actually burns money is long-context refactoring.

Can pay-as-you-go suddenly overspend?

No. Balance is prepaid, so it stops when it runs out and cannot go negative. For extra safety, give each project its own key and control top-ups per key.

Why is input so much more expensive than output on my bill?

Because an agent re-sends the context on every turn. A conversation over 100K of context bills 100K of input even if it only emits 500 output tokens. That is also why cached input at a tenth of the price matters so much.

Can companies get an invoice?

For an invoice request, contact support to confirm the requirements, information needed and process before arranging a company purchase.