TokenByteTokenByte Docs

Claude Code

Use TokenByte from the Claude Code CLI to reach any supported model

Claude Code is Anthropic's official terminal AI coding assistant. Point it at TokenByte's Anthropic-compatible endpoint and you can route its traffic to any supported model.

Prerequisites

  • Node.js 18+ and Claude Code (npm i -g @anthropic-ai/claude-code)
  • A TokenByte API key — create one in the console

Configuration

Set environment variables

export ANTHROPIC_BASE_URL="https://api.tokenbyte.ai"
export ANTHROPIC_AUTH_TOKEN="sk-tb-xxxxxxxxxxxxxxxx"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS="1"

Append these to ~/.zshrc or ~/.bashrc to make them persistent.

setx ANTHROPIC_BASE_URL "https://api.tokenbyte.ai"
setx ANTHROPIC_AUTH_TOKEN "sk-tb-xxxxxxxxxxxxxxxx"
setx CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC "1"
setx CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS "1"

Restart your terminal for the new values to take effect.

Claude Code reads ANTHROPIC_AUTH_TOKENnot ANTHROPIC_API_KEY. TokenByte keys begin with sk-tb-.

Verify

claude --version
claude --model "Claude Opus 4.6"

A clean response confirms the wiring.

Stuck? See the FAQ.

On this page