AI Providers
Switch between Claude, ChatGPT, Gemini, and other LLM providers.
Supported providers
getbot supports three LLM providers out of the box. Each maps to an OpenClaw-compatible environment variable:
| Provider | Value | Environment variable | Key prefix |
|---|---|---|---|
| Claude (Anthropic) | anthropic | ANTHROPIC_API_KEY | sk-ant- |
| ChatGPT (OpenAI) | openai | OPENAI_API_KEY | sk- |
| Gemini (Google) | google | GEMINI_API_KEY | (none) |
Choosing a provider
You select your provider during setup or init. The provider determines which environment variable is injected into the bot's Docker container and which API key validation rules apply.
All three providers work with OpenClaw — the agent runtime handles model selection internally based on which API key is available.
Switching providers
To switch an existing installation to a different provider, update your config:
getbot config set llm_provider openai
getbot config set llm_api_key sk-proj-... Then redeploy your bot to apply the change:
getbot bots install --email alice@acme.com --team marketing --host my-server The new provider's environment variable and key will be injected into the container on the next deploy.
Key validation
getbot validates your API key during setup to catch common mistakes early:
- Prefix check — Anthropic keys must start with
sk-ant-, OpenAI keys withsk- - Cross-provider detection — if you paste an Anthropic key when OpenAI is selected, getbot tells you: "This looks like a Claude (Anthropic) key"
- Empty key — caught immediately with a link to the provider's key management page
Google (Gemini) keys have no prefix convention, so only empty-key validation applies.
Key storage
API keys are stored in ~/.getbot/config.yaml on your local machine. They are:
- Redacted in output —
getbot config listshowssk-ant-****instead of the full key - Injected at deploy time — sent to the server over SSH only during bot installation
- Stored in the bot's Docker Compose config — inside the org container, injected as an environment variable at runtime. Treat server/container access as sensitive and rotate keys if that access is compromised
See API Keys for more details on key management and security.
Environment variable override
You can override the stored provider and key with environment variables:
GETBOT_LLM_PROVIDER=openai GETBOT_LLM_API_KEY=sk-... getbot install --email alice@acme.com --team marketing Environment variables take precedence over the config file. This is useful for CI/CD where secrets come from the pipeline environment. See CI Automation for more patterns.
Backward compatibility
If you configured getbot before multi-provider support was added, your anthropic_api_key config value is still recognized. getbot falls back to it automatically when llm_provider and llm_api_key are not set. No migration needed — your existing config just works.