Quick start
- Onboarding (recommended)
- Manual setup
Configuration
litellm/claude-opus-4-6.
Image generation
LiteLLM can back theimage_generate tool through OpenAI-compatible /images/generations and
/images/edits routes. Default image model is gpt-image-2; configure a different one under
agents.defaults.imageGenerationModel:
http://localhost:4000, 127.0.0.1, ::1, host.docker.internal) work
without a global private-network override. For a LAN-hosted proxy, set
models.providers.litellm.request.allowPrivateNetwork: true because the API key is sent to that host.
Advanced
Virtual keys
Virtual keys
Create a dedicated key for OpenClaw with spend limits:Use the generated key as
LITELLM_API_KEY.Model routing
Model routing
LiteLLM can route model requests to different backends. Configure in your LiteLLM OpenClaw keeps requesting
config.yaml:claude-opus-4-6; LiteLLM handles the routing.Viewing usage
Viewing usage
Proxy behavior notes
Proxy behavior notes
- LiteLLM runs on
http://localhost:4000by default. - OpenClaw connects through LiteLLM’s proxy-style OpenAI-compatible
/v1endpoint. - Native-OpenAI-only request shaping does not apply through a configured LiteLLM base URL:
no
service_tier, no Responsesstore, no prompt-cache hints, no OpenAI reasoning-effort payload shaping. - Hidden OpenClaw attribution headers (
originator,version,User-Agent) are only sent to verified native OpenAI endpoints, so they are not injected on a custom LiteLLM base URL.
For general provider configuration and failover behavior, see Model Providers.
Related
LiteLLM Docs
Official LiteLLM documentation and API reference.
Model selection
Overview of all providers, model refs, and failover behavior.
Configuration
Full config reference.
Models
How to choose and configure models.