VCodeX
For AI Tools & IDEs

Claude Code

Point Anthropic's Claude Code CLI at the VCodeX gateway via ANTHROPIC_BASE_URL.

Claude Code talks the Anthropic Messages API natively. The gateway exposes the same surface at /v1/messages, so setup is two env vars.

Prerequisites

  • Claude Code installed (npm install -g @anthropic-ai/claude-code or the official installer).
  • A VCodeX API key (sk-...). See Quickstart.

1 · Get your VCodeX key

Dashboard → Settings → External KeysCreate key. Copy the sk-... value.

2 · Configure Claude Code

Set two environment variables in your shell profile (~/.zshrc, ~/.bashrc, etc.):

export ANTHROPIC_BASE_URL=https://app.vcodex.ai
export ANTHROPIC_AUTH_TOKEN=sk-...        # your VCodeX key

Reload your shell (source ~/.zshrc) or open a new terminal.

3 · Verify

claude "say hello in one word"

Expected: a one-word reply. Check the request appears in the dashboard under Observability → Requests with client_source: claude-code.

Troubleshooting

  • 401 unauthorized — key is wrong or revoked. Regenerate one under Settings → External Keys.
  • 404 model not found — Claude Code sent a model your role can't access. Confirm the model appears in GET /v1/models for your key.
  • Environment variable not picked up — Claude Code caches the config; fully restart the shell (or run env | grep ANTHROPIC to confirm).

On this page