openapi: 3.2.0 info: title: LiteLLM team management API description: 'Proxy Server to call 100+ LLMs in the OpenAI format. **Customize Swagger Docs** 👉 ```LiteLLM Admin Panel on /ui```. Create, Edit Keys with SSO. Having issues? Try ```Fallback Login``` 💸 ```LiteLLM Model Cost Map```. 🔎 ```LiteLLM Model Hub```. See available models on the proxy. **Docs**' version: 1.102.1 tags: - name: Team Management paths: /team/new: post: tags: - Team Management summary: New Team description: Allow users to create a new team. operationId: new_team_team_new_post security: - APIKeyHeader: [] parameters: - name: litellm-changed-by in: header required: false schema: anyOf: - type: string - type: 'null' description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability title: Litellm-Changed-By description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/NewTeamRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LiteLLM_TeamTable' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/update: post: tags: - Team Management summary: Update Team description: 'Use `/team/member_add` AND `/team/member/delete` to add/remove new team members You can now update team budget / rate limits via /team/update Parameters: - team_id: str - The team id of the user.' operationId: update_team_team_update_post security: - APIKeyHeader: [] parameters: - name: litellm-changed-by in: header required: false schema: anyOf: - type: string - type: 'null' description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability title: Litellm-Changed-By description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateTeamRequest' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/{team_id}: patch: tags: - Team Management summary: Patch Team description: 'Partially update a team using RFC 7386 JSON Merge Patch semantics. `team_id` is taken from the path; a `team_id` in the body is accepted only when it matches. `metadata` is merged with the team''s stored metadata rather than replacing it: an omitted key is preserved, `key: null` deletes it, and any other value overwrites (recursing into nested objects). Every other field behaves exactly like `POST /team/update` (omitted preserves, a value overwrites). Returns the full updated team. ``` curl --location --request PATCH ''http://0.0.0.0:4000/team/8d916b1c-510d-4894-a334-1c16a93344f5'' --header ''Authorization: Bearer sk-1234'' --header ''Content-Type: application/json'' --data-raw ''{ "metadata": {"cost_center": "1234", "deprecated_key": null} }'' ```' operationId: patch_team_team__team_id__patch security: - APIKeyHeader: [] parameters: - name: team_id in: path required: true schema: type: string title: Team Id - name: litellm-changed-by in: header required: false schema: anyOf: - type: string - type: 'null' description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability title: Litellm-Changed-By description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PatchTeamRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LiteLLM_TeamTable' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/member_add: post: tags: - Team Management summary: Team Member Add description: 'Add new members (either via user_email or user_id) to a team If user doesn''t exist, new user row will also be added to User Table Only proxy_admin or admin of team, allowed to access this endpoint. ``` curl -X POST ''http://0.0.0.0:4000/team/member_add'' -H ''Authorization: Bearer sk-1234'' -H ''Content-Type: application/json'' -d ''{"team_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", "member": {"role": "user", "user_id": "krrish247652@berri.ai"}}'' ```' operationId: team_member_add_team_member_add_post requestBody: content: application/json: schema: $ref: '#/components/schemas/TeamMemberAddRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TeamAddMemberResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /team/member_delete: post: tags: - Team Management summary: Team Member Delete description: '[BETA] delete members (either via user_email or user_id) from a team If user doesn''t exist, an exception will be raised ``` curl -X POST ''http://0.0.0.0:8000/team/member_delete'' -H ''Authorization: Bearer sk-1234'' -H ''Content-Type: application/json'' -d ''{ "team_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", "user_id": "krrish247652@berri.ai" }'' ```' operationId: team_member_delete_team_member_delete_post requestBody: content: application/json: schema: $ref: '#/components/schemas/TeamMemberDeleteRequest' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /team/member_update: post: tags: - Team Management summary: Team Member Update description: '[BETA] Update team member budgets and team member role' operationId: team_member_update_team_member_update_post requestBody: content: application/json: schema: $ref: '#/components/schemas/TeamMemberUpdateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TeamMemberUpdateResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /team/{team_id}/member/{user_id}/reset_spend: post: tags: - Team Management summary: Reset Team Member Spend Fn description: 'Reset a team member''s tracked spend against their per-member budget. A member''s spend is tracked separately from both their own personal budget and the team''s own budget (LiteLLM_TeamMembership.spend), so neither /user/update nor /team/update can clear it: this is the only endpoint that does. The cross-pod spend counter and cached membership reads are invalidated so the reset takes effect on the member''s next request rather than waiting on the membership cache''s TTL.' operationId: reset_team_member_spend_fn_team__team_id__member__user_id__reset_spend_post security: - APIKeyHeader: [] parameters: - name: team_id in: path required: true schema: type: string title: Team Id - name: user_id in: path required: true schema: type: string title: User Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ResetSpendRequest' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/bulk_member_add: post: tags: - Team Management summary: Bulk Team Member Add description: 'Bulk add multiple members to a team at once. This endpoint reuses the same logic as /team/member_add but provides a bulk-friendly response format. Parameters: - team_id: str - The ID of the team to add members to - members: List[Member] - List of members to add to the team - all_users: Optional[bool] - Flag to add all users on Proxy to the team - max_budget_in_team: Optional[float] - Maximum budget allocated to each user within the team Returns: - results: List of individual member addition results - total_requested: Total number of members requested for addition - successful_additions: Number of successful additions - failed_additions: Number of failed additions - updated_team: The updated team object Example request: ```bash curl --location ''http://0.0.0.0:4000/team/bulk_member_add'' --header ''Authorization: Bearer sk-1234'' --header ''Content-Type: application/json'' --data ''{ "team_id": "team-1234", "members": [ { "user_id": "user1", "role": "user" }, { "user_email": "user2@example.com", "role": "admin" } ], "max_budget_in_team": 100.0 }'' ```' operationId: bulk_team_member_add_team_bulk_member_add_post requestBody: content: application/json: schema: $ref: '#/components/schemas/BulkTeamMemberAddRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BulkTeamMemberAddResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /team/delete: post: tags: - Team Management summary: Delete Team description: 'delete team and associated team keys Parameters: - team_ids: List[str] - Required. List of team IDs to delete. Example: ["team-1234", "team-5678"] ``` curl --location ''http://0.0.0.0:4000/team/delete'' --header ''Authorization: Bearer sk-1234'' --header ''Content-Type: application/json'' --data-raw ''{ "team_ids": ["8d916b1c-510d-4894-a334-1c16a93344f5"] }'' ```' operationId: delete_team_team_delete_post security: - APIKeyHeader: [] parameters: - name: litellm-changed-by in: header required: false schema: anyOf: - type: string - type: 'null' description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability title: Litellm-Changed-By description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DeleteTeamRequest' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/info: get: tags: - Team Management summary: Team Info description: 'get info on team + related keys Parameters: - team_id: str - Required. The unique identifier of the team to get info on. ``` curl --location ''http://localhost:4000/team/info?team_id=your_team_id_here'' --header ''Authorization: Bearer your_api_key_here'' ```' operationId: team_info_team_info_get security: - APIKeyHeader: [] parameters: - name: team_id in: query required: false schema: type: string description: Team ID in the request parameters title: Team Id description: Team ID in the request parameters - name: key_limit in: query required: false schema: anyOf: - type: integer exclusiveMinimum: 0 - type: 'null' description: Limit the number of keys returned title: Key Limit description: Limit the number of keys returned responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/{team_id}/members/me: get: tags: - Team Management summary: Team Member Me description: 'Get the caller''s own team-membership row for the given team. Used by internal users to view their own spend, budget, budget reset date, rate limits, and role within a team — without exposing other members'' data. The caller is resolved from their API key; the path `/members/me` always refers to that caller. Returns 404 if the caller is not a member of the team. ``` curl --location ''http://localhost:4000/team/your_team_id/members/me'' --header ''Authorization: Bearer your_api_key_here'' ```' operationId: team_member_me_team__team_id__members_me_get security: - APIKeyHeader: [] parameters: - name: team_id in: path required: true schema: type: string title: Team Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TeamMemberInfoResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/block: post: tags: - Team Management summary: Block Team description: 'Blocks all calls from keys with this team id. Parameters: - team_id: str - Required. The unique identifier of the team to block. Example: ``` curl --location ''http://0.0.0.0:4000/team/block'' --header ''Authorization: Bearer sk-1234'' --header ''Content-Type: application/json'' --data ''{ "team_id": "team-1234" }'' ``` Returns: - The updated team record with blocked=True' operationId: block_team_team_block_post requestBody: content: application/json: schema: $ref: '#/components/schemas/BlockTeamRequest' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /team/unblock: post: tags: - Team Management summary: Unblock Team description: 'Unblocks a previously blocked team, re-enabling calls from keys with this team id. Parameters: - team_id: str - Required. The unique identifier of the team to unblock. Example: ``` curl --location ''http://0.0.0.0:4000/team/unblock'' --header ''Authorization: Bearer sk-1234'' --header ''Content-Type: application/json'' --data ''{ "team_id": "team-1234" }'' ```' operationId: unblock_team_team_unblock_post requestBody: content: application/json: schema: $ref: '#/components/schemas/BlockTeamRequest' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /team/metadata_schema: get: tags: - Team Management summary: Get Team Metadata Schema description: 'Get the team metadata fields declared in ``general_settings.team_metadata_schema``. The UI uses this to prepopulate the team metadata form with the declared keys. Returns an empty ``fields`` list when no schema is configured. This schema is advisory; server-side enforcement stays with ``custom_team_metadata_validate``.' operationId: get_team_metadata_schema_team_metadata_schema_get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TeamMetadataSchemaResponse' security: - APIKeyHeader: [] /v2/team/list: get: tags: - Team Management summary: List Team V2 description: 'Get a paginated list of teams with filtering and sorting options. Parameters: user_id: Optional[str] Only return teams which this user belongs to organization_id: Optional[str] Only return teams which belong to this organization team_id: Optional[str] Filter teams by exact team_id match team_alias: Optional[str] Filter teams by partial team_alias match page: int The page number to return page_size: int The number of items per page sort_by: Optional[str] Column to sort by (e.g. ''team_id'', ''team_alias'', ''created_at'') sort_order: str Sort order (''asc'' or ''desc'') status: Optional[str] Filter by status. Currently supports "deleted" to query deleted teams.' operationId: list_team_v2_v2_team_list_get security: - APIKeyHeader: [] parameters: - name: user_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Only return teams which this 'user_id' belongs to title: User Id description: Only return teams which this 'user_id' belongs to - name: organization_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Only return teams which this 'organization_id' belongs to title: Organization Id description: Only return teams which this 'organization_id' belongs to - name: team_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Only return teams which this 'team_id' belongs to title: Team Id description: Only return teams which this 'team_id' belongs to - name: team_alias in: query required: false schema: anyOf: - type: string - type: 'null' description: Only return teams which this 'team_alias' belongs to. Supports partial matching. title: Team Alias description: Only return teams which this 'team_alias' belongs to. Supports partial matching. - name: search in: query required: false schema: anyOf: - type: string - type: 'null' description: 'Combined search: matches teams whose ''team_id'' matches the value OR whose ''team_alias'' contains it (case-insensitive).' title: Search description: 'Combined search: matches teams whose ''team_id'' matches the value OR whose ''team_alias'' contains it (case-insensitive).' - name: search_team_id_match in: query required: false schema: enum: - exact - prefix type: string description: 'How ''search'' matches ''team_id'': ''exact'' (default) or ''prefix'' for a case-sensitive prefix match.' default: exact title: Search Team Id Match description: 'How ''search'' matches ''team_id'': ''exact'' (default) or ''prefix'' for a case-sensitive prefix match.' - name: page in: query required: false schema: type: integer minimum: 1 description: Page number for pagination default: 1 title: Page description: Page number for pagination - name: page_size in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Number of teams per page default: 10 title: Page Size description: Number of teams per page - name: sort_by in: query required: false schema: anyOf: - type: string - type: 'null' description: Column to sort by (e.g. 'team_id', 'team_alias', 'created_at') title: Sort By description: Column to sort by (e.g. 'team_id', 'team_alias', 'created_at') - name: sort_order in: query required: false schema: type: string description: Sort order ('asc' or 'desc') default: asc title: Sort Order description: Sort order ('asc' or 'desc') - name: status in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter by status (e.g. 'deleted') title: Status description: Filter by status (e.g. 'deleted') responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TeamListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/list: get: tags: - Team Management summary: List Team description: '``` curl --location --request GET ''http://0.0.0.0:4000/team/list'' --header ''Authorization: Bearer sk-1234'' ``` Parameters: - user_id: str - Optional. If passed will only return teams that the user_id is a member of. - organization_id: str - Optional. If passed will only return teams that belong to the organization_id. Pass ''default_organization'' to get all teams without organization_id.' operationId: list_team_team_list_get security: - APIKeyHeader: [] parameters: - name: user_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Only return teams which this 'user_id' belongs to title: User Id description: Only return teams which this 'user_id' belongs to - name: organization_id in: query required: false schema: anyOf: - type: string - type: 'null' title: Organization Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/model/add: post: tags: - Team Management summary: Team Model Add description: 'Add models to a team''s allowed model list. Only proxy admin or team admin can add models. Parameters: - team_id: str - Required. The team to add models to - models: List[str] - Required. List of models to add to the team Example Request: ``` curl --location ''http://0.0.0.0:4000/team/model/add'' --header ''Authorization: Bearer sk-1234'' --header ''Content-Type: application/json'' --data ''{ "team_id": "team-1234", "models": ["gpt-4", "claude-2"] }'' ```' operationId: team_model_add_team_model_add_post requestBody: content: application/json: schema: $ref: '#/components/schemas/TeamModelAddRequest' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /team/model/delete: post: tags: - Team Management summary: Team Model Delete description: 'Remove models from a team''s allowed model list. Only proxy admin or team admin can remove models. Parameters: - team_id: str - Required. The team to remove models from - models: List[str] - Required. List of models to remove from the team Example Request: ``` curl --location ''http://0.0.0.0:4000/team/model/delete'' --header ''Authorization: Bearer sk-1234'' --header ''Content-Type: application/json'' --data ''{ "team_id": "team-1234", "models": ["gpt-4"] }'' ```' operationId: team_model_delete_team_model_delete_post requestBody: content: application/json: schema: $ref: '#/components/schemas/TeamModelDeleteRequest' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /team/permissions_list: get: tags: - Team Management summary: Team Member Permissions description: Get the team member permissions for a team operationId: team_member_permissions_team_permissions_list_get security: - APIKeyHeader: [] parameters: - name: team_id in: query required: false schema: type: string description: Team ID in the request parameters title: Team Id description: Team ID in the request parameters responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/GetTeamMemberPermissionsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/permissions_update: post: tags: - Team Management summary: Update Team Member Permissions description: Update the team member permissions for a team operationId: update_team_member_permissions_team_permissions_update_post requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateTeamMemberPermissionsRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LiteLLM_TeamTable' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /team/permissions_bulk_update: post: tags: - Team Management summary: Bulk Update Team Member Permissions description: 'Append permissions to existing teams. Either pass team_ids to target specific teams, or set apply_to_all_teams=True to update every team. For each team, the provided permissions are merged with the team''s existing permissions (duplicates are skipped).' operationId: bulk_update_team_member_permissions_team_permissions_bulk_update_post requestBody: content: application/json: schema: $ref: '#/components/schemas/BulkUpdateTeamMemberPermissionsRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BulkUpdateTeamMemberPermissionsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /team/daily/activity: get: tags: - Team Management summary: Get Team Daily Activity description: 'Get daily activity for specific teams or all teams. Args: team_ids (Optional[str]): Comma-separated list of team IDs to filter by. If not provided, returns data for all teams. start_date (Optional[str]): Start date for the activity period (YYYY-MM-DD). end_date (Optional[str]): End date for the activity period (YYYY-MM-DD). model (Optional[str]): Filter by model name. api_key (Optional[str]): Filter by API key. page (int): Page number for pagination. page_size (int): Number of items per page. exclude_team_ids (Optional[str]): Comma-separated list of team IDs to exclude. Returns: SpendAnalyticsPaginatedResponse: Paginated response containing daily activity data.' operationId: get_team_daily_activity_team_daily_activity_get security: - APIKeyHeader: [] parameters: - name: team_ids in: query required: false schema: anyOf: - type: string - type: 'null' title: Team Ids - name: start_date in: query required: false schema: anyOf: - type: string - type: 'null' title: Start Date - name: end_date in: query required: false schema: anyOf: - type: string - type: 'null' title: End Date - name: model in: query required: false schema: anyOf: - type: string - type: 'null' title: Model - name: api_key in: query required: false schema: anyOf: - type: string - type: 'null' title: Api Key - name: page in: query required: false schema: type: integer default: 1 title: Page - name: page_size in: query required: false schema: type: integer default: 10 title: Page Size - name: exclude_team_ids in: query required: false schema: anyOf: - type: string - type: 'null' title: Exclude Team Ids responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SpendAnalyticsPaginatedResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/daily/activity/aggregated: get: tags: - Team Management summary: Get Team Daily Activity Aggregated description: 'Aggregated daily activity for teams without pagination, including per-team breakdown. One SQL GROUPING SETS pass returns every day in the range regardless of row volume, so callers never reassemble pages. Same response shape as the paginated endpoint with page metadata pinned to a single page. Args: team_ids (Optional[str]): Comma-separated list of team IDs to filter by. If not provided, returns data for all teams. start_date (Optional[str]): Start date for the activity period (YYYY-MM-DD). end_date (Optional[str]): End date for the activity period (YYYY-MM-DD). model (Optional[str]): Filter by model name. api_key (Optional[str]): Filter by API key. exclude_team_ids (Optional[str]): Comma-separated list of team IDs to exclude. timezone (Optional[int]): Timezone offset in minutes from UTC, matching JavaScript''s Date.getTimezoneOffset() convention. Returns: SpendAnalyticsPaginatedResponse: Response containing all daily activity data for the range.' operationId: get_team_daily_activity_aggregated_team_daily_activity_aggregated_get security: - APIKeyHeader: [] parameters: - name: team_ids in: query required: false schema: anyOf: - type: string - type: 'null' title: Team Ids - name: start_date in: query required: false schema: anyOf: - type: string - type: 'null' title: Start Date - name: end_date in: query required: false schema: anyOf: - type: string - type: 'null' title: End Date - name: model in: query required: false schema: anyOf: - type: string - type: 'null' title: Model - name: api_key in: query required: false schema: anyOf: - type: string - type: 'null' title: Api Key - name: exclude_team_ids in: query required: false schema: anyOf: - type: string - type: 'null' title: Exclude Team Ids - name: timezone in: query required: false schema: anyOf: - type: integer - type: 'null' title: Timezone responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SpendAnalyticsPaginatedResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/spend/by_user: get: tags: - Team Management summary: Get Team Spend By User description: 'Spend per user within the given teams, attributed per request from spend logs. Proxy admins may query any team. Team admins and members holding the `/team/daily/activity` permission see every user of the requested teams; other members only see their own row.' operationId: get_team_spend_by_user_team_spend_by_user_get security: - APIKeyHeader: [] parameters: - name: team_ids in: query required: false schema: anyOf: - type: string - type: 'null' title: Team Ids - name: start_date in: query required: false schema: anyOf: - type: string - type: 'null' title: Start Date - name: end_date in: query required: false schema: anyOf: - type: string - type: 'null' title: End Date responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TeamUserSpendResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/{team_id}/callback: post: tags: - Team Management summary: Add Team Callbacks description: 'Add a success/failure callback to a team Use this if if you want different teams to have different success/failure callbacks Parameters: - callback_name (str, required): The name of the callback to add, e.g. "langfuse", "langsmith", "gcs", "newrelic". The value is validated against the callbacks that support team-scoped credentials - callback_type (Literal["success", "failure", "success_and_failure"], required): The type of callback to add. One of: - "success": Callback for successful LLM calls - "failure": Callback for failed LLM calls - "success_and_failure": Callback for both successful and failed LLM calls - callback_vars (StandardCallbackDynamicParams, required): A dictionary of variables to pass to the callback - langfuse_public_key: The public key for the Langfuse callback - langfuse_secret_key: The secret key for the Langfuse callback - langfuse_secret: The secret for the Langfuse callback - langfuse_host: The host for the Langfuse callback - langfuse_environment: The tracing environment for the Langfuse callback (lowercase; falls back to LANGFUSE_TRACING_ENVIRONMENT) - gcs_bucket_name: The name of the GCS bucket - gcs_path_service_account: The path to the GCS service account - langsmith_api_key: The API key for the Langsmith callback - langsmith_project: The project for the Langsmith callback - langsmith_base_url: The base URL for the Langsmith callback - newrelic_api_key: The ingest license key for the team''s New Relic account; routes both LLM/agent traces and cost metrics to that account. Requires the proxy to run with LITELLM_OTEL_V2=true, otherwise this callback is rejected with a 400 - newrelic_region: The New Relic region for the team''s account ("us" or "eu"), riding the team''s own key Example curl: ``` curl -X POST ''http:/localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback'' -H ''Content-Type: application/json'' -H ''Authorization: Bearer sk-1234'' -d ''{ "callback_name": "langfuse", "callback_type": "success", "callback_vars": {"langfuse_public_key": "pk-lf-xxxx1", "langfuse_secret_key": "sk-xxxxx"} }'' ``` This means for the team where team_id = dbe2f686-a686-4896-864a-4c3924458709, all LLM calls will be logged to langfuse using the public key pk-lf-xxxx1 and the secret key sk-xxxxx' operationId: add_team_callbacks_team__team_id__callback_post security: - APIKeyHeader: [] parameters: - name: team_id in: path required: true schema: type: string title: Team Id - name: litellm-changed-by in: header required: false schema: anyOf: - type: string - type: 'null' description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability title: Litellm-Changed-By description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddTeamCallback' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - Team Management summary: Get Team Callbacks description: 'Get the success/failure callbacks and variables for a team Parameters: - team_id (str, required): The unique identifier for the team Example curl: ``` curl -X GET ''http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback'' -H ''Authorization: Bearer sk-1234'' ``` This will return the callback settings for the team with id dbe2f686-a686-4896-864a-4c3924458709 Covers callbacks registered through POST /team/{team_id}/callback and the Admin UI as well as teams still on the deprecated callback_settings shape, resolved from the team''s stored metadata with the same precedence used at request time. A key-level logging config overrides the team''s at request time and is not reflected here. Credential-bearing callback_vars are returned masked as `***REDACTED***` Returns { "status": "success", "data": { "team_id": team_id, "success_callbacks": team_callback_settings_obj.success_callback, "failure_callbacks": team_callback_settings_obj.failure_callback, "callback_vars": team_callback_settings_obj.callback_vars, }, }' operationId: get_team_callbacks_team__team_id__callback_get security: - APIKeyHeader: [] parameters: - name: team_id in: path required: true schema: type: string title: Team Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/{team_id}/callback/{callback_name}: delete: tags: - Team Management summary: Delete Team Callback description: 'Remove a single callback from a team The team''s other callbacks stay registered and keep firing. Use this instead of POST /team/{team_id}/disable_logging, which clears every callback on the team at once. Every entry registered under this callback_name is removed, across callback types, so a callback registered for both "success" and "failure" is deregistered by one call. Parameters: - team_id (str, required): The unique identifier for the team - callback_name (str, required): The name of the callback to remove, matched exactly as it was registered with POST /team/{team_id}/callback (e.g. "langfuse", "langsmith", "gcs") Example curl: ``` curl -X DELETE ''http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback/langsmith'' -H ''Authorization: Bearer sk-1234'' ``` Covers callbacks registered through POST /team/{team_id}/callback and the Admin UI. Teams still on the deprecated callback_settings metadata shape hold no such entries, so this returns 404 for them; POST /team/{team_id}/disable_logging remains the way to clear those. Returns 404 if the team does not exist, or if callback_name is not registered for the team.' operationId: delete_team_callback_team__team_id__callback__callback_name__delete security: - APIKeyHeader: [] parameters: - name: team_id in: path required: true schema: type: string title: Team Id - name: callback_name in: path required: true schema: type: string title: Callback Name - name: litellm-changed-by in: header required: false schema: anyOf: - type: string - type: 'null' description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability title: Litellm-Changed-By description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TeamCallbackDeleteResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /team/{team_id}/disable_logging: post: tags: - Team Management summary: Disable Team Logging description: 'Disable all logging callbacks for a team Callbacks registered through POST /team/{team_id}/callback and the Admin UI are cleared, so re-enabling logging means registering them again with their callback_vars Parameters: - team_id (str, required): The unique identifier for the team Example curl: ``` curl -X POST ''http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/disable_logging'' -H ''Authorization: Bearer sk-1234'' ```' operationId: disable_team_logging_team__team_id__disable_logging_post security: - APIKeyHeader: [] parameters: - name: team_id in: path required: true schema: type: string title: Team Id - name: litellm-changed-by in: header required: false schema: anyOf: - type: string - type: 'null' description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability title: Litellm-Changed-By description: The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: LiteLLM_UserTable: properties: user_id: type: string title: User Id user_alias: anyOf: - type: string - type: 'null' title: User Alias team_id: anyOf: - type: string - type: 'null' title: Team Id sso_user_id: anyOf: - type: string - type: 'null' title: Sso User Id organization_id: anyOf: - type: string - type: 'null' title: Organization Id object_permission_id: anyOf: - type: string - type: 'null' title: Object Permission Id teams: items: type: string type: array title: Teams default: [] user_role: anyOf: - type: string - type: 'null' title: User Role max_budget: anyOf: - type: number - type: 'null' title: Max Budget spend: type: number title: Spend default: 0.0 user_email: anyOf: - type: string - type: 'null' title: User Email models: items: {} type: array title: Models default: [] metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata max_parallel_requests: anyOf: - type: integer - type: 'null' title: Max Parallel Requests tpm_limit: anyOf: - type: integer - type: 'null' title: Tpm Limit rpm_limit: anyOf: - type: integer - type: 'null' title: Rpm Limit budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration budget_reset_at: anyOf: - type: string format: date-time - type: 'null' title: Budget Reset At allowed_cache_controls: items: type: string type: array title: Allowed Cache Controls default: [] policies: items: type: string type: array title: Policies default: [] model_spend: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Spend default: {} model_max_budget: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Max Budget default: {} created_at: anyOf: - type: string format: date-time - type: 'null' title: Created At updated_at: anyOf: - type: string format: date-time - type: 'null' title: Updated At organization_memberships: anyOf: - items: $ref: '#/components/schemas/LiteLLM_OrganizationMembershipTable' type: array - type: 'null' title: Organization Memberships object_permission: anyOf: - $ref: '#/components/schemas/LiteLLM_ObjectPermissionTable' - type: 'null' type: object required: - user_id title: LiteLLM_UserTable LiteLLM_OrganizationMembershipTable: properties: user_id: type: string title: User Id organization_id: type: string title: Organization Id user_role: anyOf: - type: string - type: 'null' title: User Role spend: type: number title: Spend default: 0.0 budget_id: anyOf: - type: string - type: 'null' title: Budget Id created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At user: anyOf: - {} - type: 'null' title: User litellm_budget_table: anyOf: - $ref: '#/components/schemas/LiteLLM_BudgetTable' - type: 'null' user_email: anyOf: - type: string - type: 'null' title: User Email type: object required: - user_id - organization_id - created_at - updated_at title: LiteLLM_OrganizationMembershipTable description: Tracks which organizations a user belongs to and their spend within it. LiteLLM_ObjectPermissionBase: properties: mcp_servers: anyOf: - items: type: string type: array - type: 'null' title: Mcp Servers mcp_access_groups: anyOf: - items: type: string type: array - type: 'null' title: Mcp Access Groups mcp_tool_permissions: anyOf: - additionalProperties: items: type: string type: array type: object - type: 'null' title: Mcp Tool Permissions mcp_toolsets: anyOf: - items: type: string type: array - type: 'null' title: Mcp Toolsets blocked_tools: anyOf: - items: type: string type: array - type: 'null' title: Blocked Tools vector_stores: anyOf: - items: type: string type: array - type: 'null' title: Vector Stores agents: anyOf: - items: type: string type: array - type: 'null' title: Agents agent_access_groups: anyOf: - items: type: string type: array - type: 'null' title: Agent Access Groups models: anyOf: - items: type: string type: array - type: 'null' title: Models search_tools: anyOf: - items: type: string type: array - type: 'null' title: Search Tools mcp_tool_search_enabled: anyOf: - type: boolean - type: 'null' title: Mcp Tool Search Enabled skills: anyOf: - items: type: string type: array - type: 'null' title: Skills type: object title: LiteLLM_ObjectPermissionBase TeamMemberDeleteRequest: properties: user_id: anyOf: - type: string - type: 'null' title: User Id user_email: anyOf: - type: string - type: 'null' title: User Email team_id: type: string title: Team Id type: object required: - team_id title: TeamMemberDeleteRequest TeamMetadataSchemaResponse: properties: fields: items: $ref: '#/components/schemas/TeamMetadataFieldSchema' type: array title: Fields type: object required: - fields title: TeamMetadataSchemaResponse description: Response for GET /team/metadata_schema; ``fields`` is empty when no schema is configured. TeamCallbackDeleteResponse: properties: status: type: string const: success title: Status message: type: string title: Message data: $ref: '#/components/schemas/TeamCallbackDeleteResponseData' type: object required: - status - message - data title: TeamCallbackDeleteResponse TeamMemberUpdateRequest: properties: user_id: anyOf: - type: string - type: 'null' title: User Id user_email: anyOf: - type: string - type: 'null' title: User Email team_id: type: string title: Team Id max_budget_in_team: anyOf: - type: number - type: 'null' title: Max Budget In Team role: anyOf: - type: string enum: - admin - user - type: 'null' title: Role tpm_limit: anyOf: - type: integer - type: 'null' title: Tpm Limit description: Tokens per minute limit for this team member rpm_limit: anyOf: - type: integer - type: 'null' title: Rpm Limit description: Requests per minute limit for this team member budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration description: Duration after which this team member's budget resets (e.g. '1h', '24h', '7d', '30d'). If not set, the budget never resets. allowed_models: anyOf: - items: type: string type: array - type: 'null' title: Allowed Models description: List of models this team member can access. Pass an empty list to remove per-member model restrictions. type: object required: - team_id title: TeamMemberUpdateRequest TeamModelAddRequest: properties: team_id: type: string title: Team Id models: items: type: string type: array title: Models type: object required: - team_id - models title: TeamModelAddRequest description: Request to add models to a team TeamMemberAddResult: properties: user_id: anyOf: - type: string - type: 'null' title: User Id user_email: anyOf: - type: string - type: 'null' title: User Email success: type: boolean title: Success error: anyOf: - type: string - type: 'null' title: Error updated_user: anyOf: - additionalProperties: true type: object - type: 'null' title: Updated User updated_team_membership: anyOf: - additionalProperties: true type: object - type: 'null' title: Updated Team Membership type: object required: - success title: TeamMemberAddResult description: Result of a single team member add operation TeamMemberInfoResponse: properties: user_id: type: string title: User Id team_id: type: string title: Team Id budget_id: anyOf: - type: string - type: 'null' title: Budget Id spend: anyOf: - type: number - type: 'null' title: Spend default: 0.0 total_spend: anyOf: - type: number - type: 'null' title: Total Spend default: 0.0 litellm_budget_table: anyOf: - $ref: '#/components/schemas/LiteLLM_BudgetTableFull' - $ref: '#/components/schemas/LiteLLM_BudgetTable' - type: 'null' title: Litellm Budget Table role: anyOf: - type: string - type: 'null' title: Role user_email: anyOf: - type: string - type: 'null' title: User Email team_alias: anyOf: - type: string - type: 'null' title: Team Alias type: object required: - user_id - team_id title: TeamMemberInfoResponse description: Response for GET /team/{team_id}/members/me — caller's own membership row. LiteLLM_TeamMembership: properties: user_id: type: string title: User Id team_id: type: string title: Team Id budget_id: anyOf: - type: string - type: 'null' title: Budget Id spend: anyOf: - type: number - type: 'null' title: Spend default: 0.0 total_spend: anyOf: - type: number - type: 'null' title: Total Spend default: 0.0 litellm_budget_table: anyOf: - $ref: '#/components/schemas/LiteLLM_BudgetTableFull' - $ref: '#/components/schemas/LiteLLM_BudgetTable' - type: 'null' title: Litellm Budget Table type: object required: - user_id - team_id title: LiteLLM_TeamMembership ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError UpdateTeamRequest: properties: team_id: type: string title: Team Id team_alias: anyOf: - type: string - type: 'null' title: Team Alias organization_id: anyOf: - type: string - type: 'null' title: Organization Id metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata tpm_limit: anyOf: - type: integer - type: 'null' title: Tpm Limit rpm_limit: anyOf: - type: integer - type: 'null' title: Rpm Limit max_budget: anyOf: - type: number - type: 'null' title: Max Budget soft_budget: anyOf: - type: number - type: 'null' title: Soft Budget models: anyOf: - items: {} type: array - type: 'null' title: Models blocked: anyOf: - type: boolean - type: 'null' title: Blocked budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration tags: anyOf: - items: {} type: array - type: 'null' title: Tags model_aliases: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Aliases guardrails: anyOf: - items: type: string type: array - type: 'null' title: Guardrails policies: anyOf: - items: type: string type: array - type: 'null' title: Policies object_permission: anyOf: - $ref: '#/components/schemas/LiteLLM_ObjectPermissionBase' - type: 'null' disable_global_guardrails: anyOf: - type: boolean - type: 'null' title: Disable Global Guardrails team_member_budget: anyOf: - type: number - type: 'null' title: Team Member Budget team_member_budget_duration: anyOf: - type: string - type: 'null' title: Team Member Budget Duration team_member_rpm_limit: anyOf: - type: integer - type: 'null' title: Team Member Rpm Limit team_member_tpm_limit: anyOf: - type: integer - type: 'null' title: Team Member Tpm Limit team_member_key_duration: anyOf: - type: string - type: 'null' title: Team Member Key Duration allowed_passthrough_routes: anyOf: - items: {} type: array - type: 'null' title: Allowed Passthrough Routes secret_manager_settings: anyOf: - additionalProperties: true type: object - type: 'null' title: Secret Manager Settings prompts: anyOf: - items: type: string type: array - type: 'null' title: Prompts model_rpm_limit: anyOf: - additionalProperties: type: integer type: object - type: 'null' title: Model Rpm Limit model_tpm_limit: anyOf: - additionalProperties: type: integer type: object - type: 'null' title: Model Tpm Limit default_estimated_output_tokens: anyOf: - type: integer exclusiveMinimum: 0.0 - type: 'null' title: Default Estimated Output Tokens default_estimated_output_tokens_per_model: anyOf: - additionalProperties: type: integer exclusiveMinimum: 0.0 type: object - type: 'null' title: Default Estimated Output Tokens Per Model mcp_rpm_limit: anyOf: - additionalProperties: type: integer type: object - type: 'null' title: Mcp Rpm Limit allowed_vector_store_indexes: anyOf: - items: $ref: '#/components/schemas/AllowedVectorStoreIndexItem' type: array - type: 'null' title: Allowed Vector Store Indexes enforced_batch_output_expires_after: anyOf: - additionalProperties: true type: object - type: 'null' title: Enforced Batch Output Expires After enforced_file_expires_after: anyOf: - additionalProperties: true type: object - type: 'null' title: Enforced File Expires After router_settings: anyOf: - additionalProperties: true type: object - type: 'null' title: Router Settings access_group_ids: anyOf: - items: type: string type: array - type: 'null' title: Access Group Ids budget_limits: anyOf: - items: $ref: '#/components/schemas/BudgetLimitEntry' type: array - type: 'null' title: Budget Limits default_team_member_models: anyOf: - items: type: string type: array - type: 'null' title: Default Team Member Models type: object required: - team_id title: UpdateTeamRequest description: 'UpdateTeamRequest, used by /team/update when you need to update a team team_id: str team_alias: Optional[str] = None organization_id: Optional[str] = None metadata: Optional[dict] = None tpm_limit: Optional[int] = None rpm_limit: Optional[int] = None max_budget: Optional[float] = None models: Optional[list] = None blocked: Optional[bool] = None budget_duration: Optional[str] = None guardrails: Optional[List[str]] = None policies: Optional[List[str]] = None' MetricWithMetadata: properties: metrics: $ref: '#/components/schemas/SpendMetrics' metadata: additionalProperties: true type: object title: Metadata api_key_breakdown: additionalProperties: $ref: '#/components/schemas/KeyMetricWithMetadata' type: object title: Api Key Breakdown type: object required: - metrics title: MetricWithMetadata BudgetLimitEntry: properties: budget_duration: type: string title: Budget Duration max_budget: type: number title: Max Budget reset_at: anyOf: - type: string format: date-time - type: 'null' title: Reset At type: object required: - budget_duration - max_budget title: BudgetLimitEntry description: A single budget window with its own limit and independent reset schedule. BulkTeamMemberAddRequest: properties: team_id: type: string title: Team Id members: anyOf: - items: $ref: '#/components/schemas/Member' type: array - type: 'null' title: Members all_users: anyOf: - type: boolean - type: 'null' title: All Users default: false max_budget_in_team: anyOf: - type: number - type: 'null' title: Max Budget In Team type: object required: - team_id title: BulkTeamMemberAddRequest description: Request for bulk team member addition SpendAnalyticsPaginatedResponse: properties: results: items: $ref: '#/components/schemas/DailySpendData' type: array title: Results metadata: $ref: '#/components/schemas/DailySpendMetadata' type: object required: - results title: SpendAnalyticsPaginatedResponse KeyMetadata: properties: key_alias: anyOf: - type: string - type: 'null' title: Key Alias team_id: anyOf: - type: string - type: 'null' title: Team Id user_id: anyOf: - type: string - type: 'null' title: User Id user_email: anyOf: - type: string - type: 'null' title: User Email type: object title: KeyMetadata description: Metadata for a key BulkUpdateTeamMemberPermissionsResponse: properties: message: type: string title: Message teams_updated: type: integer title: Teams Updated permissions_appended: anyOf: - items: type: string type: array - type: 'null' title: Permissions Appended type: object required: - message - teams_updated title: BulkUpdateTeamMemberPermissionsResponse description: Response for bulk team member permissions update. HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError AddTeamCallback: properties: callback_name: type: string title: Callback Name callback_type: anyOf: - type: string enum: - success - failure - success_and_failure - type: 'null' title: Callback Type default: success_and_failure callback_vars: additionalProperties: type: string type: object title: Callback Vars type: object required: - callback_name - callback_vars title: AddTeamCallback LiteLLM_ObjectPermissionTable: properties: object_permission_id: type: string title: Object Permission Id mcp_servers: anyOf: - items: type: string type: array - type: 'null' title: Mcp Servers default: [] mcp_access_groups: anyOf: - items: type: string type: array - type: 'null' title: Mcp Access Groups default: [] mcp_tool_permissions: anyOf: - additionalProperties: items: type: string type: array type: object - type: 'null' title: Mcp Tool Permissions vector_stores: anyOf: - items: type: string type: array - type: 'null' title: Vector Stores default: [] agents: anyOf: - items: type: string type: array - type: 'null' title: Agents default: [] agent_access_groups: anyOf: - items: type: string type: array - type: 'null' title: Agent Access Groups default: [] models: anyOf: - items: type: string type: array - type: 'null' title: Models default: [] mcp_toolsets: anyOf: - items: type: string type: array - type: 'null' title: Mcp Toolsets blocked_tools: anyOf: - items: type: string type: array - type: 'null' title: Blocked Tools default: [] search_tools: anyOf: - items: type: string type: array - type: 'null' title: Search Tools default: [] mcp_tool_search_enabled: anyOf: - type: boolean - type: 'null' title: Mcp Tool Search Enabled skills: anyOf: - items: type: string type: array - type: 'null' title: Skills type: object required: - object_permission_id title: LiteLLM_ObjectPermissionTable description: Represents a LiteLLM_ObjectPermissionTable record TeamListItem: properties: team_alias: anyOf: - type: string - type: 'null' title: Team Alias team_id: type: string title: Team Id organization_id: anyOf: - type: string - type: 'null' title: Organization Id admins: items: type: string type: array title: Admins default: [] members: items: type: string type: array title: Members default: [] members_with_roles: items: $ref: '#/components/schemas/Member' type: array title: Members With Roles default: [] team_member_permissions: anyOf: - items: type: string type: array - type: 'null' title: Team Member Permissions metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata tpm_limit: anyOf: - type: integer - type: 'null' title: Tpm Limit rpm_limit: anyOf: - type: integer - type: 'null' title: Rpm Limit max_budget: anyOf: - type: number - type: 'null' title: Max Budget soft_budget: anyOf: - type: number - type: 'null' title: Soft Budget budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration budget_limits: anyOf: - items: $ref: '#/components/schemas/BudgetLimitEntry' type: array - type: 'null' title: Budget Limits models: items: type: string type: array title: Models default: [] blocked: type: boolean title: Blocked default: false router_settings: anyOf: - additionalProperties: true type: object - type: 'null' title: Router Settings access_group_ids: anyOf: - items: type: string type: array - type: 'null' title: Access Group Ids default_team_member_models: anyOf: - items: type: string type: array - type: 'null' title: Default Team Member Models spend: anyOf: - type: number - type: 'null' title: Spend max_parallel_requests: anyOf: - type: integer - type: 'null' title: Max Parallel Requests budget_reset_at: anyOf: - type: string format: date-time - type: 'null' title: Budget Reset At model_id: anyOf: - type: integer - type: 'null' title: Model Id model_spend: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Spend default: {} model_max_budget: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Max Budget default: {} policies: anyOf: - items: type: string type: array - type: 'null' title: Policies allow_team_guardrail_config: anyOf: - type: boolean - type: 'null' title: Allow Team Guardrail Config default: false litellm_model_table: anyOf: - $ref: '#/components/schemas/LiteLLM_ModelTable' - type: 'null' object_permission: anyOf: - $ref: '#/components/schemas/LiteLLM_ObjectPermissionTable' - type: 'null' object_permission_id: anyOf: - type: string - type: 'null' title: Object Permission Id updated_at: anyOf: - type: string format: date-time - type: 'null' title: Updated At created_at: anyOf: - type: string format: date-time - type: 'null' title: Created At members_count: type: integer title: Members Count default: 0 keys_count: type: integer title: Keys Count default: 0 access_group_models: anyOf: - items: type: string type: array - type: 'null' title: Access Group Models access_group_mcp_server_ids: anyOf: - items: type: string type: array - type: 'null' title: Access Group Mcp Server Ids access_group_agent_ids: anyOf: - items: type: string type: array - type: 'null' title: Access Group Agent Ids type: object required: - team_id title: TeamListItem description: A team item in the paginated list response, enriched with computed fields. KeyManagementRoutes: type: string enum: - /key/generate - /key/update - /key/delete - /key/regenerate - /key/service-account/generate - /key/{key_id}/regenerate - /key/block - /key/unblock - /key/bulk_update - /team/key/bulk_update - /key/{key_id}/reset_spend - /key/access_group_assignment - /auto_router/manage - /key/info - /key/health - /key/list - /key/aliases - /team/daily/activity - /team/daily/activity/aggregated - /spend/logs - /spend/logs/v2 title: KeyManagementRoutes description: Enum for key management routes TeamAddMemberResponse: properties: team_alias: anyOf: - type: string - type: 'null' title: Team Alias team_id: type: string title: Team Id organization_id: anyOf: - type: string - type: 'null' title: Organization Id admins: items: type: string type: array title: Admins default: [] members: items: type: string type: array title: Members default: [] members_with_roles: items: $ref: '#/components/schemas/Member' type: array title: Members With Roles default: [] team_member_permissions: anyOf: - items: type: string type: array - type: 'null' title: Team Member Permissions metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata tpm_limit: anyOf: - type: integer - type: 'null' title: Tpm Limit rpm_limit: anyOf: - type: integer - type: 'null' title: Rpm Limit max_budget: anyOf: - type: number - type: 'null' title: Max Budget soft_budget: anyOf: - type: number - type: 'null' title: Soft Budget budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration budget_limits: anyOf: - items: $ref: '#/components/schemas/BudgetLimitEntry' type: array - type: 'null' title: Budget Limits models: items: type: string type: array title: Models default: [] blocked: type: boolean title: Blocked default: false router_settings: anyOf: - additionalProperties: true type: object - type: 'null' title: Router Settings access_group_ids: anyOf: - items: type: string type: array - type: 'null' title: Access Group Ids default_team_member_models: anyOf: - items: type: string type: array - type: 'null' title: Default Team Member Models spend: anyOf: - type: number - type: 'null' title: Spend max_parallel_requests: anyOf: - type: integer - type: 'null' title: Max Parallel Requests budget_reset_at: anyOf: - type: string format: date-time - type: 'null' title: Budget Reset At model_id: anyOf: - type: integer - type: 'null' title: Model Id model_spend: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Spend default: {} model_max_budget: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Max Budget default: {} policies: anyOf: - items: type: string type: array - type: 'null' title: Policies allow_team_guardrail_config: anyOf: - type: boolean - type: 'null' title: Allow Team Guardrail Config default: false litellm_model_table: anyOf: - $ref: '#/components/schemas/LiteLLM_ModelTable' - type: 'null' object_permission: anyOf: - $ref: '#/components/schemas/LiteLLM_ObjectPermissionTable' - type: 'null' object_permission_id: anyOf: - type: string - type: 'null' title: Object Permission Id updated_at: anyOf: - type: string format: date-time - type: 'null' title: Updated At created_at: anyOf: - type: string format: date-time - type: 'null' title: Created At updated_users: items: $ref: '#/components/schemas/LiteLLM_UserTable' type: array title: Updated Users updated_team_memberships: items: $ref: '#/components/schemas/LiteLLM_TeamMembership' type: array title: Updated Team Memberships type: object required: - team_id - updated_users - updated_team_memberships title: TeamAddMemberResponse ResetSpendRequest: properties: reset_to: type: number title: Reset To type: object required: - reset_to title: ResetSpendRequest TeamMemberUpdateResponse: properties: user_id: type: string title: User Id user_email: anyOf: - type: string - type: 'null' title: User Email team_id: type: string title: Team Id max_budget_in_team: anyOf: - type: number - type: 'null' title: Max Budget In Team tpm_limit: anyOf: - type: integer - type: 'null' title: Tpm Limit rpm_limit: anyOf: - type: integer - type: 'null' title: Rpm Limit budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration allowed_models: anyOf: - items: type: string type: array - type: 'null' title: Allowed Models type: object required: - user_id - team_id title: TeamMemberUpdateResponse KeyMetricWithMetadata: properties: metrics: $ref: '#/components/schemas/SpendMetrics' metadata: $ref: '#/components/schemas/KeyMetadata' type: object required: - metrics title: KeyMetricWithMetadata description: Base class for metrics with additional metadata TeamCallbackDeleteResponseData: properties: team_id: type: string title: Team Id success_callbacks: items: type: string type: array title: Success Callbacks failure_callbacks: items: type: string type: array title: Failure Callbacks type: object required: - team_id - success_callbacks - failure_callbacks title: TeamCallbackDeleteResponseData LiteLLM_DeletedTeamTable: properties: team_alias: anyOf: - type: string - type: 'null' title: Team Alias team_id: type: string title: Team Id organization_id: anyOf: - type: string - type: 'null' title: Organization Id admins: items: type: string type: array title: Admins default: [] members: items: type: string type: array title: Members default: [] members_with_roles: items: $ref: '#/components/schemas/Member' type: array title: Members With Roles default: [] team_member_permissions: anyOf: - items: type: string type: array - type: 'null' title: Team Member Permissions metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata tpm_limit: anyOf: - type: integer - type: 'null' title: Tpm Limit rpm_limit: anyOf: - type: integer - type: 'null' title: Rpm Limit max_budget: anyOf: - type: number - type: 'null' title: Max Budget soft_budget: anyOf: - type: number - type: 'null' title: Soft Budget budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration budget_limits: anyOf: - items: $ref: '#/components/schemas/BudgetLimitEntry' type: array - type: 'null' title: Budget Limits models: items: type: string type: array title: Models default: [] blocked: type: boolean title: Blocked default: false router_settings: anyOf: - additionalProperties: true type: object - type: 'null' title: Router Settings access_group_ids: anyOf: - items: type: string type: array - type: 'null' title: Access Group Ids default_team_member_models: anyOf: - items: type: string type: array - type: 'null' title: Default Team Member Models spend: anyOf: - type: number - type: 'null' title: Spend max_parallel_requests: anyOf: - type: integer - type: 'null' title: Max Parallel Requests budget_reset_at: anyOf: - type: string format: date-time - type: 'null' title: Budget Reset At model_id: anyOf: - type: integer - type: 'null' title: Model Id model_spend: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Spend default: {} model_max_budget: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Max Budget default: {} policies: anyOf: - items: type: string type: array - type: 'null' title: Policies allow_team_guardrail_config: anyOf: - type: boolean - type: 'null' title: Allow Team Guardrail Config default: false litellm_model_table: anyOf: - $ref: '#/components/schemas/LiteLLM_ModelTable' - type: 'null' object_permission: anyOf: - $ref: '#/components/schemas/LiteLLM_ObjectPermissionTable' - type: 'null' object_permission_id: anyOf: - type: string - type: 'null' title: Object Permission Id updated_at: anyOf: - type: string format: date-time - type: 'null' title: Updated At created_at: anyOf: - type: string format: date-time - type: 'null' title: Created At id: anyOf: - type: string - type: 'null' title: Id deleted_at: anyOf: - type: string format: date-time - type: 'null' title: Deleted At deleted_by: anyOf: - type: string - type: 'null' title: Deleted By deleted_by_api_key: anyOf: - type: string - type: 'null' title: Deleted By Api Key litellm_changed_by: anyOf: - type: string - type: 'null' title: Litellm Changed By type: object required: - team_id title: LiteLLM_DeletedTeamTable description: Audit record for deleted teams; mirrors the team plus deletion metadata. TeamMetadataFieldSchema: properties: key: type: string minLength: 1 title: Key label: anyOf: - type: string - type: 'null' title: Label additionalProperties: false type: object required: - key title: TeamMetadataFieldSchema description: 'One declared team metadata field from ``general_settings.team_metadata_schema``. Advisory only: the UI uses it to prepopulate the team metadata form. Enforcement stays with ``custom_team_metadata_validate``.' NewTeamRequest: properties: team_alias: anyOf: - type: string - type: 'null' title: Team Alias team_id: anyOf: - type: string - type: 'null' title: Team Id organization_id: anyOf: - type: string - type: 'null' title: Organization Id admins: items: type: string type: array title: Admins default: [] members: items: type: string type: array title: Members default: [] members_with_roles: items: $ref: '#/components/schemas/Member' type: array title: Members With Roles default: [] team_member_permissions: anyOf: - items: type: string type: array - type: 'null' title: Team Member Permissions metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata tpm_limit: anyOf: - type: integer - type: 'null' title: Tpm Limit rpm_limit: anyOf: - type: integer - type: 'null' title: Rpm Limit max_budget: anyOf: - type: number - type: 'null' title: Max Budget soft_budget: anyOf: - type: number - type: 'null' title: Soft Budget budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration budget_limits: anyOf: - items: $ref: '#/components/schemas/BudgetLimitEntry' type: array - type: 'null' title: Budget Limits models: items: type: string type: array title: Models default: [] blocked: type: boolean title: Blocked default: false router_settings: anyOf: - additionalProperties: true type: object - type: 'null' title: Router Settings access_group_ids: anyOf: - items: type: string type: array - type: 'null' title: Access Group Ids default_team_member_models: anyOf: - items: type: string type: array - type: 'null' title: Default Team Member Models model_aliases: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Aliases tags: anyOf: - items: {} type: array - type: 'null' title: Tags guardrails: anyOf: - items: type: string type: array - type: 'null' title: Guardrails policies: anyOf: - items: type: string type: array - type: 'null' title: Policies prompts: anyOf: - items: type: string type: array - type: 'null' title: Prompts object_permission: anyOf: - $ref: '#/components/schemas/LiteLLM_ObjectPermissionBase' - type: 'null' allowed_passthrough_routes: anyOf: - items: {} type: array - type: 'null' title: Allowed Passthrough Routes disable_global_guardrails: anyOf: - type: boolean - type: 'null' title: Disable Global Guardrails secret_manager_settings: anyOf: - additionalProperties: true type: object - type: 'null' title: Secret Manager Settings model_rpm_limit: anyOf: - additionalProperties: type: integer type: object - type: 'null' title: Model Rpm Limit rpm_limit_type: anyOf: - type: string enum: - guaranteed_throughput - best_effort_throughput - type: 'null' title: Rpm Limit Type tpm_limit_type: anyOf: - type: string enum: - guaranteed_throughput - best_effort_throughput - type: 'null' title: Tpm Limit Type model_tpm_limit: anyOf: - additionalProperties: type: integer type: object - type: 'null' title: Model Tpm Limit default_estimated_output_tokens: anyOf: - type: integer exclusiveMinimum: 0.0 - type: 'null' title: Default Estimated Output Tokens default_estimated_output_tokens_per_model: anyOf: - additionalProperties: type: integer exclusiveMinimum: 0.0 type: object - type: 'null' title: Default Estimated Output Tokens Per Model mcp_rpm_limit: anyOf: - additionalProperties: type: integer type: object - type: 'null' title: Mcp Rpm Limit team_member_budget: anyOf: - type: number - type: 'null' title: Team Member Budget team_member_rpm_limit: anyOf: - type: integer - type: 'null' title: Team Member Rpm Limit team_member_tpm_limit: anyOf: - type: integer - type: 'null' title: Team Member Tpm Limit team_member_key_duration: anyOf: - type: string - type: 'null' title: Team Member Key Duration team_member_budget_duration: anyOf: - type: string - type: 'null' title: Team Member Budget Duration allowed_vector_store_indexes: anyOf: - items: $ref: '#/components/schemas/AllowedVectorStoreIndexItem' type: array - type: 'null' title: Allowed Vector Store Indexes enforced_batch_output_expires_after: anyOf: - additionalProperties: true type: object - type: 'null' title: Enforced Batch Output Expires After enforced_file_expires_after: anyOf: - additionalProperties: true type: object - type: 'null' title: Enforced File Expires After type: object title: NewTeamRequest BulkUpdateTeamMemberPermissionsRequest: properties: permissions: items: $ref: '#/components/schemas/KeyManagementRoutes' type: array title: Permissions team_ids: anyOf: - items: type: string type: array - type: 'null' title: Team Ids apply_to_all_teams: type: boolean title: Apply To All Teams default: false type: object required: - permissions title: BulkUpdateTeamMemberPermissionsRequest description: Request to bulk-update team member permissions across teams. DailySpendMetadata: properties: total_spend: type: number title: Total Spend default: 0.0 total_flat_cost: type: number title: Total Flat Cost default: 0.0 total_prompt_tokens: type: integer title: Total Prompt Tokens default: 0 total_completion_tokens: type: integer title: Total Completion Tokens default: 0 total_tokens: type: integer title: Total Tokens default: 0 total_api_requests: type: integer title: Total Api Requests default: 0 total_successful_requests: type: integer title: Total Successful Requests default: 0 total_failed_requests: type: integer title: Total Failed Requests default: 0 total_cache_read_input_tokens: type: integer title: Total Cache Read Input Tokens default: 0 total_cache_creation_input_tokens: type: integer title: Total Cache Creation Input Tokens default: 0 total_compression_saved_tokens: type: integer title: Total Compression Saved Tokens default: 0 total_compression_savings_spend: type: number title: Total Compression Savings Spend default: 0.0 total_prompt_caching_savings_spend: type: number title: Total Prompt Caching Savings Spend default: 0.0 total_gateway_injected_caching_savings_spend: type: number title: Total Gateway Injected Caching Savings Spend default: 0.0 total_autorouter_savings_spend: type: number title: Total Autorouter Savings Spend default: 0.0 page: type: integer title: Page default: 1 total_pages: type: integer title: Total Pages default: 1 has_more: type: boolean title: Has More default: false type: object title: DailySpendMetadata DailySpendData: properties: date: type: string format: date title: Date metrics: $ref: '#/components/schemas/SpendMetrics' breakdown: $ref: '#/components/schemas/BreakdownMetrics' type: object required: - date - metrics title: DailySpendData TeamUserSpendRow: properties: team_id: type: string title: Team Id team_alias: anyOf: - type: string - type: 'null' title: Team Alias user_id: type: string title: User Id user_email: anyOf: - type: string - type: 'null' title: User Email user_alias: anyOf: - type: string - type: 'null' title: User Alias spend: type: number title: Spend default: 0.0 prompt_tokens: type: integer title: Prompt Tokens default: 0 completion_tokens: type: integer title: Completion Tokens default: 0 total_tokens: type: integer title: Total Tokens default: 0 api_requests: type: integer title: Api Requests default: 0 successful_requests: type: integer title: Successful Requests default: 0 failed_requests: type: integer title: Failed Requests default: 0 type: object required: - team_id - user_id title: TeamUserSpendRow PatchTeamRequest: properties: team_id: anyOf: - type: string - type: 'null' title: Team Id team_alias: anyOf: - type: string - type: 'null' title: Team Alias organization_id: anyOf: - type: string - type: 'null' title: Organization Id metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata tpm_limit: anyOf: - type: integer - type: 'null' title: Tpm Limit rpm_limit: anyOf: - type: integer - type: 'null' title: Rpm Limit max_budget: anyOf: - type: number - type: 'null' title: Max Budget soft_budget: anyOf: - type: number - type: 'null' title: Soft Budget models: anyOf: - items: {} type: array - type: 'null' title: Models blocked: anyOf: - type: boolean - type: 'null' title: Blocked budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration tags: anyOf: - items: {} type: array - type: 'null' title: Tags model_aliases: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Aliases guardrails: anyOf: - items: type: string type: array - type: 'null' title: Guardrails policies: anyOf: - items: type: string type: array - type: 'null' title: Policies object_permission: anyOf: - $ref: '#/components/schemas/LiteLLM_ObjectPermissionBase' - type: 'null' disable_global_guardrails: anyOf: - type: boolean - type: 'null' title: Disable Global Guardrails team_member_budget: anyOf: - type: number - type: 'null' title: Team Member Budget team_member_budget_duration: anyOf: - type: string - type: 'null' title: Team Member Budget Duration team_member_rpm_limit: anyOf: - type: integer - type: 'null' title: Team Member Rpm Limit team_member_tpm_limit: anyOf: - type: integer - type: 'null' title: Team Member Tpm Limit team_member_key_duration: anyOf: - type: string - type: 'null' title: Team Member Key Duration allowed_passthrough_routes: anyOf: - items: {} type: array - type: 'null' title: Allowed Passthrough Routes secret_manager_settings: anyOf: - additionalProperties: true type: object - type: 'null' title: Secret Manager Settings prompts: anyOf: - items: type: string type: array - type: 'null' title: Prompts model_rpm_limit: anyOf: - additionalProperties: type: integer type: object - type: 'null' title: Model Rpm Limit model_tpm_limit: anyOf: - additionalProperties: type: integer type: object - type: 'null' title: Model Tpm Limit default_estimated_output_tokens: anyOf: - type: integer exclusiveMinimum: 0.0 - type: 'null' title: Default Estimated Output Tokens default_estimated_output_tokens_per_model: anyOf: - additionalProperties: type: integer exclusiveMinimum: 0.0 type: object - type: 'null' title: Default Estimated Output Tokens Per Model mcp_rpm_limit: anyOf: - additionalProperties: type: integer type: object - type: 'null' title: Mcp Rpm Limit allowed_vector_store_indexes: anyOf: - items: $ref: '#/components/schemas/AllowedVectorStoreIndexItem' type: array - type: 'null' title: Allowed Vector Store Indexes enforced_batch_output_expires_after: anyOf: - additionalProperties: true type: object - type: 'null' title: Enforced Batch Output Expires After enforced_file_expires_after: anyOf: - additionalProperties: true type: object - type: 'null' title: Enforced File Expires After router_settings: anyOf: - additionalProperties: true type: object - type: 'null' title: Router Settings access_group_ids: anyOf: - items: type: string type: array - type: 'null' title: Access Group Ids budget_limits: anyOf: - items: $ref: '#/components/schemas/BudgetLimitEntry' type: array - type: 'null' title: Budget Limits default_team_member_models: anyOf: - items: type: string type: array - type: 'null' title: Default Team Member Models type: object title: PatchTeamRequest description: 'Body of PATCH /team/{team_id}. Identical to UpdateTeamRequest except team_id is optional, because PATCH takes it from the path. A team_id in the body is still accepted when it matches the path.' Member: properties: user_id: anyOf: - type: string - type: 'null' title: User Id description: The unique ID of the user to add. Either user_id or user_email must be provided user_email: anyOf: - type: string - type: 'null' title: User Email description: The email address of the user to add. Either user_id or user_email must be provided role: type: string enum: - admin - user title: Role description: The role of the user within the team. 'admin' users can manage team settings and members, 'user' is a regular team member type: object required: - role title: Member BreakdownMetrics: properties: mcp_servers: additionalProperties: $ref: '#/components/schemas/MetricWithMetadata' type: object title: Mcp Servers models: additionalProperties: $ref: '#/components/schemas/MetricWithMetadata' type: object title: Models model_groups: additionalProperties: $ref: '#/components/schemas/MetricWithMetadata' type: object title: Model Groups providers: additionalProperties: $ref: '#/components/schemas/MetricWithMetadata' type: object title: Providers endpoints: additionalProperties: $ref: '#/components/schemas/MetricWithMetadata' type: object title: Endpoints api_keys: additionalProperties: $ref: '#/components/schemas/KeyMetricWithMetadata' type: object title: Api Keys entities: additionalProperties: $ref: '#/components/schemas/MetricWithMetadata' type: object title: Entities type: object title: BreakdownMetrics description: Breakdown of spend by different dimensions TeamUserSpendResponse: properties: start_date: type: string title: Start Date end_date: type: string title: End Date results: items: $ref: '#/components/schemas/TeamUserSpendRow' type: array title: Results type: object required: - start_date - end_date - results title: TeamUserSpendResponse GetTeamMemberPermissionsResponse: properties: team_id: type: string title: Team Id team_member_permissions: anyOf: - items: type: string type: array - type: 'null' title: Team Member Permissions default: [] all_available_permissions: items: type: string type: array title: All Available Permissions type: object required: - team_id - all_available_permissions title: GetTeamMemberPermissionsResponse description: Response to get the team member permissions for a team TeamModelDeleteRequest: properties: team_id: type: string title: Team Id models: items: type: string type: array title: Models type: object required: - team_id - models title: TeamModelDeleteRequest description: Request to delete models from a team SpendMetrics: properties: spend: type: number title: Spend default: 0.0 flat_cost: type: number title: Flat Cost default: 0.0 prompt_tokens: type: integer title: Prompt Tokens default: 0 completion_tokens: type: integer title: Completion Tokens default: 0 cache_read_input_tokens: type: integer title: Cache Read Input Tokens default: 0 cache_creation_input_tokens: type: integer title: Cache Creation Input Tokens default: 0 compression_saved_tokens: type: integer title: Compression Saved Tokens default: 0 compression_savings_spend: type: number title: Compression Savings Spend default: 0.0 prompt_caching_savings_spend: type: number title: Prompt Caching Savings Spend default: 0.0 gateway_injected_caching_savings_spend: type: number title: Gateway Injected Caching Savings Spend default: 0.0 autorouter_savings_spend: type: number title: Autorouter Savings Spend default: 0.0 total_tokens: type: integer title: Total Tokens default: 0 successful_requests: type: integer title: Successful Requests default: 0 failed_requests: type: integer title: Failed Requests default: 0 api_requests: type: integer title: Api Requests default: 0 type: object title: SpendMetrics LiteLLM_ModelTable: properties: id: anyOf: - type: integer - type: 'null' title: Id model_aliases: anyOf: - type: string - additionalProperties: true type: object - type: 'null' title: Model Aliases created_by: type: string title: Created By updated_by: type: string title: Updated By team: anyOf: - $ref: '#/components/schemas/LiteLLM_TeamTable' - type: 'null' type: object required: - created_by - updated_by title: LiteLLM_ModelTable UpdateTeamMemberPermissionsRequest: properties: team_id: type: string title: Team Id team_member_permissions: items: type: string type: array title: Team Member Permissions type: object required: - team_id - team_member_permissions title: UpdateTeamMemberPermissionsRequest description: Request to update the team member permissions for a team AllowedVectorStoreIndexItem: properties: index_name: type: string title: Index Name index_permissions: items: type: string enum: - read - write type: array title: Index Permissions type: object required: - index_name - index_permissions title: AllowedVectorStoreIndexItem LiteLLM_BudgetTable: properties: budget_id: anyOf: - type: string - type: 'null' title: Budget Id soft_budget: anyOf: - type: number - type: 'null' title: Soft Budget max_budget: anyOf: - type: number - type: 'null' title: Max Budget max_parallel_requests: anyOf: - type: integer - type: 'null' title: Max Parallel Requests tpm_limit: anyOf: - type: integer - type: 'null' title: Tpm Limit rpm_limit: anyOf: - type: integer - type: 'null' title: Rpm Limit model_max_budget: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Max Budget budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration allowed_models: anyOf: - items: type: string type: array - type: 'null' title: Allowed Models type: object title: LiteLLM_BudgetTable description: 'Represents user-controllable params for a LiteLLM_BudgetTable record. Budget-write paths use `model_fields.keys()` on this class as an allowlist for user input. Keep server-managed fields (e.g. `budget_reset_at`) on `LiteLLM_BudgetTableFull` so they aren''t user-settable.' LiteLLM_BudgetTableFull: properties: budget_id: anyOf: - type: string - type: 'null' title: Budget Id soft_budget: anyOf: - type: number - type: 'null' title: Soft Budget max_budget: anyOf: - type: number - type: 'null' title: Max Budget max_parallel_requests: anyOf: - type: integer - type: 'null' title: Max Parallel Requests tpm_limit: anyOf: - type: integer - type: 'null' title: Tpm Limit rpm_limit: anyOf: - type: integer - type: 'null' title: Rpm Limit model_max_budget: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Max Budget budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration allowed_models: anyOf: - items: type: string type: array - type: 'null' title: Allowed Models budget_reset_at: anyOf: - type: string format: date-time - type: 'null' title: Budget Reset At created_at: type: string format: date-time title: Created At type: object required: - created_at title: LiteLLM_BudgetTableFull description: LiteLLM_BudgetTable + server-managed fields returned on API responses. LiteLLM_TeamTable: properties: team_alias: anyOf: - type: string - type: 'null' title: Team Alias team_id: type: string title: Team Id organization_id: anyOf: - type: string - type: 'null' title: Organization Id admins: items: type: string type: array title: Admins default: [] members: items: type: string type: array title: Members default: [] members_with_roles: items: $ref: '#/components/schemas/Member' type: array title: Members With Roles default: [] team_member_permissions: anyOf: - items: type: string type: array - type: 'null' title: Team Member Permissions metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata tpm_limit: anyOf: - type: integer - type: 'null' title: Tpm Limit rpm_limit: anyOf: - type: integer - type: 'null' title: Rpm Limit max_budget: anyOf: - type: number - type: 'null' title: Max Budget soft_budget: anyOf: - type: number - type: 'null' title: Soft Budget budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration budget_limits: anyOf: - items: $ref: '#/components/schemas/BudgetLimitEntry' type: array - type: 'null' title: Budget Limits models: items: type: string type: array title: Models default: [] blocked: type: boolean title: Blocked default: false router_settings: anyOf: - additionalProperties: true type: object - type: 'null' title: Router Settings access_group_ids: anyOf: - items: type: string type: array - type: 'null' title: Access Group Ids default_team_member_models: anyOf: - items: type: string type: array - type: 'null' title: Default Team Member Models spend: anyOf: - type: number - type: 'null' title: Spend max_parallel_requests: anyOf: - type: integer - type: 'null' title: Max Parallel Requests budget_reset_at: anyOf: - type: string format: date-time - type: 'null' title: Budget Reset At model_id: anyOf: - type: integer - type: 'null' title: Model Id model_spend: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Spend default: {} model_max_budget: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Max Budget default: {} policies: anyOf: - items: type: string type: array - type: 'null' title: Policies allow_team_guardrail_config: anyOf: - type: boolean - type: 'null' title: Allow Team Guardrail Config default: false litellm_model_table: anyOf: - $ref: '#/components/schemas/LiteLLM_ModelTable' - type: 'null' object_permission: anyOf: - $ref: '#/components/schemas/LiteLLM_ObjectPermissionTable' - type: 'null' object_permission_id: anyOf: - type: string - type: 'null' title: Object Permission Id updated_at: anyOf: - type: string format: date-time - type: 'null' title: Updated At created_at: anyOf: - type: string format: date-time - type: 'null' title: Created At type: object required: - team_id title: LiteLLM_TeamTable TeamListResponse: properties: teams: items: anyOf: - $ref: '#/components/schemas/TeamListItem' - $ref: '#/components/schemas/LiteLLM_TeamTable' - $ref: '#/components/schemas/LiteLLM_DeletedTeamTable' type: array title: Teams total: type: integer title: Total page: type: integer title: Page page_size: type: integer title: Page Size total_pages: type: integer title: Total Pages type: object required: - teams - total - page - page_size - total_pages title: TeamListResponse description: Response to get the list of teams BulkTeamMemberAddResponse: properties: team_id: type: string title: Team Id results: items: $ref: '#/components/schemas/TeamMemberAddResult' type: array title: Results total_requested: type: integer title: Total Requested successful_additions: type: integer title: Successful Additions failed_additions: type: integer title: Failed Additions updated_team: anyOf: - additionalProperties: true type: object - type: 'null' title: Updated Team type: object required: - team_id - results - total_requested - successful_additions - failed_additions title: BulkTeamMemberAddResponse description: Response for bulk team member add operations DeleteTeamRequest: properties: team_ids: items: type: string type: array title: Team Ids type: object required: - team_ids title: DeleteTeamRequest TeamMemberAddRequest: properties: member: anyOf: - items: $ref: '#/components/schemas/Member' type: array - $ref: '#/components/schemas/Member' title: Member description: Member object or list of member objects to add. Each member must include either user_id or user_email, and a role team_id: type: string title: Team Id description: The ID of the team to add the member to max_budget_in_team: anyOf: - type: number - type: 'null' title: Max Budget In Team description: Maximum budget allocated to this user within the team. If not set, user has unlimited budget within team limits budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration description: Duration after which this team member's budget resets (e.g. '1h', '24h', '7d', '30d'). If not set, the budget never resets. allowed_models: anyOf: - items: type: string type: array - type: 'null' title: Allowed Models description: List of models this team member can access. If not set, inherits the team's default_team_member_models or all team models. type: object required: - member - team_id title: TeamMemberAddRequest description: "Request body for adding members to a team.\n\nExample:\n```json\n{\n \"team_id\": \"45e3e396-ee08-4a61-a88e-16b3ce7e0849\",\n \"member\": {\n \"role\": \"user\",\n \"user_id\": \"user123\"\n },\n \"max_budget_in_team\": 100.0\n}\n```" BlockTeamRequest: properties: team_id: type: string title: Team Id type: object required: - team_id title: BlockTeamRequest securitySchemes: APIKeyHeader: type: apiKey description: Bearer token in: header name: x-litellm-api-key