Skip to main content

Default budgets

A default budget fills in a budget that nobody set. Most defaults are proxy-wide settings under litellm_settings in config.yaml: max_internal_user_budget, internal_user_budget_duration and default_internal_user_params for internal users, default_team_params for teams, default_key_generate_params and upperbound_key_generate_params for keys, and max_end_user_budget_id for customers. Two are set per team instead, team_member_budget for its members and a per-member limit for each AI tool. litellm_settings.max_budget with budget_duration is the single budget for the whole proxy.

User, team and key defaults are copied onto the object when LiteLLM creates it, so changing a default later leaves existing objects alone. Team member, AI tool and customer defaults are looked up when a request arrives, so changing one reaches everyone who relies on it.

How it works​

Which internal user default applies depends on how the user is created, and this is the most common surprise.

On API calls such as /user/new, /team/new and /key/generate, a max_budget or budget_duration in the request always wins over the defaults. Only a user's creation reads these settings, except for one update path covered in Limits.

When to use it​

Use defaults so that nothing new starts without a cap. Typical cases are a monthly allowance for every employee who signs in through SSO, a starting budget for every team so no team is unlimited by accident, a ceiling on the keys that self-serve users create, and a free-tier budget for every customer of your application that has not been put on a paid tier.

Defaults do not change objects that already exist. To change existing users or teams, use /user/bulk_update, /user/update or /team/update. To give different groups of people different allowances, use a team per group with its own team_member_budget, as in Tiered SSO budgets. To share one set of limits across objects you create yourself, attach a shared budget.

Supported scopes​

ScopeSupportedHow to set it
Whole proxyYesmax_budget and budget_duration under litellm_settings. This is the proxy's only budget.
OrganizationNoSet max_budget or budget_id on /organization/new.
TeamYesdefault_team_params with max_budget and budget_duration.
Team memberYesteam_member_budget and team_member_budget_duration on /team/new or /team/update, per team. There is no proxy-wide default.
ProjectNoSet the budget on /project/new.
Virtual keyYesdefault_key_generate_params, then upperbound_key_generate_params for anything still unset. max_ui_session_budget caps Admin UI session keys.
Internal userYesmax_internal_user_budget, internal_user_budget_duration and default_internal_user_params, depending on how the user is created.
CustomerYesmax_end_user_budget_id, or the calling key's end_user_budget_id, names a budget row for customers without their own. Customer Management uses each organization's default member template.
TagNotag_budget_config declares budgets for named tags in config. It does not give new tags a budget.
Model access groupNoSet the budget with PUT /access_group/{access_group}/budget.
AI toolYesdefault_member_max_budget on PUT /team/{team_id}/ai_tool_budgets gives each team member a limit for that tool unless they have an override.
Agent sessionNoSet max_budget_per_session on each agent.

How to use it​

Config​

config.yaml
litellm_settings:
max_budget: 5000
budget_duration: "1mo"
max_internal_user_budget: 120
internal_user_budget_duration: "1mo"
default_team_params:
max_budget: 1000
budget_duration: "1mo"
default_key_generate_params:
max_budget: 25
budget_duration: "1mo"
upperbound_key_generate_params:
max_budget: 100
budget_duration: "1mo"
max_end_user_budget_id: "free-tier"

Whole proxy​

max_budget and budget_duration cap all spend through the proxy and are checked on every inference request. The cap needs a database, since the proxy's total spend is read from it, and with a database connected LiteLLM raises an error at startup when max_budget is set without budget_duration. See Global Proxy.

Internal users​

max_internal_user_budget and internal_user_budget_duration are the plain defaults. default_max_internal_user_budget is an older name, read only when max_internal_user_budget is unset. default_internal_user_params takes the same fields as /user/new, such as max_budget, budget_duration, user_role and models, and its max_budget wins over max_internal_user_budget on every path that reads both. In the Admin UI, edit it on the Default User Settings tab of Internal Users.

