TokiLabsDocs
System setup

macOS setup guide

For macOS 12 and later (Intel and Apple silicon). macOS uses zsh by default; settings go in ~/.zshrc.

One key works with every model. Your key is stored only in your own browser and is never uploaded to any server.
No key yet? Create one in Get an API key first.

1. Open a terminal

Press ⌘ + Space, search for “Terminal” and open it. Third-party terminals such as iTerm2 also work.

2. Install Node.js

We recommend installing Node.js 18 or later with Homebrew. If you do not have Homebrew, install it first:

Terminal
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Terminal
brew install node
node -v
If you prefer not to install Homebrew, download the LTS .pkg installer from nodejs.org.

3. Set environment variables

Set the two variables below. The endpoint is https://api.tokilabs.xyz.

VariableValueUsed by
ANTHROPIC_BASE_URLhttps://api.tokilabs.xyzClaude Code, Anthropic SDK
ANTHROPIC_AUTH_TOKENsk-your-keyClaude Code
Terminal · zsh
cat >> ~/.zshrc <<'EOF'

# Toki Labs · Claude
export ANTHROPIC_BASE_URL="https://api.tokilabs.xyz"
export ANTHROPIC_AUTH_TOKEN="sk-your-key"
EOF
source ~/.zshrc

Check that it worked

If you switched your default shell to bash, replace ~/.zshrc with ~/.bash_profile in the commands above. Run echo $SHELL to see your current shell.
Terminal
echo $ANTHROPIC_BASE_URL

4. Verify the connection

If you get a JSON model list containing "data", both the endpoint and the key are fine.

Terminal
curl "$ANTHROPIC_BASE_URL/v1/models" -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN"
A 401 means the key is wrong or no longer valid; for connection timeouts, check your local proxy settings. See the FAQ.

5. Install Claude Code

Terminal · Official install script
curl -fsSL https://claude.ai/install.sh | bash

Or use Homebrew / npm:

Terminal
brew install --cask claude-code
# or
npm install -g @anthropic-ai/claude-code

Skip the official account sign-in on first launch:

Terminal
[ -f ~/.claude.json ] || echo '{"hasCompletedOnboarding": true}' > ~/.claude.json

Start it in your project directory:

Terminal
cd your-project
claude

After launch, type /status. If Base URL shows https://api.tokilabs.xyz, requests go through Toki Labs. Type /model to switch models, for example claude-opus-5-5. More settings in Claude Code configuration.

GUI apps cannot see the variables?

Apps opened from the Dock or Launchpad (such as VS Code or Cursor) may not load ~/.zshrc. The simplest fix is to launch VS Code from the terminal with code .; or enter the endpoint and key directly in the extension settings, see VS Code / Cline / Cursor.

Revert

When you no longer need it, delete these environment variables to restore the defaults:

Terminal
# Open ~/.zshrc in an editor, delete the 2 export lines under "# Toki Labs · Claude", then:
unset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN