clawcu Docs 简 繁 ID

Docs / Tool setup / Claude Code

Use clawcu with Claude Code

Claude Code speaks the Anthropic protocol. Point it at clawcu and swap the model for Kimi, GLM or DeepSeek — everything else works as before.

ProtocolAnthropic Messages (/v1/messages)
Base URLhttps://token.clawcu.ai (no /v1)
RequiresNode.js 18+

Models: kimi-k3 (strongest for coding, used on this page), glm-5.3, deepseek-flash (cheapest and fastest). See the Models page in the console or GET /v1/models for the full list and prices.

Before you start

Create a key on the API Keys page of the console (the plaintext is shown once), then put it in the CLAWCU_LLM_KEY environment variable — every step below reads it from there:

export CLAWCU_LLM_KEY=sk-your-key

Windows (PowerShell)

$env:CLAWCU_LLM_KEY="sk-your-key"

To keep it, add the line to ~/.zshrc / ~/.bashrc; on Windows run setx CLAWCU_LLM_KEY sk-… and open a new terminal.

Install

npm install -g @anthropic-ai/claude-code

Configure

Set the environment variables: kimi-k3 as the main model, the cheaper deepseek-flash for background work (the Haiku tier and subagents).

macOS / Linux

export ANTHROPIC_BASE_URL=https://token.clawcu.ai
export ANTHROPIC_AUTH_TOKEN=$CLAWCU_LLM_KEY
export ANTHROPIC_MODEL=kimi-k3
export ANTHROPIC_DEFAULT_OPUS_MODEL=kimi-k3
export ANTHROPIC_DEFAULT_SONNET_MODEL=kimi-k3
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-flash
export CLAUDE_CODE_SUBAGENT_MODEL=deepseek-flash

Windows (PowerShell)

$env:ANTHROPIC_BASE_URL="https://token.clawcu.ai"
$env:ANTHROPIC_AUTH_TOKEN=$env:CLAWCU_LLM_KEY
$env:ANTHROPIC_MODEL="kimi-k3"
$env:ANTHROPIC_DEFAULT_OPUS_MODEL="kimi-k3"
$env:ANTHROPIC_DEFAULT_SONNET_MODEL="kimi-k3"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-flash"
$env:CLAUDE_CODE_SUBAGENT_MODEL="deepseek-flash"

Or put them in the env block of ~/.claude/settings.json so every terminal picks them up (replace sk-your-key with your key):

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://token.clawcu.ai",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-key",
    "ANTHROPIC_MODEL": "kimi-k3",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "kimi-k3",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-k3",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-flash",
    "CLAUDE_CODE_SUBAGENT_MODEL": "deepseek-flash"
  }
}

Verify

If it replies OK, you are connected to clawcu:

claude -p "Reply with exactly: OK"

Everyday use

Run claude in your project directory; use /model inside a session to switch models (e.g. glm-5.3).

cd /path/to/your-project
claude

FAQ

It prints unrecognized_model or a note about auto mode billing?

Safe to ignore. Claude Code prints a one-time notice for non-Claude model names; requests still go to clawcu and are billed at our prices.

It says “kimi-k3” isn't described by this version's model catalog … 200k?

Claude Code doesn't know the context window of non-Claude models and auto-compacts at 200K. All three models support 1M; to use it, add export CLAUDE_CODE_MAX_CONTEXT_TOKENS=1000000. Longer context means more input tokens per request, so each request costs more.

Getting 401 / authentication errors?

Make sure ANTHROPIC_AUTH_TOKEN holds your clawcu key and that ANTHROPIC_API_KEY is not also set (Claude Code may pick the wrong one).

Should the URL end with /v1?

No. Claude Code appends /v1/messages itself; adding it gives /v1/v1/messages.

Other tools:Codex CLI · OpenCode · OpenClaw · Hermes Agent