Skip to main content
Use Claude Code with Onetoken

Quickstart

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

1. Install Claude Code

Install script

npm

Requires Node.js 18+

2. Point Claude Code at Onetoken

For Anthropic-compatible access via Onetoken, set:
  1. BASE_URLhttps://onetoken.one
  2. AUTH_TOKEN → API key from Onetoken
  3. MODEL → a model id from the model list
  1. Check your default shell:
  1. Append exports (replace ONETOKEN_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 onetokenStart.

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 Onetoken values.
I Shot 2026 03 25 11 53 07

Using the deepseek model in Claude code

Available models deepseek-r1-distill-qwen-14b deepseek-v3 deepseek-v3-0324 deepseek-v3-1-250821 deepseek-v3.2 deepseek-v4-flash deepseek-v4-pro Method 1: Directly modify the configuration file Locate the .claude.json file in the user’s home directory. The specific path is as follows:
  • macOS / Linux: ~/.claude.json
  • Windows: C:\Users\%USERNAME%\.claude.json
Change the value of ANTHROPIC_MODEL to the name of the deepseek model.
Method 2: Directly modify the configuration file using CC Switch. change the model name to the DeepSeek model name, and then restart Claude Code.

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 AUTH_TOKEN instead of 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.

Q: How to enable 1-hour caching

  1. Open the global configuration file ~/.claude/settings.json (or .claude/settings.json in the project directory);
  2. Add the env field:
Happy coding!