Skip to main content

Claude Code

Claude Code connects to PopGo API through three Anthropic environment variables.

Official source and verification

This page was verified on 2026-07-13 against the official source for Claude Code 2.1.207. Official source. Verification covers the environment variable setup documented by the official source.

One-click setup

Sign in to the PopGo API keys page and open the action menu on the target Key row. Public documentation never creates or displays a link containing a Key. Choose CC Switch, then Claude. After importing the Claude setup, confirm the variables are loaded in your local terminal before starting a new session.

Manual setup

Set these variables in the same terminal that will launch Claude Code.

export ANTHROPIC_BASE_URL="https://api.popgo.site"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_MODEL="YOUR_MODEL"

Success check

Close any old session, restart Claude Code from the same terminal, and send a short request. Start a new test request with YOUR_MODEL. A normal response without authentication or address errors confirms the connection.

Common errors and recovery

  • An existing terminal does not receive newly set variables automatically. Restart from the terminal where they were defined.
  • For a 401, paste YOUR_API_KEY again and remove surrounding whitespace.
  • For a 404, verify the Base URL level and make sure the client is not appending /v1 twice.