Skip to content
Subs -25% LAUNCH-SUB
Claws -25% LAUNCH-CLAWS

Getting a Claude Setup-Token for BYOK

4 min read Getting Started Last updated February 10, 2026

What is a Setup-Token?

A setup-token is an OAuth token generated by the Claude Code CLI. It lets you use your existing Claude subscription (Pro or Max) to power your ClawHosters instance, instead of paying for separate API access through the Anthropic Console.

This is the recommended approach if you already have a Claude Pro ($20/month) or Claude Max ($100/month or $200/month) subscription.

Prerequisites

Before you start, you need:

  • An active Claude Pro or Claude Max subscription at claude.ai
  • Claude Code installed on your computer (the CLI tool, not the web interface)
  • A terminal or command prompt

If you don't have Claude Code installed yet, follow the official installation guide.

Generating Your Setup-Token

Open your terminal and run:

bash
claude setup-token

This opens a browser window for authentication. Sign in with your Claude account, authorize the request, and the token appears in your terminal output.

Copy the entire token string. It's a long encoded string that starts with a recognizable prefix. Keep it somewhere safe temporarily — you'll paste it into ClawHosters in the next step.

Warning: Treat this token like a password. Anyone with your setup-token can use your Claude subscription. Don't share it publicly or commit it to version control.

Using Your Token in ClawHosters

There are two places where you can enter your setup-token:

During Instance Creation (Setup Wizard)

  1. In the creation wizard, choose BYOK (Bring Your Own Key) as your LLM mode
  2. Select Anthropic as the provider
  3. Paste your setup-token into the API key field
  4. Continue with the wizard

After Instance Creation (Instance Settings)

  1. Go to your instance in the ClawHosters dashboard
  2. Open instance settings
  3. Find the LLM configuration section
  4. Select Anthropic and paste your setup-token

Your token is encrypted with AES-256 and stored on German servers. ClawHosters never accesses or reads your token — it's passed directly to the OpenClaw gateway running on your dedicated instance.

Setup-Token vs API Key

Setup-Token Anthropic API Key
Source Claude Code CLI (claude setup-token) Anthropic Console (console.anthropic.com)
Billing Uses your existing Claude subscription Separate usage-based API billing
Cost Included in your Pro/Max subscription Pay per token used
Best for Personal use with existing subscription Teams or high-volume usage
Validity Long-lived (may expire periodically) Until manually revoked
Rate limits Subject to subscription limits Based on API tier

Token Refresh and Expiration

Setup-tokens are long-lived but not permanent. If your token expires or stops working:

  1. Open your terminal
  2. Run claude setup-token again
  3. Authenticate in the browser
  4. Copy the new token
  5. Update it in your ClawHosters instance settings

Signs that your token may need refreshing:

  • Your instance shows LLM connection errors
  • Responses stop working after a long period of normal operation
  • You changed your Claude subscription or account settings

Troubleshooting

"Command not found" when running claude setup-token

Claude Code isn't installed or isn't in your system PATH. Install it from the official setup page and make sure the claude command is accessible from your terminal.

Token rejected during setup

  • Confirm you have an active Claude Pro or Max subscription
  • Check that you completed the browser authentication step
  • Try generating a fresh token
  • Make sure you copied the entire token string without extra whitespace

Instance works initially but stops responding

Your token may have expired. Generate a new one with claude setup-token and update it in your instance settings.

"Invalid API key" error in instance logs

You may have pasted an Anthropic Console API key instead of a setup-token, or vice versa. Setup-tokens and API keys are different formats. Make sure you're using the correct one for your chosen authentication method.

Related Documentation