New
New Team
Allow users to create a new team. Apply user permissions to their team.
👉 Detailed Doc on setting team budgets
Parameters:
- team_alias: Optional[str] - User defined team alias
- team_id: Optional[str] - The team id of the user. If none passed, we'll generate it.
- members_with_roles: List[{"role": "admin" or "user", "user_id": ""}] - A list of users and their roles in the team. Get user_id when making a new user via
/user/new
. - metadata: Optional[dict] - Metadata for team, store information for team. Example metadata = {"extra_info": "some info"}
- tpm_limit: Optional[int] - The TPM (Tokens Per Minute) limit for this team - all keys with this team_id will have at max this TPM limit
- rpm_limit: Optional[int] - The RPM (Requests Per Minute) limit for this team - all keys associated with this team_id will have at max this RPM limit
- max_budget: Optional[float] - The maximum budget allocated to the team - all keys for this team_id will have at max this max_budget
- budget_duration: Optional[str] - The duration of the budget for the team. Doc here
- models: Optional[list] - A list of models associated with the team - all keys for this team_id will have at most, these models. If empty, assumes all models are allowed.
- blocked: bool - Flag indicating if the team is blocked or not - will stop all calls from keys with this team_id.
- members: Optional[List] - Control team members via
/team/member/add
and/team/member/delete
. - tags: Optional[List[str]] - Tags for tracking spend and/or doing tag-based routing.
- organization_id: Optional[str] - The organization id of the team. Default is None. Create via
/organization/new
. - model_aliases: Optional[dict] - Model aliases for the team. Docs
- guardrails: Optional[List[str]] - Guardrails for the team. Docs Returns:
- team_id: (str) Unique team id - used for tracking spend across multiple keys for same team id.
_deprecated_params:
- admins: list - A list of user_id's for the admin role
- users: list - A list of user_id's for the user role
Example Request:
curl --location 'http://0.0.0.0:4000/team/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"team_alias": "my-new-team_2",
"members_with_roles": [{"role": "admin", "user_id": "user-1234"},
{"role": "user", "user_id": "user-2434"}]
}'
curl --location 'http://0.0.0.0:4000/team/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"team_alias": "QA Prod Bot",
"max_budget": 0.000000001,
"budget_duration": "1d"
}'
POST/team/new
Authorization
Header parameters
Body
team_aliasTeam Alias
team_idTeam Id
organization_idOrganization Id
adminsAdmins
membersMembers
members_with_rolesMembers With Roles
metadataMetadata
tpm_limitTpm Limit
rpm_limitRpm Limit
max_budgetMax Budget
budget_durationBudget Duration
modelsModels
blockedBlocked
model_aliasesModel Aliases
tagsTags
guardrailsGuardrails
Response
Successful Response
Body
team_aliasTeam Alias
team_id*Team Id
organization_idOrganization Id
adminsAdmins
membersMembers
members_with_rolesMembers With Roles
metadataMetadata
tpm_limitTpm Limit
rpm_limitRpm Limit
max_budgetMax Budget
budget_durationBudget Duration
modelsModels
blockedBlocked
spendSpend
max_parallel_requestsMax Parallel Requests
budget_reset_atBudget Reset At
model_idModel Id
litellm_model_tableany of
created_atCreated At
Request
Response