Skip to content

Use Claude Code with the Bokyaa router

Bokyaa team ·

Claude Code can send its requests to a gateway instead of directly to Anthropic. The Bokyaa router serves the Anthropic Messages format that Claude Code uses.

Before you start

  1. In the Bokyaa app, open Router and add a provider connection that serves Claude models, such as Anthropic.
  2. Create a router key. Router keys need a plan that includes them; see the pricing page. The key is shown once, so copy it then.

Claude Code sends Claude model names, so the router needs a connection that serves them. Anthropic does not support routing Claude Code to non-Claude models through any gateway. Use this setup with a connection that serves Claude models.

Set the base URL and key

In a shell, replace the placeholder with your router key:

export ANTHROPIC_BASE_URL=https://api.bokyaa.com
export ANTHROPIC_AUTH_TOKEN=sk-bky-...
claude

Or put the same two values in the env block of your user settings file, ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.bokyaa.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-bky-..."
  }
}

Each person must use their own provider key, and a workspace must not resell access to a provider through the router; see the terms of service. Keep the key in your user settings, never in a project's committed .claude/settings.json. Run /status inside Claude Code to see the base URL and credential it is using.

Source

Variable names and the settings file come from Claude Code's gateway page, code.claude.com/docs/en/llm-gateway-connect, read 2026-11-08. The limit on non-Claude models comes from code.claude.com/docs/en/llm-gateway, read 2026-11-08. Tools change; if a step no longer matches, follow the tool's own page.