Nbility logoNbility Docs

Search documentation

Search guides and API reference content

Use the Nbility API in Claude Code.

Method 1: Import with CC-Switch

On the Tokens page, open a token's action menu, click CC-Switch, choose Claude or Codex mode, and import the configuration into Claude Code with one click.

Method 2: Configure Environment Variables Manually

Set these environment variables in your terminal:

export ANTHROPIC_BASE_URL=https://api.nbility.dev
export ANTHROPIC_AUTH_TOKEN=sk-your-key

macOS / Linux

Add them to ~/.bashrc or ~/.zshrc:

echo 'export ANTHROPIC_BASE_URL=https://api.nbility.dev' >> ~/.zshrc
echo 'export ANTHROPIC_AUTH_TOKEN=sk-your-key' >> ~/.zshrc
source ~/.zshrc

Windows (PowerShell)

[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.nbility.dev", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-your-key", "User")

Method 3: Configuration File

Create or edit ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.nbility.dev",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-key"
  }
}

Specify a Model

export ANTHROPIC_MODEL=claude-sonnet-4-6

Available examples: claude-opus-4-7, claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5-20251001.