Skip to main content
Use Claude Code with Tokensmind

Quickstart

This guide gets Claude Code talking to Tokensmind in a few minutes.

1. Install Claude Code

Install script

npm

Requires Node.js 18+

2. Point Claude Code at Tokensmind

For Anthropic-compatible access via Tokensmind, set:
  1. ANTHROPIC_BASE_URLhttps://tokensmind.ai
  2. ANTHROPIC_AUTH_TOKEN → API key from Tokensmind
  3. ANTHROPIC_MODEL → a model id from the model list
  1. Check your default shell:
  1. Append exports (replace TOKENSMIND_API_KEY):
  1. Reload:
  1. Verify in a new terminal:

3. Run

From your project:
First launch may ask you to sign in to Anthropic. To skip: Cc 7
  1. Edit ~/.claude.json (macOS/Linux) or C:\Users\%USERNAME%\.claude.json (Windows).
  2. Set hasCompletedOnboarding to true:
  1. Save and run claude again.

More ways to pick models (priority high → low)

  1. In session: /model <name> for a one-off switch.
  1. CLI flag: claude --model <name> for one run.
  1. Env defaults (global):
  • OPUS — hard reasoning / architecture
  • SONNET — everyday coding
  • HAIKU — quick checks, search
  1. settings.json (project or user home):

CC-Switch

  1. Open CC-Switch → Add provider.
  1. Choose Custom.
  1. Enter API key and endpoint.
  1. Add to save.
  1. Home → select tokensmindStart.

VS Code extension

  1. Install the extension.
I Shot 2026 03 25 11 44 03
  1. Ctrl + Shift + P / Cmd + Shift + PSettings.
I Shot 2026 03 25 11 47 48
  1. Search Claude CodeClaude Code: Environment VariableEdit in settings.json.
I Shot 2026 03 25 11 49 37
  1. Fill claudeCode.environmentVariables with Tokensmind values.
I Shot 2026 03 25 11 53 07

FAQ

Q: 401 , No token provided...

In the Claude terminal run /config, enable Use custom API key, verify the token. install

Q: zsh: command not found: claude on macOS

The binary exists but isn’t on PATH. Common locations:
  • ~/.claude/bin
  • ~/.local/bin
If in ~/.claude/bin:
If in ~/.local/bin:
Check:

Q: Cannot reach Anthropic

Newer Claude Code builds expect ANTHROPIC_AUTH_TOKEN instead of ANTHROPIC_API_KEY. Update the header name and reload env—key value stays the same. Follow the env steps above.

Q: Login API Error 403

Upgrade Claude Code to the latest version and disable CC-Switch local proxy / failover if enabled. Happy coding!