Lesson 10 of 21

Get a Claude API Key

Monthly cost: ~$100–1,000 (usage-dependent) Expected time: ~10 minutes

Why Claude

OpenClaw supports many AI providers (OpenAI, Google, Groq, local models, etc.), but Claude from Anthropic is the recommended brain for your OpenClaw because:

Step 1: Create an Anthropic Account

  1. Go to console.anthropic.com
  2. Sign up with your Proton Mail address
  3. Save this login in Bitwarden's "OpenClaw" folder

Step 2: Add Payment

  1. Go to Settings → Billing
  2. Add your Privacy.com card named "Anthropic API"
    • Set the Privacy.com spending limit to $30/month to start (you can adjust later)
  3. Add an initial credit balance — $10–20 is fine to start

Step 3: Set a Spending Limit

This is critical. Without a limit, a runaway conversation or misconfigured cron job could rack up unexpected charges.

  1. Go to Settings → Limits
  2. Set a Monthly Spend Limit — start with $20/month
  3. You can always increase this later once you understand your usage patterns

Step 4: Generate an API Key

  1. Go to Settings → API Keys
  2. Click Create Key
  3. Name it "OpenClaw VPS"
  4. Copy the key — it starts with sk-ant-
  5. Save it in Bitwarden immediately — Anthropic only shows it once

Step 5: Connect Claude to OpenClaw

SSH into your server:

ssh claw@YOUR_SERVER_IP

The recommended way to store your API key is in an environment variable file, which keeps secrets out of your config and is harder to accidentally commit to version control:

nano ~/openclaw/.env

Add your key:

ANTHROPIC_API_KEY=sk-ant-api03-YOUR_KEY_HERE

Alternatively, you can add it directly to the config file (less secure):

nano ~/openclaw/config/default.yaml
providers:
  anthropic:
    apiKey: "sk-ant-api03-YOUR_KEY_HERE"

Restart OpenClaw to pick up the changes:

docker restart openclaw

Step 6: Test It

Send a message to your Telegram bot:

What model are you running on?

You should get an intelligent response from Claude. If it works — congratulations, your OpenClaw is alive and thinking.

When You're Done

Monthly Cost: ~$10–50

Depends heavily on usage. Light personal use (a few conversations a day) runs $10–20/month. Heavy use with browser skills and cron jobs can reach $50+. The spending limit protects you.

Further Reading