Advanced Beginner 10-20 min

Configure Multiple AI Models

Set up and switch between multiple AI models like Claude, Gemini, and GPT

#AI Models #Configuration #Claude

Prerequisites

  • OpenClaw deployed
  • API keys for AI models

Steps

1

Get API Key

Get API Key from model providers.

Commands

Claude
Visit https://console.anthropic.com → Sign up → API Keys → Create Key
OpenAI
Visit https://platform.openai.com → Sign up → API Keys → Create Key
Google Gemini
Visit https://aistudio.google.com → Sign up → Get API Key

Tips

  • • Gemini has free quota, good for beginners
  • • Claude 3.5 Sonnet is powerful but more expensive
  • • You can configure multiple models at the same time
2

Add Model Configuration

Add model in OpenClaw.

Commands

All Systems
OpenClaw Admin UI → Settings → Model Configuration → Add Model → select the model type → enter the API Key

Tips

  • • You can add multiple models of the same type (e.g., multiple Claude models)
  • • Each model can have different parameters (temperature, max tokens, etc.)
3

Set Default Model

Select the primary model to use.

Commands

All Systems
Model Configuration → select a model → set as default

Tips

  • • Default model will handle most requests
  • • For complex tasks, you can temporarily switch to a stronger model
4

Configure Model Strategy (Optional)

Assign different models for different types of tasks.

Commands

All Systems
Settings → Model Strategy → add a rule (e.g., Haiku for simple questions, Sonnet for complex reasoning)

Tips

  • • This balances performance and cost
  • • Use cheaper models for simple tasks, stronger models for complex tasks

Common Issues

API Key invalid?
Check if copied correctly, ensure no extra spaces. Some models require binding payment method
API call timeout?
May be network issue, consider using proxy or switching to domestic models