Clawra APISetup Guide
Complete guide to configuring all required API keys for Clawra — Anthropic, xAI, fal.ai, and messaging platforms
Don’t Let Clawra Go Offline
Host your OpenClaw AI assistant on Clawra — one-click deployment, auto security updates, and always-available hosting. Starting at $9.99/mo
Your AI, always there for you 💕
01 — Overview
API Keys
at a Glance
Clawra requires several API keys to function properly. Some are required for basic functionality, while others enable specific features like selfie generation and video calls.
All API keys should be stored in your .env file or referenced in config.yaml using environment variables for security.
02 — Required API Keys
Core
Intelligence Keys
These APIs are required for Clawra to function
Anthropic API (Claude)
RequiredAnthropic's Claude models power Clawra's intelligence and conversation capabilities.
How to Get Your API Key
Configuration
xAI API (Grok)
RequiredxAI's Grok models provide an alternative AI backend for Clawra conversations.
How to Get Your API Key
Configuration
03 — Optional API Keys
Enhanced
Feature Keys
Enhance Clawra with additional features using these optional APIs
fal.ai API (Selfie Generation)
Optionalfal.ai provides access to xAI Grok Imagine for generating consistent Clawra selfies.
How to Get Your API Key
Configuration
Video Provider API (Video Calls)
OptionalThird-party video call providers enable real-time video conversations with Clawra.
How to Get Your API Key
Configuration
04 — Messaging Platforms
Connect Your
Platforms
Configure Clawra to work on your preferred messaging platforms
Discord Bot Token
Discord is the most popular platform for Clawra. Setup requires creating a bot application.
Setup Steps
Configuration
Telegram Bot Token
Telegram offers the simplest setup process through BotFather.
Setup Steps
Configuration
WhatsApp Business API
WhatsApp requires Business API access and more complex setup.
Setup Steps
Configuration
05 — Environment Setup
Setting Up Your
.env File
Securely store all API keys in environment variables
Create a .env file in your Clawra project root directory. Add all your API keys to this file. The .env file should never be committed to version control.
Example .env File
Security Best Practices
- ◆Never commit .env file to version control
- ◆Add .env to your .gitignore file
- ◆Use different API keys for development and production
- ◆Rotate API keys regularly
- ◆Never share API keys publicly
.gitignore Configuration
Ensure your .gitignore file includes:
06 — Config YAML
Configuring
config.yaml
Reference environment variables in your configuration file
Instead of hardcoding API keys in config.yaml, reference environment variables. This keeps your configuration file safe to commit to version control.
Example config.yaml
07 — Testing & Troubleshooting
Verify Your
Configuration
Verify that all API keys are correctly configured
Test Checklist
Common API Issues
Invalid API Key
Verify the API key is copied correctly without extra spaces or characters. Check the key format matches the provider's specification.
API Key Not Loading
Ensure the .env file is in the project root directory and environment variables are properly named in config.yaml.
Quota Exceeded
Check your API usage dashboard. Some providers have rate limits or quotas on free tiers.
08 — Cost Management
API Usage
& Costs
Understanding and controlling API usage costs
Cost Monitoring
Monitor your API usage to control costs:
Cost Optimization Tips
Reduce API costs with these strategies:
09 — Next Steps
Continue Your
Setup Journey
Continue your Clawra setup journey
Platform Integration
Learn how to integrate Clawra with Discord, Telegram, WhatsApp, and other messaging platforms.
Learn More →