Connect Claude Code

Route Claude Code through AnyInt's Anthropic-compatible gateway with a scoped API key.

Claude Code supports Anthropic-format LLM gateways through ANTHROPIC_BASE_URL and a gateway credential. AnyInt consumes the credential at its boundary and routes the request without forwarding your AnyInt key upstream.

Before You Start

  1. Install or update Claude Code using the official Claude Code instructions.
  2. Create an AnyInt API key.
  3. Choose an Anthropic-compatible model ID from the model catalog.

Configure the Gateway

Set the AnyInt key as Claude Code's gateway authentication token. Use the /anthropic gateway root because Claude Code appends /v1/messages and related operation paths.

bash
export ANYINT_API_KEY="your_api_key"
export ANTHROPIC_BASE_URL="https://api.anyint.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="$ANYINT_API_KEY"

Start Claude Code from your repository:

bash
claude

If the selected upstream model uses a non-default ID, configure that ID through Claude Code's supported model settings. Do not assume that an example model is available to your tenant.

Verify and Troubleshoot

  • A 401 response means the AnyInt key is missing, invalid, expired, or revoked.
  • A model-not-found response means the configured model ID is not in the published catalog or is unavailable to your key.
  • Update Claude Code when it begins sending a newer Anthropic capability; gateway clients and protocol features evolve together.
  • Remove a saved Claude subscription credential from the debugging path when testing gateway authentication—the gateway token, not a subscription login, should authorize this session.

See Anthropic's official LLM gateway documentation for the upstream behavior of these variables.