No VPN
CLI traffic reaches ChatQT's servers, accessible from Iran; no permanent tunnel to anthropic.com is needed.
Developers
Claude CLI
In Iran, direct access to Anthropic's service is often impossible or VPN-dependent. With ChatQT you get the same Claude Code / Claude CLI experience on your own terminal — requests pass through api.chatqt.com .
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "YOUR_CHATQT_API_KEY",
"ANTHROPIC_BASE_URL": "https://api.chatqt.com/api"
}
}
Why ChatQT?
We wrote this guide for developers who want to use Anthropic's official terminal tool but are looking for a stable solution because of network restrictions or constant VPN dependence.
CLI traffic reaches ChatQT's servers, accessible from Iran; no permanent tunnel to anthropic.com is needed.
Frequent VPN drops no longer interrupt your coding flow.
API key from developer console; cost is based on actual usage — details on the Pricing.
Prerequisites
%USERPROFILE%\.claude\settings.json
Step 1
Anthropic's official tool for working in the terminal. The package name may change; always check the Claude Code docs for the latest install command.
npm install -g @anthropic-ai/claude-code claude --version
If npm isn't available, check Anthropic's docs for alternative methods (e.g., Homebrew or a dedicated installer). After installation, the claude command should be in your PATH.
Step 2
Since you're using ChatQT's custom address (similar to OpenRouter), set Anthropic's environment variables in the Claude CLI settings file.
mkdir -p ~/.claude nano ~/.claude/settings.json
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "YOUR_CHATQT_API_KEY",
"ANTHROPIC_BASE_URL": "https://api.chatqt.com/api",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "anthropic/claude-opus-4.7",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "anthropic/claude-sonnet-4.6",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "anthropic/claude-haiku-3.5"
}
}
ANTHROPIC_AUTH_TOKEN is your ChatQT API key (not a direct Anthropic key). ANTHROPIC_BASE_URL must point exactly to the address above.
| Variable | Model on ChatQT | Example slug |
|---|---|---|
| ANTHROPIC_DEFAULT_OPUS_MODEL | Claude Opus 4.7 | anthropic/claude-opus-4.7 |
| ANTHROPIC_DEFAULT_SONNET_MODEL | Claude Sonnet 4.6 | anthropic/claude-sonnet-4.6 |
| ANTHROPIC_DEFAULT_HAIKU_MODEL | Claude Haiku (fast) | anthropic/claude-haiku-3.5 |
Step 3
cd /path/to/your/project claude
If the configuration is correct, the CLI starts without asking for a direct Anthropic login and requests are sent through ChatQT.
Create the API key in the console and put it in ANTHROPIC_AUTH_TOKEN . Don't add extra spaces or quotes.
Copy the model slug from the console; the display name (e.g., Opus 4.7) is not the same as the API ID.
ANTHROPIC_BASE_URL check it: it should be https://api.chatqt.com/api .
FAQ
~/.claude/settings.json on your own device. Don't commit it or put it in public repositories.Get an API key, set up settings.json and in the terminal run claude .