Skip to main content

Identities and budgets

Start with the identity that authenticates the request and the team, if any, that the credential is scoped to. A request can also name a customer for spend attribution. That customer does not become the authenticated user.

Which identity should I use?​

IdentityWhat it means and when to use it
Internal userA person with a LiteLLM account, for example an employee who signs in with SSO. Use a personal budget for that person's requests outside team scope.
TeamA group that shares model access, permissions and an aggregate budget. Use it for a project or business unit whose requests should share those policies.
Team memberAn internal user in a specific team. Use a member budget to cap one person's spend in that team while keeping the team's aggregate cap.
OrganizationAn optional parent for teams, with its own aggregate budget and delegated administration. Use it to group teams under a business unit or tenant.
Customer or end userA person or account your application serves. In legacy tracking, the application can send its customer's ID in the request body as user; newer Customer Management uses separate customer records. Neither sets the authenticated internal user.
Virtual keyA credential with its own access and optional limits, scoped to a user, a team, or both. Use it for API clients that authenticate directly to the proxy.
Service accountA team-owned virtual key with no internal user owner. Use it for a production workload that should not depend on an employee's account.
Proxy adminA platform-wide role on an internal user account. Use it to administer the proxy across teams and organizations.

A service-account key has no user owner from whom to inherit the proxy admin role. It can perform team operations the team grants it without gaining proxy-wide admin permissions.

Which budget wins?​

Every applicable hard cap must pass. Raising one cap does not bypass another. For example, raising a member's allowance from $120 to $240 does not let that member make requests after the team exhausts its shared budget.

An explicit member budget replaces the team's default per-member allowance for that person. The aggregate team cap still applies. By default, a team-scoped request skips the internal user's personal cap. Set general_settings.apply_user_budget_to_team_keys: true to enforce the personal cap alongside the team and member caps for requests with an internal user. This setting does not add a user owner to a service account.

The table shows the main scopes for budgeted inference. A cap only applies where its scope resolves and a cap is configured. A proxy-wide cap can also apply to every row, and policies such as model-specific budgets can add more checks.

RequestCaps that can apply
Personal key with no teamThe key's own cap and the owner's personal cap. An organization explicitly associated with the key can also have a cap.
Team key owned by a memberThe key cap, the shared team cap, the member's cap within that team, and the applicable organization cap. The personal cap also applies if the opt-in is on.
Service-account keyThe key cap, the shared team cap, and the applicable organization cap. No personal or team-member cap applies because the key has no user owner.
Native Claude Code SSOWith no team, the internal user's personal cap. With a team, the shared team cap, the member's cap and the applicable organization cap, plus the personal cap if the opt-in is on. No separate virtual-key cap is created by sign-in.
Application key with a legacy customer ID in userThe caps that already apply to the application key, plus the customer's cap. The customer cap comes from the customer's own budget, otherwise the key's end_user_budget_id, otherwise the proxy's max_end_user_budget_id.

Set monthly allowances for SSO users without SCIM​

For personal usage, set the default when LiteLLM creates an account with the internal_user role. Set default_internal_user_params.user_role if your SSO provider does not supply that role. An existing account needs a user update.

config.yaml
litellm_settings:
max_internal_user_budget: 120
internal_user_budget_duration: "1mo"

Use /user/update, /user/bulk_update, or the Internal Users page to set max_budget to 240 or 1000 for exceptions. Set budget_duration to "1mo" on existing accounts that do not already reset monthly. A personal user budget takes a dollar amount, not a reusable budget_id.

For team-scoped usage, use an existing team's member budgets and set exceptions with max_budget_in_team. If each tier also needs a separate team, give those teams default team_member_budget amounts of 120, 240, and 1000 and a monthly team_member_budget_duration. Set a separate team max_budget only if you also want an aggregate cap. Assign memberships in LiteLLM or sync Entra groups at sign-in without SCIM provisioning.

Native Claude Code SSO issues a session without creating a virtual key. The session has no team if the user has none and uses their only team if they have one. Members of multiple teams pick one at sign-in Since v1.109.0. Older releases use the first team the proxy finds. Check the session's team scope before deciding whether to set a personal or team-member allowance.

LiteLLM Enterprise
SSO/SAML, audit logs, spend tracking, multi-team management, and guardrails, built for production.
Learn more →