You have probably seen what people build with Claude Code: a working website in an evening, three years of messy files reorganised in an afternoon. Then you try it yourself and stop at step one — claude.ai tells you it does not serve your region.
Plenty of tutorials exist. Almost none of them start from where you are actually stuck. This one does: the complete path from zero to a working Claude Code session, for users in Hong Kong and China, in four steps. No coding background required — this tool was never meant to be a developers-only club.
Why you are blocked in the first place
Anthropic officially supports 175 countries and regions. Hong Kong, Macau and China are not on the list. From Hong Kong, claude.ai simply refuses you at the door — and note that this is not a network problem. Hong Kong's internet reaches everywhere; the vendor has chosen not to take your business. For users in China the road is steeper still: even with network access sorted, payment and account bans remain two mountains — no foreign credit card means no way to pay, and paid accounts can still be suspended without explanation.
The way through is documented by Anthropic itself. Claude Code officially supports custom API endpoints via environment variables: ANTHROPIC_BASE_URL points the client at a server, and ANTHROPIC_AUTH_TOKEN supplies the credential. This is a standard, documented configuration — not a hack.
Think of Claude Code as an unlocked phone. The carrier it ships with does not serve your region, but the phone takes any SIM. All you do is insert a local one — same phone, every feature intact. Essevin provides that SIM: a stable gateway with direct connectivity from Hong Kong and China. No VPN, no tricks, no code changes.
The whole path takes about ten minutes.
Step 1: Install Claude Code
Since 2026, the recommended install is the native installer — no Node.js required, one command.
macOS / Linux, in Terminal:
curl -fsSL https://claude.ai/install.sh | bashWindows, in PowerShell:
irm https://claude.ai/install.ps1 | iexRun claude --version afterwards; a version number means success. If you already have Node.js, npm install -g @anthropic-ai/claude-code works identically.
Note that installation is not region-locked — the software downloads anywhere. What is region-locked is the service behind it, and that is precisely the part we are about to swap.
Step 2: Register and create an API key
Register at essevin.com. You get trial credit on sign-up, so the whole walkthrough costs nothing upfront. When you do top up, payment is fully local: FPS or PayMe for Hong Kong users, Alipay or WeChat Pay for users in China — no foreign credit card involved, which removes the first of the two mountains.
In the console, open "API Keys", click create, give the key a name (say, claude-code), and it is generated instantly. The same page shows the gateway address. Those two strings — gateway address and key — are everything the next step needs.
The key is shown in full only once, at creation. Copy it somewhere safe.
Step 3: Set the two environment variables
This is the heart of the setup and the step most people get wrong, so we will take it slowly.
The recommended way: write both variables into Claude Code's settings file at ~/.claude/settings.json (on Windows, C:\Users\<your username>\.claude\settings.json; create the file if it does not exist):
{
"env": {
"ANTHROPIC_BASE_URL": "<gateway address from the console>",
"ANTHROPIC_AUTH_TOKEN": "<your API key>"
}
}Replace each placeholder, angle brackets included, with the actual values copied from the console. If settings.json already has content, merge the "env" block into the existing top-level braces — do not overwrite the file.
The alternative is export in your terminal (setx on Windows):
export ANTHROPIC_BASE_URL="<gateway address from the console>"
export ANTHROPIC_AUTH_TOKEN="<your API key>"But export only lives as long as that terminal window; open a new one and it is gone. The settings.json route is set-and-forget, which is why we recommend it.
Step 4: Verify
Type claude in your terminal and hand it something real:
> Sort the screenshots on my desktop into folders by monthIf it responds and starts working, you are connected. From here, every request appears in the console's usage log, itemised — pay-as-you-go metering with no monthly fee, as transparent as a taxi meter.
The two failure modes that cause 90% of "it doesn't connect"
Failure mode 1: the machine has an official claude.ai login. If this machine was ever signed in to a claude.ai account — a trial, or a colleague's setup — the official login takes priority over your environment variables, and your settings silently do nothing. This is a tested, reproduced behaviour. Fix: run /logout inside Claude Code to sign out of the official account, or make sure the two variables live in settings.json's env block rather than only in a shell export. We hit this one ourselves on first setup.
Failure mode 2: you used export, then opened a new window. As covered above, export is per-window. The symptom is "it worked yesterday and not today". Fix: settings.json.
One more pointer: once connected, your spend tracks conversation length directly. To understand what each line of your usage log is made of, see our earlier piece on Claude Code's three context commands, and read it alongside the usage page.
After connecting: you do not need to code to get your money's worth
Claude Code is not fundamentally a coding tool — it is an AI that acts on your machine, with direct access to your files, which no web chat can offer. Everyday uses that involve zero programming:
Tidy folders: "Sort my Downloads folder by file type; put images into subfolders by month taken."
Weekly reports: "Read this week's meeting notes in this folder and draft my weekly report grouped by project."
CVs: "Tailor this CV against these three job descriptions and save three versions."
Bills: "Read these credit card statement PDFs and list every recurring charge."
The same Essevin account gives you two more doors besides this key: "AI Chat" in the console talks to Claude, GPT and other frontier models in the browser with nothing to install, and the Creation Hub generates images and video on the same balance. One account, multiple top-tier models, pay-as-you-go.
Register at essevin.com — the trial credit is enough to walk all four steps today.
Information in this article is current as of 23 July 2026 and is provided for general reference only; it does not constitute advice of any kind. Third-party product features, pricing and policies are subject to their official announcements. Essevin service details are as shown on essevin.com and in the console.