BlogOperations

Keys, teams and budgets in LiteLLM

Give every person a personal key inside their team, give every application its own service account key, put the budget on the team, and take the master key out of daily use. That layout is quick to set up for twenty people and does not need to be redone at five hundred. Most trouble with LiteLLM starts when one of these four points is skipped. As of 27 November 2026.

By Updated

How LiteLLM organises access

LiteLLM has four levels. An organisation contains teams, a team has users, and a virtual key belongs to a user, a team or both. The key is what an application or a coding agent actually sends. Everything else decides what that key may do and whose budget it spends.

Organisations need the Enterprise licence. Without it you work with teams, users and keys, which is enough for one company with a handful of departments.

Personal keys or service account keys

The two kinds of key answer two different questions. A personal key says which person made a request. A service account key says which application did.

Personal keys and service account keys in LiteLLM, from the LiteLLM documentation on virtual keys and service accounts, checked on 27 November 2026
QuestionPersonal keyService account key
Who owns itOne user, usually inside a teamThe team, with no user attached
Use it forCoding agents and chat tools a person works withApplications, pipelines and agents that run without a person
Which limits applyThe team's limits and the limits set for that memberThe team's limits only
When the person leavesThe key goes with the userThe key stays, because it was never theirs

A common mistake is a production application running on the personal key of the developer who built it. It works until that developer changes teams, and then it stops on a Friday afternoon.

Where budgets belong

Put the budget where the money is decided. In most companies that is the team or the cost centre behind it, so the team gets a monthly budget and a list of models it may use. A default budget per member keeps one person from using up the month for everyone. Budgets on single keys are for applications that must never spend more than a fixed amount.

Two things are easy to miss. Budgets and virtual keys need the database, so a gateway started without Postgres has neither. And with more than one instance, the limits are only counted correctly once Redis is in place.

The master key

The master key can do everything, including reading and creating every other key. LiteLLM's own security guidance says applications and users should work with scoped virtual keys and not with the master key. A Cloud Security Alliance note from September 2026 is about gateways that were reachable from the internet and still on a default admin key.

  • Generate a long random master key and store it in your secret manager, not in a configuration file
  • Let admins sign in through your identity provider with a role, so nobody needs the master key for daily work
  • Use the master key only in automation that creates teams and keys, and for emergencies
  • Keep the admin interface and the key management routes off the public internet

A layout to start with

  1. 1

    One team per real team

    Follow the cost centres you already have. If sign-in comes from Entra ID, LiteLLM can create teams from groups, so the directory stays the source of truth.

  2. 2

    A monthly budget and a model list on each team

    Start low and raise it on request. A raise is a two-minute job. A surprise invoice is a longer conversation.

  3. 3

    Personal keys that expire

    People create their own key in the interface. Give keys a lifetime, so forgotten ones die on their own.

  4. 4

    One service account key per application and environment

    Name them so the spend report explains itself, for example svc-helpdesk-prod. Production and staging never share a key.

A team with a monthly budget and a key that belongs to the team, using fields from the LiteLLM documentation. Check them against the version you run
# create the team
curl -X POST "$GATEWAY/team/new" \
  -H "Authorization: Bearer $ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "team_alias": "helpdesk",
    "models": ["gpt-standard", "claude-standard"],
    "max_budget": 400,
    "budget_duration": "30d"
  }'

# a key owned by the team, with no user attached
curl -X POST "$GATEWAY/key/generate" \
  -H "Authorization: Bearer $ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "team_id": "<team id from the first call>",
    "key_alias": "svc-helpdesk-prod",
    "rpm_limit": 120
  }'

Setting this up with a client's own teams and cost centres is usually part of the first gateway work we do.

Questions

Should every developer get a personal LiteLLM key?

For interactive tools, yes. A personal key lets you set a limit per person and removes access when the person leaves. In Germany, agree with the works council beforehand which per-person data is reported.

What happens when a team budget is used up?

Requests with that team's keys are refused until the budget resets or someone raises it. Tell teams this before it happens, and decide who may raise a budget.

Do we need the Enterprise licence for this layout?

No. Teams, users, virtual keys, budgets and rate limits are in the open-source version. Organisations, audit logs and automatic key rotation need the licence.

Talk to an engineer

Bring one piece of work you would like to improve. The call takes 30 minutes and needs no access to your systems or your data.

Booking runs on Google Calendar.

Mickey Graf

Mickey Graf

Founder and CEO of Cloudsail

Rated 4.9 out of 5 on Clutch

Prefer to write first? Leave your email and a few lines. Mickey reads every message himself and replies by email with times for a call.

The button prepares an email in your own email program, for you to send. Privacy policy (draft)