#Litellm

1 messages · Page 1 of 1 (latest)

undone jasper
#

How do i connect litellm? Its asking for a api key but i dont know exactly where to get it from

blazing magnetBOT
#

The “API key” it’s asking for is not an OpenAI/Anthropic key — it’s a key for your LiteLLM proxy.

You have two common setups:

1) You run LiteLLM Proxy + want auth (recommended)

  • Set a master key on the LiteLLM side (LITELLM_MASTER_KEY), then generate a virtual key for OpenClaw.
  • Use that generated key as LITELLM_API_KEY in OpenClaw.

Example (generate a key):

curl -X POST "http://localhost:4000/key/generate" \
-H "Authorization: Bearer $LITELLM_MASTER_KEY" \
-H "Content-Type: application/json" \
-d '{"key_alias":"openclaw","max_budget":50,"budget_duration":"monthly"}'

2) You run LiteLLM Proxy with no auth