#`pnpm clawdbot models auth setup-token` is broken
1 messages ยท Page 1 of 1 (latest)
@round tartan where can i get my anthropic api key to set it manually?
Ok, i have the antrhopic api key. where in clawdbot.json do i have to put it?
The API key goes in the auth profile, not directly in the main config. Here are the easiest options:
Option 1: Use the built-in command (recommended)
clawdbot models auth add --provider anthropic
# It'll prompt for your API key and store it securely
Option 2: Environment variable
Add to your shell profile or ~/.clawdbot/clawdbot.json:
{
"env": {
"ANTHROPIC_API_KEY": "sk-ant-api03-xxx..."
}
}
Option 3: Direct auth profile file
The key gets stored at ~/.clawdbot/auth/profiles.json:
{
"profiles": {
"anthropic:default": { "key": "sk-ant-api03-xxx...", "provider": "anthropic", "mode": "api_key" }
}
}
Simplest fix โ just run:
export ANTHROPIC_API_KEY=sk-ant-api03-xxx...
Then Clawdbot will pick it up automatically.