Claude Code is widely recognized as one of the best AI coding tools available, but in Hong Kong and China the first step is often where it stops: official sign-up does not support your region. Fortunately, Claude Code itself supports a custom API address. This guide walks the whole path — no VPN, no code changes, about ten minutes from start to finish.
Why This Works
Claude Code officially supports pointing its API address elsewhere through environment variables: ANTHROPIC_BASE_URL sets the server and ANTHROPIC_AUTH_TOKEN supplies the credential. Point both at Essevin and Claude Code runs on your Essevin account. Essevin is directly accessible from mainland China without a proxy.
It is still the official CLI. The only things you change are the address it connects to and the key it uses.
Three-Step Setup
First, register a free account and sign in at console.essevin.com. Essevin runs on a monthly subscription and subscriptions are now open; choose a plan on the Subscription page of the console, then follow the steps below.
Second, open API keys, click New key, enter a name (say, claude-code), pick Claude under Use with, and create the key. It begins with sk-.
Third, configure Claude Code in one of two ways:
- One-click setup (recommended): select One-Click Setup beside the key, choose Claude Code and your system (macOS / Linux or Windows PowerShell), copy the command and paste it into your terminal. The script installs Claude Code if needed, backs up and writes
~/.claude/settings.json, and verifies the key; a green success message means you are done. The command carries a single-use integration token that expires after 15 minutes, not the API key itself. - Manual setup: set two environment variables in your terminal:
# Point Claude Code at Essevin (no /v1 in the address)
export ANTHROPIC_BASE_URL=https://api.essevin.com
export ANTHROPIC_AUTH_TOKEN=sk-your-key
claude # Use normally; usage shows up in the console usage recordsRun claude and start a conversation. If it replies normally, you are connected. To make a manual setup permanent, add the two lines to ~/.zshrc or ~/.bashrc; on Windows, use setx and reopen the terminal. If you prefer a graphical tool or switch between several providers, use CC Switch; the full reference is in the Claude Code setup docs.
Three Common Pitfalls
- Environment variables not taking effect: After editing your shell config, open a new terminal or run
source; terminals launched from your IDE might not read your shell config. - An extra /v1, or the wrong key: Claude Code uses the Anthropic protocol, so the address is
https://api.essevin.comwithout/v1(otherwise requests go to/v1/v1/messages). The key must be one created for Claude; a GPT key does not work with Claude Code. Both mistakes return a 404. - Corporate proxy interference: Enterprise HTTPS proxies sometimes rewrite request headers. If you see weird 401/403 errors, test in an environment without a proxy first.
Switch Models by Task
A Claude key can use the Claude models included in your plan. Type /model inside a session, or start with --model:
| Model | Best for | Highlights |
|---|---|---|
claude-opus-5-5 | Complex refactors, cross-file reasoning | Most capable, uses the most points |
claude-sonnet-5-5 | Everyday development | About half the official price of Opus 5.5 |
claude-haiku-5-5 | Small edits, batches of simple tasks | Lowest price |
These IDs are examples; the list returned by GET https://api.essevin.com/v1/models for your key is what counts.
Verification and Transparent Usage
After one request, the console usage records show it immediately — model, token count and the points deducted, all aligned. Essevin is a flat monthly subscription: chat, images and video share one monthly points pool, deducted by actual usage and reset every month, with no pay-as-you-go balance. Tokens that hit prompt cache are counted at the lower cache rate, and conversational tools like Claude Code usually see a high share of cache hits, so the points you actually use often come in below what list prices suggest. Subscriptions are now open; compare the plans at essevin.com, then register for free and subscribe at console.essevin.com.