How the user is createddefault_internal_user_paramsmax_internal_user_budget
/user/newFills fields the request leaves out, for any role except proxy_adminOnly when the request sets user_role: internal_user and max_budget is still unset
SCIMSame as /user/newSame as /user/new. SCIM users get internal_user_viewer unless default_internal_user_params sets user_role, so this usually does not apply
Admin UI SSO or lite login, first sign-inReplaces the fields it namesSet on every new user first, whatever the role
Custom SSO handlerReplaces the fields it namesOnly for the internal_user role when max_budget is still unset
/team/member_add or /organization/member_add with an unknown userIts max_budget and budget_durationUsed when default_internal_user_params has no max_budget
JWT auth with user_id_upsertIts max_budget, budget_duration and other user fieldsNot read

See Private network or no SCIM for a JWT setup that relies on default_internal_user_params.

Teams​

default_team_params fills max_budget, budget_duration, tpm_limit and rpm_limit on new teams that leave them out. It applies to /team/new Since v1.82.3 and to teams that LiteLLM creates from SSO groups, SCIM groups and JWT auth with team_id_upsert. Send budget_duration: null explicitly to keep a team from resetting. When default_team_params sets no max_budget, LiteLLM still takes one from the first entry of the older default_team_settings list. In the Admin UI, edit it on the Default Team Settings tab of Teams.

Team members​

A team's team_member_budget and team_member_budget_duration are the default allowance for each of its members. Members without their own budget share one budget row and each counts their own spend against it, and max_budget_in_team on /team/member_add or /team/member_update overrides it for one member. See Team members.

Keys​

default_key_generate_params fills max_budget, budget_duration, tpm_limit, rpm_limit and max_parallel_requests on keys created through /key/generate and /key/service-account/generate. upperbound_key_generate_params then fills anything still unset with its ceiling and rejects requests above it. A value in the request wins, then default_key_generate_params, then the ceiling. An explicit budget_duration: null keeps default_key_generate_params from setting a reset period, but a budget_duration in upperbound_key_generate_params still fills it in. Keys that /user/new creates for a new user, and Admin UI session keys, do not read either setting. See Default /key/generate params and Upperbound /key/generate params.

max_ui_session_budget is the USD cap on each Admin UI login session key, which covers playground and test-connection calls. It defaults to $1.

Customers​

Create a budget row for the default tier, then point max_end_user_budget_id at it Since v1.80.5. Every customer without a budget of its own, including one seen for the first time, takes the row's limits, such as max_budget, tpm_limit, rpm_limit and model_max_budget, and each customer counts its own spend.

curl -X POST 'http://0.0.0.0:4000/budget/new' \
-H "Authorization: Bearer $LITELLM_MASTER_KEY" \
-H 'Content-Type: application/json' \
-d '{"budget_id": "free-tier", "max_budget": 5, "budget_duration": "1mo"}'

A key's end_user_budget_id Since v1.103.0 names a row for customers who call through that key, and takes precedence over max_end_user_budget_id. Only a proxy admin can set it, on /key/generate or /key/update, and the row must exist. In the Admin UI it is the key's Default Customer Budget. A customer's own budget always wins over both. See Customer budget resolution.

In Customer Management, a new member without a template takes its organization's default member template, set with default_budget_template or default_budget_template_id. See Member budget templates.

AI tools​

On a team's Per AI tool limits, Default per member (USD) sets default_member_max_budget for a tool. Every member without their own limit for that tool gets it. See Per AI tool limits.

Limits​

/user/update and /user/bulk_update reapply max_internal_user_budget and internal_user_budget_duration whenever the request sets user_role: internal_user without max_budget or budget_duration, even when the user already had that role. Include the budget fields in such a request to keep the user's current budget.

A plain max_end_user_budget number is accepted and ignored, and so is max_user_budget. Use max_end_user_budget_id with a budget row for customers.

Spend for a customer that relies on a key's end_user_budget_id resets when the max_end_user_budget_id row resets, not on the key row's schedule, and does not reset at all when max_end_user_budget_id is unset.

default_key_generate_params and upperbound_key_generate_params write their values onto the key itself, so a key created with a shared budget through budget_id uses the default max_budget instead of the row's unless the request sets its own.

Organizations, projects, tags, model access groups and agent sessions have no default. tag_budget_config declares budgets for tags you name in config, enforced by the router, and is an Enterprise feature. See Tags in config.

Budgets covers every budget scope, Shared budgets covers the rows that customer defaults point at, and Budget precedence lists which caps apply to each request.

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