Setup guide
Use Claude Code with a custom API endpoint
Yes. Claude Code works with Token Supply. Keep Claude Code CLI or the VS Code extension. Replace the Anthropic base URL and auth token with Token Supply, then set reasoning effort.
~/.claude/settings.json
Env, settings, status
Create a Claude-plan key
Register, add credit, and create a key on an Anthropic plan.
Set the base URL
Export ANTHROPIC_BASE_URL without /v1. Claude Code appends /v1/messages itself.
Save settings.json
Put the env vars in ~/.claude/settings.json so every session picks them up.
Check /status
The Anthropic base URL should show Token Supply. Then confirm Usage.
Who this is for
Claude Code CLI and VS Code users who want the same Claude model ids on a prepaid key.
Quick setup
Use a key from a Claude plan. Set these variables in the terminal where you start Claude Code.
Do not add /v1 to ANTHROPIC_BASE_URL. The host is https://api.token-supply.com.
export ANTHROPIC_BASE_URL="https://api.token-supply.com"
export ANTHROPIC_AUTH_TOKEN="ts_live_..."
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
export CLAUDE_CODE_ATTRIBUTION_HEADER=0
claude --effort high
Why this works: Claude Code reads these variables before launch, so the same binary changes host.
Windows PowerShell
The same variables work in PowerShell for the current session.
$env:ANTHROPIC_BASE_URL="https://api.token-supply.com"
$env:ANTHROPIC_AUTH_TOKEN="ts_live_..."
$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"
$env:CLAUDE_CODE_ATTRIBUTION_HEADER="0"
claude --effort high
Save the settings
To use the settings every time, put them in ~/.claude/settings.json. On Windows, use %USERPROFILE%\.claude\settings.json.
Do not commit this file if it contains your key. Use the user settings file or .claude/settings.local.json.
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"effortLevel": "high",
"env": {
"ANTHROPIC_BASE_URL": "https://api.token-supply.com",
"ANTHROPIC_AUTH_TOKEN": "ts_live_...",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"CLAUDE_CODE_ATTRIBUTION_HEADER": "0"
}
}
Why this works: settings.json keeps the host next to the rest of the Claude Code config.
- Do not add /v1 to ANTHROPIC_BASE_URL. Claude Code adds /v1/messages itself.
- effortLevel and --effort set reasoning effort. You can also run /effort high.
- Do not commit the settings file if it contains your key.
- Claude Fable 5.1 (claude-fable-5-1), Opus 5.5 (claude-opus-5-5), and Haiku 5.5 (claude-haiku-5-5) can only be used inside the Claude Code CLI via Token Supply, due to Anthropic security settings.
- Run /status and check that the Anthropic base URL shows Token Supply.
Verify
Start Claude Code and run /status. The Anthropic base URL should show Token Supply. Send a short prompt and check Usage.
Claude models in this catalog use a 1M context window. In a session, /model opus or /model sonnet is enough.
Details
- Does Claude Code work with Token Supply?
- Yes. Claude Code CLI and VS Code users who want the same Claude model ids on a prepaid key.
- Should the base URL end in /v1?
- No. Claude Code and the Anthropic SDK append /v1/messages themselves.
- How do I set reasoning effort?
- Use --effort high, effortLevel in settings.json, or /effort high inside the session.
- Can Cursor use a Claude plan this way?
- Cursor's custom key is OpenAI chat. For Claude groups, use Claude Code.
Related
- Token Supply CLI — Coming soon. Until then, use the manual client setup guides.
- Anthropic SDK custom base URL — Point the Anthropic client at Token Supply.
- OpenCode custom provider — OpenAI, Anthropic, Gemini, and Grok presets.
- Codex custom endpoint — config.toml, auth.json, and the Responses API.
- Track AI API token usage — Prepaid wallet, usage dashboard, and per-key spend.