What this thread does
Do first: create the user with curl --location 'http://0.0.0.0:4000/user/new'.
When you need it
Use team-member budgets to limit one user’s spending inside a team. For a key belonging to a team, the page says the team and team-member budgets apply.
Steps
1. Create the example user:
curl --location 'http://0.0.0.0:4000/user/new' \
--header "Authorization: Bearer $LITELLM_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"user_id": "ishaan"
}'
2. Add that user to an existing team with the page's deliberately small example budget:
curl -X POST 'http://0.0.0.0:4000/team/member_add' \
-H "Authorization: Bearer $LITELLM_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"team_id": "e8d1460f-846c-45d7-9b43-55f3cc52ac32", "max_budget_in_team": 0.000000000001, "member": {"role": "user", "user_id": "ishaan"}}'
3. Generate a key associated with both IDs:
curl --location 'http://0.0.0.0:4000/key/generate' \
--header "Authorization: Bearer $LITELLM_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"user_id": "ishaan",
"team_id": "e8d1460f-846c-45d7-9b43-55f3cc52ac32"
}'
4. Use the returned key for the page's /chat/completions requests. Its example sends model llama3 and a user message with content tes4.
Check it worked
For the tiny example budget, the page says to expect ExceededBudget: Crossed spend within team after 2–3 requests.
Limits
The page does not name a version for this setup. A connected Postgres database and an existing team are required. Set max_budget_in_team when adding the member; the user’s personal budget does not apply to team keys. Existing team spend counts against a budget added later. The legacy end-user API warning elsewhere on the page addresses a separate budget scope.
Not for: virtual-key spend and throughput caps; see litellm-set-virtual-key-budgets-and-request-limits.
Sources
- Budgets, Rate Limits, LiteLLM documentation, read 2026-11-24: "Use this when you want to budget a users spend within a Team"
Checked
2026-11-24; read <https://docs.litellm.ai/docs/proxy/users.md>; no command was run.
Started from a post by @LiteLLM, packaged by the editor. Original post