Community

Comparisonboth

How to use Codex and Claude Code in China: 4 ways compared (2026)

Codex and Claude Code both work from mainland China, but neither OpenAI nor Anthropic lets you sign up or pay from there. So the real question is which obstacle you route around: the card, the network, or the account itself. There are four routes people actually use. Here is each one: how it works, what it costs, how stable it is, the ban risk, privacy, and who it suits.

Every route gets the same five checks: setup effort, long-term stability, ban risk, privacy (who can see your prompts and key), and cost.

The short version

  • You already have a foreign card and a stable connection → route 1, the official subscription.
  • Saving money matters most and you don't mind tinkering → route 2, region-switched app stores and gift cards.
  • You want the cheapest possible trial and accept the risk → route 3, resellers and shared accounts.
  • You want your own key and quota, with no foreign card and no VPN → route 4, buy usage by the day, week or month.

Route 1: the official subscription (foreign card + your own network)

Sign up at openai.com or anthropic.com, add a card that their payment system accepts, keep a stable connection, and subscribe: a paid ChatGPT plan for Codex, a paid Claude plan for Claude Code. The CLIs then sign in with that account, or with an API key from it.

The hard part is getting in. Chinese dual-currency cards are often declined, so most people end up with a virtual or overseas card, and the connection is yours to maintain.

  • Setup: hard. Card and network both need solving, and keep needing it.
  • Stability: the model side is as stable as it gets; your access side is the weak link.
  • Ban risk: medium. Mismatched signup country, payment method and IP can trigger reviews.
  • Privacy: best. Nothing sits between you and the vendor.
  • Cost: list price. Subscriptions come with 5-hour and weekly usage limits; when you hit them, you wait for the reset.
  • Suits: people who already have the card and the connection.

Route 2: region-switched app stores and gift cards

Instead of a credit card on the vendor's website, you pay through an in-app purchase in the ChatGPT or Claude mobile app. The money comes out of your App Store or Google Play balance, which you top up with gift cards bought for RMB on Taobao or Xianyu. Prices vary by store region, so guides pick cheaper regions such as Nigeria or Turkey: switch your Apple ID to that region, buy that region's gift cards, then subscribe in the app.

  • Setup: fairly hard. A foreign-region account, the right gift cards, and Apple's limits on switching regions.
  • Stability: medium. Regional prices and exchange rates move, and foreign-region accounts can get flagged.
  • Ban / money risk: medium. Gift cards carry a markup, and fake cards exist.
  • Privacy: good. The subscription is on your own account.
  • Cost: in the right region, at or below list price. The cheapest route if you put in the work.
  • Suits: people who want near-list prices and will maintain a foreign-region account.

Route 3: resellers and shared accounts

A third party sells you a relay key and endpoint, a ready-made account, or top-ups. It's cheap, instant and paid in RMB. It's also where most of the horror stories come from: substituted models (a cheaper model answering as Claude or Codex, hard to spot), and shared accounts banned in bulk, taking everyone on them offline at once. Your requests pass through the reseller, who can read and log them.

  • Setup: easiest. Pay and paste.
  • Stability: uneven. Substituted models and mass bans are the known failure modes.
  • Ban risk: high, and out of your hands on a shared account.
  • Privacy: the biggest concern on this list.
  • Cost: lowest on paper, before you count the failures.
  • Suits: a quick, cheap trial by someone who knows the trade-offs.

Route 4: buy usage by the day, week or month, with your own key

You buy usage directly: a day pass, a week pass, a monthly plan, or a credit pack valid for 90 days. Each purchase comes with a key that's yours alone, usage is metered at the vendor's official prices, and passes stack. The key works in Claude Code, the Codex CLI, Codex in the ChatGPT desktop app, and any tool that takes a custom endpoint, such as CC Switch or Cline. This is what HaryAI does.

The difference from route 3 is that the key and the quota aren't shared with strangers, so nobody else can get you banned. Prices, what each pass includes and how long it lasts are listed in the store, and your usage is visible in the app and on the website. To be plain about it: it's a third-party service, your requests go through its gateway, and whether you trust the operator is your call. If you stop using it, you point your tools back where they were.

There are three ways to connect: the HaryAI desktop app (sign in and it's set up), a custom provider in CC Switch, or editing ~/.claude/settings.json and ~/.codex/config.toml yourself. The addresses and every step are in the setup guide.

  • Setup: easy. No foreign card, no VPN; pay in RMB, WeChat Pay works.
  • Stability: good. No shared accounts and no foreign-region account to maintain.
  • Ban risk: low. It's your own key.
  • Privacy: requests pass through a third-party gateway.
  • Cost: per pass. A day pass suits occasional use; for daily use, a monthly plan works out cheaper. Claude and Codex are sold separately.
  • Suits: anyone who wants their own key and quota without a foreign card or VPN, and anyone who has hit the official limits and doesn't want to wait for the reset.

Two more things

Hitting the official limits doesn't mean switching routes. When the 5-hour or weekly limit runs out, you can wait or cover the gap with a day pass. When OpenAI has reset limits early, and how often, is tracked in the Codex reset tracker.

Don't mix up the names: HaryAI sells Claude and Codex usage to individuals. It's unrelated to n1n.ai's Bifrost, a backend API-routing gateway for engineering teams.

Get new posts in your inbox

New recipes and field notes, plus the occasional product update. No spam, unsubscribe anytime.

How to use Codex and Claude Code in China: 4 ways compared (2026) | HaryAI