Tutorial

Connect Anthropic to OpenClaw

Use your Anthropic API key or Claude Code token to power OpenClaw Setup with Claude models. You can either use an API key (per-token billing) or a Claude Code setup token (subscription-based: your Claude Pro/Max plan covers both the assistant and Claude Code). The subscription path usually saves significantly on tokens and API costs — see our guide on saving on tokens and API costs. We recommend choosing an OpenClaw hosting provider that fully supports the subscription method; OpenClaw Setup is one.

How to get API key

  1. Go to console.anthropic.com
  2. Sign in or create an account
  3. Open API Keys and create a new key
  4. Copy the key and paste it into the OpenClaw Setup wizard

Tip: Add spending limits in the console to avoid surprises.

Claude Code setup token

An alternative to the Anthropic API key is the Claude Code setup token, obtained via the Claude Code CLI.

  1. Install the Claude Code CLI (see official docs).
  2. In a terminal run: claude setup-token
  3. Copy the printed token value.
  4. In the OpenClaw Setup wizard, select Auth Method: Claude Code Token (claude_code_token) and paste the token.

Note: Treat the token as secret. If claude command is not found, install or update Claude Code.

We recommend the Claude Code token when you can: it uses your Claude subscription instead of per-token API billing, so you save on tokens and API costs. See our guide on saving on tokens and API costs.

Ready to launch?

Once you have your Anthropic credentials, go to the dashboard to complete setup.

Cookie preferences