Claude Code connects to the VisionCoder gateway over the Anthropic protocol: set the gateway address, API key and model name, with copyable config, a verification command and common errors; 10 public models are available now, such as claude-fable-5, claude-fable-5-1, claude-fable-5-2.
Home / Setup guides / Claude Code
Protocol: Anthropic; checked 2026-11-10; 10 models available
Notice: Anthropic's documentation states that routing Claude Code to non-Claude models through any gateway is not supported. The table lists the models here that declare the Anthropic protocol; non-Claude models may run into compatibility problems, so judge for yourself.
Note: Once a gateway credential variable is set, it takes precedence over a saved claude.ai login, which stays saved but unused. The gateway accepts both Authorization: Bearer (ANTHROPIC_AUTH_TOKEN) and x-api-key (ANTHROPIC_API_KEY), so use either one.
Claude Code speaks the Anthropic protocol (/v1/messages). The gateway does not convert protocols, so only models that declare it work. The wrong protocol returns 400 with the path to use instead.
Create a key and look up the gateway address on the API Keys page after signing in; below it appears as the placeholder <gateway-host>. Personal keys start with sk-u-, employee keys with sk-e-, organization tokens with sk-org-; all of them can call models. Management keys (sk-mgmt-) are rejected.
ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN in your terminal. The gateway address has no /v1: Claude Code appends /v1/messages itself.ANTHROPIC_MODEL (or use claude --model <name>, or /model <name> inside a session).claude in the same terminal and type /status. The Anthropic base URL line must show your gateway address; if the line is missing, the variable did not reach the session.env block of ~/.claude/settings.json. Never put the key in a project's .claude/settings.json: it is committed and shared with everyone who clones the repository.Shell environment variables (Bash / Zsh)
export ANTHROPIC_BASE_URL=https://<gateway-host>
export ANTHROPIC_AUTH_TOKEN=sk-...
export ANTHROPIC_MODEL=<model-name>
In ~/.claude/settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://<gateway-host>",
"ANTHROPIC_AUTH_TOKEN": "sk-...",
"ANTHROPIC_MODEL": "<model-name>"
}
}
Replace the model name with one from the table below; a JSON response means the gateway and key work.
curl https://<gateway-host>/v1/messages \
-H "x-api-key: sk-..." \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"<model-name>","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'
Only public models that declare the Anthropic protocol. Open a model for full pricing. Unit: CNY per million tokens.
| Model | Vendor | Region | Context | Input / output |
|---|---|---|---|---|
| claude-fable-5 | Anthropic | overseas | 1.25M | ¥20.00 / ¥100.00 |
| claude-fable-5-1 | Anthropic | overseas | 1.25M | ¥20.00 / ¥100.00 |
| claude-fable-5-2 | Anthropic | overseas | 1.25M | ¥16.00 / ¥80.00 |
| claude-haiku-5-5 | Anthropic | overseas | 1.25M | ¥0.60 / ¥3.00 |
| claude-opus-4-7 | Anthropic | overseas | 1.25M | ¥10.00 / ¥50.00 |
| claude-opus-4-8 | Anthropic | overseas | 1.25M | ¥10.00 / ¥50.00 |
| claude-opus-5 | Anthropic | overseas | 1.25M | ¥10.00 / ¥50.00 |
| claude-opus-5-5 | Anthropic | overseas | 1M | ¥8.00 / ¥40.00 |
| claude-sonnet-5 | Anthropic | overseas | 1.25M | ¥4.00 / ¥20.00 |
| claude-sonnet-5-5 | Anthropic | overseas | 1.25M | ¥4.00 / ¥20.00 |
| Symptom | Cause and fix | Source |
|---|---|---|
| 401, key rejected | First confirm the key was created on VisionCoder and is still active. The request is also rejected when Authorization is not in the Bearer <key> form, or when Authorization and x-api-key carry different values. (error code 401060) | Official docs + gateway |
| 400, Extra inputs are not permitted | Official fix: set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 to suppress the experimental fields, then retry. | Official docs |
| Claude Code asks you to log in although the curl test succeeds | Set the credential variable where Claude Code reads it before first-run setup: a shell export or the env block of ~/.claude/settings.json. A project's .claude/settings.json only applies after the first-run wizard and trust prompt. | Official docs |
| `ANTHROPIC_API_KEY` is set but ignored, with no prompt | Per the documentation, the key needs a one-time approval in interactive sessions, and a previously declined key is ignored without asking again. Enable it under /config with the Use custom API key option. | Official docs |
| Connection refused or host cannot be resolved | The gateway address is wrong, or a firewall or VPN blocks the path to it. Run the verification command below; it fails immediately for the same reason. | Official docs |
| 400, model does not support this endpoint | The model does not declare the Anthropic protocol; the response lists the paths it does support. Use only models from the table. (error code 400159) | Gateway |
| 404, model not found | The model name is misspelled or does not exist. Use the exact name from the table. (error code 404042) | Gateway |
| 403, model unavailable | The model exists, but the workspace of your key cannot call it. (error code 403060) | Gateway |
| The error message starts with [402070] or [402072]: insufficient or used-up credit | The account has no usable credit; buy a plan or a top-up pack first, or ask your administrator if you belong to a company. Tools show different HTTP status codes for this error, so go by the error number at the start of the message. (error code 402070, 402072) | Gateway |
| The error message starts with [402073]: the plan has expired | The plan has expired; buy a plan or a top-up pack, or ask your administrator if you belong to a company. (error code 402073) | Gateway |
| The error message starts with [402074]: the monthly usage cap is reached | The company token has reached its monthly usage cap; ask the company administrator. (error code 402074) | Gateway |
| 429, rate limited | Too many requests or too many in flight; retry later or wait for the current requests to finish. (error code 429000, 429060, 429062, 429063) | Gateway |
| The error message starts with [503060]: no healthy channel | The model has no healthy channel right now; retry later. Tools show different HTTP status codes for this error, so go by the error number at the start of the message. (error code 503060) | Gateway |
Checked 2026-11-10. Unofficial guide: VisionCoder is not affiliated with the owners of Claude Code, whose name and trademarks belong to them. The steps follow its official documentation and may differ after tool updates; the official documentation prevails.