Skip to content

Setting Up Claude Code

What to Use

For Claude Code, the primary Nexus endpoint is:

  • POST /v1/messages

Token counting is also supported:

  • POST /v1/messages/count_tokens

Environment Variables

The simplest option:

export ANTHROPIC_BASE_URL="https://api.nexus-hub.ru"
export ANTHROPIC_AUTH_TOKEN="your_nexus_key"

After that, Claude Code will send requests through Nexus.

A good default option:

  • claude-sonnet-4-6

If your key has access to other Claude models, they will appear in GET /v1/models.

What to Check If It Does Not Work

  1. There are no old ANTHROPIC_* variables in the environment.
  2. The key was copied without extra spaces.
  3. The model appears in GET /v1/models.
  4. The base URL is https://api.nexus-hub.ru, without /v1.