AnyInt Docs
Agent Setup

Configure Claude Code

Connect Claude Code to AnyInt through the stable Anthropic-compatible API.

Claude Code connects to AnyInt through the Anthropic-compatible API.

Support status

The AnyInt Anthropic-compatible API is published as Stable. Claude Code is a third-party client, so its local settings can change between releases.

What you need

  • an AnyInt API key
  • an Anthropic-compatible model ID visible to that key
  • Claude Code installed and initialized once

Fetch the available model IDs:

export ANYINT_API_KEY="your-anyint-api-key"

curl https://api.anyint.ai/anthropic/v1/models \
  -H "x-api-key: $ANYINT_API_KEY" \
  -H "anthropic-version: 2023-06-01"

Set the connection for the current shell first. This confirms the endpoint and model before you make the configuration persistent.

export ANTHROPIC_BASE_URL="https://api.anyint.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="$ANYINT_API_KEY"
export ANTHROPIC_MODEL="<ANTHROPIC_MODEL_ID>"
export ANTHROPIC_DEFAULT_SONNET_MODEL="<ANTHROPIC_MODEL_ID>"
export CLAUDE_CODE_SUBAGENT_MODEL="<FAST_ANTHROPIC_MODEL_ID>"

claude

Use model IDs returned for your account. The main model and fast subagent model may be the same if you do not need separate routing.

Persistent configuration

Claude Code usually reads ~/.claude/settings.json on macOS and Linux, or %USERPROFILE%\.claude\settings.json on Windows. Merge these fields into the existing env object:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.anyint.ai/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "your-anyint-api-key",
    "ANTHROPIC_MODEL": "<ANTHROPIC_MODEL_ID>",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "<ANTHROPIC_MODEL_ID>",
    "CLAUDE_CODE_SUBAGENT_MODEL": "<FAST_ANTHROPIC_MODEL_ID>"
  }
}

Protect this file as a credential-bearing local configuration. Do not add it to a repository or share it in screenshots.

Verify the connection

Start Claude Code and send a minimal prompt:

Reply exactly: AnyInt connected

The setup is complete when Claude Code returns the requested text without asking you to switch providers or log in to a different API account.

Common problems

SymptomCheck
Claude Code asks for an Anthropic loginConfirm ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN are present in the active environment or settings file.
The model is unavailableFetch /anthropic/v1/models again with the same key and copy an exact model ID.
Old settings remain activeReopen the terminal and check for environment variables that override the settings file.
Authentication failsStore only the key value in ANTHROPIC_AUTH_TOKEN; do not add a Bearer prefix.

For additional diagnosis, use Agent Setup Troubleshooting.

On this page