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.
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
| Route | Barrier | Cost structure | Good for |
|---|---|---|---|
| Official subscription (Pro / Max) | Foreign credit card | Flat monthly fee, capped usage | Steady usage, need every official feature |
| Official API, pay as you go | Foreign card + FX | USD per million tokens | Bursty usage |
| CNY gateway + client | Top up from ¥10 | CNY per million tokens | Most developers outside the US |
| Self-hosted open model | A GPU that can run it | Electricity | Data 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.
Route three: CNY pay-as-you-go
Step 1 · Sign up and top up
Balances are denominated in CNY, from ¥10. 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
export ANTHROPIC_BASE_URL="https://api.kimiseek.app"
export ANTHROPIC_AUTH_TOKEN="ks-your-key"
export ANTHROPIC_MODEL="deepseek-v4-pro-0813"
claudeOr put it in the settings file so you do not re-export every shell:
{
"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:
export ANTHROPIC_BASE_URL="https://api.kimiseek.app"
export ANTHROPIC_AUTH_TOKEN="ks-your-key"
export ANTHROPIC_MODEL="deepseek-v4.1-flash"
claudeEstimating the cost
The billing formula is straightforward:
# 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.An agent usually re-sends context on each turn, so input can greatly exceed output. Actual cost depends on input, output and cache usage together with their applicable rates.
Monthly estimates assume 30 days, no cache hits, and every request qualifying for the example tier below. Daily input/output are assumed volumes. Current DeepSeek V4 Pro example rates are input ¥2.25, cached input ¥0.075, output ¥6.75 per million tokens. Check the tier conditions; input-length tiers require estimates per request:
Off-peak (outside 01:00–04:00, 06:00–10:00 UTC (Beijing time 09:00–12:00, 14:00–18:00)) · Time bands from 2026-08-20 13:03:49.577 UTC; peak rates apply all day before then
| Usage level | Input per day | Output per day | Monthly estimate (30 days) |
|---|---|---|---|
| Light (1–2 hours a day) | 0.3M | 0.03M | ¥26.325 |
| Moderate (full-time) | 1.5M | 0.15M | ¥131.625 |
| Heavy (long context, multi-agent) | 5M | 0.5M | ¥438.75 |
For the same moderate profile (1.5M input / 0.15M output per day, 30 days, no cache hits), qualifying for the Flash example tier below gives ¥31.5 per month. Example rates for deepseek-v4.1-flash are input ¥0.5 and output ¥2 per million tokens:
Off-peak (outside 01:00–04:00, 06:00–10:00 UTC (Beijing time 09:00–12:00, 14:00–18:00)) · Time bands from 2026-08-16 16:00:00.000 UTC; peak rates apply all day before then
Three variables move the real bill:
- Time bands. Compare peak and off-peak rates for the same input range in the current catalog before scheduling work.
- Cache hits. Check actual hits in usage records. Cached input is cheaper in this tier; that rate applies only to hits actually reported by the upstream. An uncached estimate is not an upper bound under every configuration.
- Input length. Long context can enter a higher price tier; daily totals cannot replace the input length of each request.
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)
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?
Each request reserves its estimated cost (at least ¥0.10) from the available account and key budgets. Running requests and pending charges also use that budget. If it is insufficient, wait for requests to finish or lower the output or separate thinking budget. By default, each account can run up to 10 model requests at once; extra requests get HTTP 429 and can be retried once a running request finishes. A reservation is not a charge; actual usage determines the final bill. Usage above the estimate is still charged and may make the balance negative. Top-ups first cover any amount owed. Without an output limit, the model maximum is reserved. Separate thinking budgets are added; unspecified thinking budgets conservatively use the context limit.
Why is input so much more expensive than output on my bill?
An agent usually re-sends context on each turn. A request with 100K input and 500 output tokens still meters 100K input. Check the bill against actual input, output and cache usage. Cached input is cheaper in this tier; that rate applies only to hits actually reported by the upstream.
Can companies get an invoice?
For an invoice request, contact support to confirm the requirements, information needed and process before arranging a company purchase.