latestOpenAPI 3.1.02026-08-226994571.1 MB

1e929292ddd5

organization management

New Organization

Allow orgs to own teams

Set org level budgets + model access.

Only admins can create orgs.

Parameters

  • organization_alias: str - The name of the organization.
  • models: List - The models the organization has access to.
  • budget_id: Optional[str] - The id for a budget (tpm/rpm/max budget) for the organization.

IF NO BUDGET ID - CREATE ONE WITH THESE PARAMS

  • max_budget: Optional[float] - Max budget for org
  • tpm_limit: Optional[int] - Max tpm limit for org
  • rpm_limit: Optional[int] - Max rpm limit for org
  • model_rpm_limit: Optional[Dict[str, int]] - The RPM (Requests Per Minute) limit per model for this organization.
  • model_tpm_limit: Optional[Dict[str, int]] - The TPM (Tokens Per Minute) limit per model for this organization.
  • max_parallel_requests: Optional[int] - [Not Implemented Yet] Max parallel requests for org
  • soft_budget: Optional[float] - [Not Implemented Yet] Get a slack alert when this soft budget is reached. Don't block requests.
  • model_max_budget: Optional[dict] - Max budget for a specific model
  • budget_duration: Optional[str] - Frequency of reseting org budget
  • metadata: Optional[dict] - Metadata for organization, store information for organization. Example metadata - {"extra_info": "some info"}
  • blocked: bool - Flag indicating if the org is blocked or not - will stop all calls from keys with this org_id.
  • 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
  • object_permission: Optional[LiteLLM_ObjectPermissionBase] - organization-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"]}. IF null or {} then no object permission. Case 1: Create new org without a budget_id
curl --location 'http://0.0.0.0:4000/organization/new' 
--header 'Authorization: Bearer sk-1234' 
--header 'Content-Type: application/json' 
--data '{
    "organization_alias": "my-secret-org",
    "models": ["model1", "model2"],
    "max_budget": 100
}'


Case 2: Create new org with a budget_id

curl --location 'http://0.0.0.0:4000/organization/new' 
--header 'Authorization: Bearer sk-1234' 
--header 'Content-Type: application/json' 
--data '{
    "organization_alias": "my-secret-org",
    "models": ["model1", "model2"],
    "budget_id": "428eeaa8-f3ac-4e85-a8fb-7dc8d7aa8689"
}'
post/organization/new

Request body

budget_idstring nullable
soft_budgetnumber nullable
max_budgetnumber nullable
max_parallel_requestsinteger nullable
tpm_limitinteger nullable
rpm_limitinteger nullable
model_max_budgetobject nullable
budget_durationstring nullable
organization_idstring nullable
organization_aliasstring required
metadataobject nullable
model_rpm_limitobject nullable
model_tpm_limitobject nullable

Response

Successful Response

organization_idstring required
organization_aliasstring nullable
budget_idstring required
spendnumber
metadataobject nullable
modelsstring[] required
created_bystring required
updated_bystring required
object_permission_idstring nullable
created_atstring date-time required
updated_atstring date-time required