{ "/team/available": { "get": { "summary": "List Available Teams", "operationId": "list_available_teams_team_available_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "response_model", "in": "query", "required": false, "schema": { "title": "Response Model" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "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.\n\nParameters:\n- team_id: str - Required. The unique identifier of the team to block.\n\nExample:\n```\ncurl --location 'http://0.0.0.0:4000/team/block' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{\n \"team_id\": \"team-1234\"\n}'\n```\n\nReturns:\n- 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/bulk_member_add": { "post": { "tags": [ "team management" ], "summary": "Bulk Team Member Add", "description": "Bulk add multiple members to a team at once.\n\nThis endpoint reuses the same logic as /team/member_add but provides a bulk-friendly response format.\n\nParameters:\n- team_id: str - The ID of the team to add members to\n- members: List[Member] - List of members to add to the team\n- all_users: Optional[bool] - Flag to add all users on Proxy to the team\n- max_budget_in_team: Optional[float] - Maximum budget allocated to each user within the team\n\nReturns:\n- results: List of individual member addition results\n- total_requested: Total number of members requested for addition\n- successful_additions: Number of successful additions \n- failed_additions: Number of failed additions\n- updated_team: The updated team object\n\nExample request:\n```bash\ncurl --location 'http://0.0.0.0:4000/team/bulk_member_add' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{\n \"team_id\": \"team-1234\",\n \"members\": [\n {\n \"user_id\": \"user1\",\n \"role\": \"user\"\n },\n {\n \"user_email\": \"user2@example.com\",\n \"role\": \"admin\"\n }\n ],\n \"max_budget_in_team\": 100.0\n}'\n```", "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/daily/activity": { "get": { "tags": [ "team management" ], "summary": "Get Team Daily Activity", "description": "Get daily activity for specific teams or all teams.\n\nArgs:\n team_ids (Optional[str]): Comma-separated list of team IDs to filter by. If not provided, returns data for all teams.\n start_date (Optional[str]): Start date for the activity period (YYYY-MM-DD).\n end_date (Optional[str]): End date for the activity period (YYYY-MM-DD).\n model (Optional[str]): Filter by model name.\n api_key (Optional[str]): Filter by API key.\n page (int): Page number for pagination.\n page_size (int): Number of items per page.\n exclude_team_ids (Optional[str]): Comma-separated list of team IDs to exclude.\nReturns:\n 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/delete": { "post": { "tags": [ "team management" ], "summary": "Delete Team", "description": "delete team and associated team keys\n\nParameters:\n- team_ids: List[str] - Required. List of team IDs to delete. Example: [\"team-1234\", \"team-5678\"]\n\n```\ncurl --location 'http://0.0.0.0:4000/team/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{\n \"team_ids\": [\"8d916b1c-510d-4894-a334-1c16a93344f5\"]\n}'\n```", "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\n\nParameters:\n- team_id: str - Required. The unique identifier of the team to get info on.\n\n```\ncurl --location 'http://localhost:4000/team/info?team_id=your_team_id_here' --header 'Authorization: Bearer your_api_key_here'\n```", "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" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/team/list": { "get": { "tags": [ "team management" ], "summary": "List Team", "description": "```\ncurl --location --request GET 'http://0.0.0.0:4000/team/list' --header 'Authorization: Bearer sk-1234'\n```\n\nParameters:\n- user_id: str - Optional. If passed will only return teams that the user_id is a member of.\n- 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/member_add": { "post": { "tags": [ "team management" ], "summary": "Team Member Add", "description": "Add new members (either via user_email or user_id) to a team\n\nIf user doesn't exist, new user row will also be added to User Table\n\nOnly proxy_admin or admin of team, allowed to access this endpoint.\n```\n\ncurl -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\"}}'\n\n```", "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]\n\ndelete members (either via user_email or user_id) from a team\n\nIf user doesn't exist, an exception will be raised\n```\ncurl -X POST 'http://0.0.0.0:8000/team/member_delete' \n-H 'Authorization: Bearer sk-1234' \n-H 'Content-Type: application/json' \n-d '{\n \"team_id\": \"45e3e396-ee08-4a61-a88e-16b3ce7e0849\",\n \"user_id\": \"krrish247652@berri.ai\"\n}'\n```", "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]\n\nUpdate 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/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.\n\nParameters:\n- team_id: str - Required. The team to add models to\n- models: List[str] - Required. List of models to add to the team\n\nExample Request:\n```\ncurl --location 'http://0.0.0.0:4000/team/model/add' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{\n \"team_id\": \"team-1234\",\n \"models\": [\"gpt-4\", \"claude-2\"]\n}'\n```", "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.\n\nParameters:\n- team_id: str - Required. The team to remove models from\n- models: List[str] - Required. List of models to remove from the team\n\nExample Request:\n```\ncurl --location 'http://0.0.0.0:4000/team/model/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{\n \"team_id\": \"team-1234\",\n \"models\": [\"gpt-4\"]\n}'\n```", "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/new": { "post": { "tags": [ "team management" ], "summary": "New Team", "description": "Allow users to create a new team. Apply user permissions to their team.\n\n\ud83d\udc49 [Detailed Doc on setting team budgets](https://docs.litellm.ai/docs/proxy/team_budgets)\n\n\nParameters:\n- team_alias: Optional[str] - User defined team alias\n- team_id: Optional[str] - The team id of the user. If none passed, we'll generate it.\n- members_with_roles: List[{\"role\": \"admin\" or \"user\", \"user_id\": \"\"}] - A list of users and their roles in the team. Get user_id when making a new user via `/user/new`.\n- team_member_permissions: Optional[List[str]] - A list of routes that non-admin team members can access. example: [\"/key/generate\", \"/key/update\", \"/key/delete\"]\n- metadata: Optional[dict] - Metadata for team, store information for team. Example metadata = {\"extra_info\": \"some info\"}\n- model_rpm_limit: Optional[Dict[str, int]] - The RPM (Requests Per Minute) limit for this team - applied across all keys for this team. \n- model_tpm_limit: Optional[Dict[str, int]] - The TPM (Tokens Per Minute) limit for this team - applied across all keys for this team.\n- tpm_limit: Optional[int] - The TPM (Tokens Per Minute) limit for this team - all keys with this team_id will have at max this TPM limit\n- rpm_limit: Optional[int] - The RPM (Requests Per Minute) limit for this team - all keys associated with this team_id will have at max this RPM limit\n- rpm_limit_type: Optional[Literal[\"guaranteed_throughput\", \"best_effort_throughput\"]] - The type of RPM limit enforcement. Use \"guaranteed_throughput\" to raise an error if overallocating RPM, or \"best_effort_throughput\" for best effort enforcement.\n- tpm_limit_type: Optional[Literal[\"guaranteed_throughput\", \"best_effort_throughput\"]] - The type of TPM limit enforcement. Use \"guaranteed_throughput\" to raise an error if overallocating TPM, or \"best_effort_throughput\" for best effort enforcement.\n- max_budget: Optional[float] - The maximum budget allocated to the team - all keys for this team_id will have at max this max_budget\n- soft_budget: Optional[float] - The soft budget threshold for the team. If max_budget is set, soft_budget must be strictly lower than max_budget. Can be set independently if max_budget is not set.\n- budget_duration: Optional[str] - The duration of the budget for the team. Doc [here](https://docs.litellm.ai/docs/proxy/team_budgets)\n- models: Optional[list] - A list of models associated with the team - all keys for this team_id will have at most, these models. If empty, assumes all models are allowed.\n- blocked: bool - Flag indicating if the team is blocked or not - will stop all calls from keys with this team_id.\n- members: Optional[List] - Control team members via `/team/member/add` and `/team/member/delete`.\n- tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing).\n- prompts: Optional[List[str]] - List of prompts that the team is allowed to use.\n- organization_id: Optional[str] - The organization id of the team. Default is None. Create via `/organization/new`.\n- model_aliases: Optional[dict] - Model aliases for the team. [Docs](https://docs.litellm.ai/docs/proxy/team_based_routing#create-team-with-model-alias)\n- guardrails: Optional[List[str]] - Guardrails for the team. [Docs](https://docs.litellm.ai/docs/proxy/guardrails)\n- policies: Optional[List[str]] - Policies for the team. [Docs](https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies)\n- disable_global_guardrails: Optional[bool] - Whether to disable global guardrails for the key.\n- object_permission: Optional[LiteLLM_ObjectPermissionBase] - team-specific object permission. Example - {\"vector_stores\": [\"vector_store_1\", \"vector_store_2\"], \"agents\": [\"agent_1\", \"agent_2\"], \"agent_access_groups\": [\"dev_group\"]}. IF null or {} then no object permission.\n- team_member_budget: Optional[float] - The maximum budget allocated to an individual team member.\n- team_member_budget_duration: Optional[str] - The duration of the budget for the team member. Doc [here](https://docs.litellm.ai/docs/proxy/team_budgets)\n- team_member_rpm_limit: Optional[int] - The RPM (Requests Per Minute) limit for individual team members.\n- team_member_tpm_limit: Optional[int] - The TPM (Tokens Per Minute) limit for individual team members.\n- team_member_key_duration: Optional[str] - The duration for a team member's key. e.g. \"1d\", \"1w\", \"1mo\"\n- allowed_passthrough_routes: Optional[List[str]] - List of allowed pass through routes for the team.\n- allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{\"index_name\": \"my-index\", \"index_permissions\": [\"write\", \"read\"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint.\n- secret_manager_settings: Optional[dict] - Secret manager settings for the team. [Docs](https://docs.litellm.ai/docs/secret_managers/overview)\n- router_settings: Optional[UpdateRouterConfig] - team-specific router settings. Example - {\"model_group_retry_policy\": {\"max_retries\": 5}}. IF null or {} then no router settings.\n- access_group_ids: Optional[List[str]] - List of access group IDs to associate with the team. Access groups define which models the team can access. Example - [\"access_group_1\", \"access_group_2\"].\n- enforced_file_expires_after: Optional[dict] - Enforced file expiration policy for the team. Keys created under this team will inherit this policy for file uploads. Example - {\"anchor\": \"created_at\", \"days\": 30}.\n- enforced_batch_output_expires_after: Optional[dict] - Enforced batch output file expiration policy for the team. Keys created under this team will inherit this policy for batch output files. Example - {\"anchor\": \"created_at\", \"days\": 30}.\n\nReturns:\n- team_id: (str) Unique team id - used for tracking spend across multiple keys for same team id.\n\n_deprecated_params:\n- admins: list - A list of user_id's for the admin role\n- users: list - A list of user_id's for the user role\n\nExample Request:\n```\ncurl --location 'http://0.0.0.0:4000/team/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{\n \"team_alias\": \"my-new-team_2\",\n \"members_with_roles\": [{\"role\": \"admin\", \"user_id\": \"user-1234\"},\n {\"role\": \"user\", \"user_id\": \"user-2434\"}]\n}'\n\n```\n\n ```\ncurl --location 'http://0.0.0.0:4000/team/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{\n \"team_alias\": \"QA Prod Bot\",\n \"max_budget\": 0.000000001,\n \"budget_duration\": \"1d\"\n }'\n```", "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/permissions_bulk_update": { "post": { "tags": [ "team management" ], "summary": "Bulk Update Team Member Permissions", "description": "Append permissions to existing teams.\n\nEither pass team_ids to target specific teams, or set\napply_to_all_teams=True to update every team. For each team,\nthe provided permissions are merged with the team's existing\npermissions (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/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/unblock": { "post": { "tags": [ "team management" ], "summary": "Unblock Team", "description": "Unblocks a previously blocked team, re-enabling calls from keys with this team id.\n\nParameters:\n- team_id: str - Required. The unique identifier of the team to unblock.\n\nExample:\n```\ncurl --location 'http://0.0.0.0:4000/team/unblock' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{\n \"team_id\": \"team-1234\"\n}'\n```", "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/update": { "post": { "tags": [ "team management" ], "summary": "Update Team", "description": "Use `/team/member_add` AND `/team/member/delete` to add/remove new team members\n\nYou can now update team budget / rate limits via /team/update\n\nParameters:\n- team_id: str - The team id of the user. Required param.\n- team_alias: Optional[str] - User defined team alias\n- team_member_permissions: Optional[List[str]] - A list of routes that non-admin team members can access. example: [\"/key/generate\", \"/key/update\", \"/key/delete\"]\n- metadata: Optional[dict] - Metadata for team, store information for team. Example metadata = {\"team\": \"core-infra\", \"app\": \"app2\", \"email\": \"ishaan@berri.ai\" }\n- tpm_limit: Optional[int] - The TPM (Tokens Per Minute) limit for this team - all keys with this team_id will have at max this TPM limit\n- rpm_limit: Optional[int] - The RPM (Requests Per Minute) limit for this team - all keys associated with this team_id will have at max this RPM limit\n- max_budget: Optional[float] - The maximum budget allocated to the team - all keys for this team_id will have at max this max_budget\n- soft_budget: Optional[float] - The soft budget threshold for the team. If max_budget is set (either in the request or existing), soft_budget must be strictly lower than max_budget. Can be set independently if max_budget is not set.\n- budget_duration: Optional[str] - The duration of the budget for the team. Doc [here](https://docs.litellm.ai/docs/proxy/team_budgets)\n- models: Optional[list] - A list of models associated with the team - all keys for this team_id will have at most, these models. If empty, assumes all models are allowed.\n- prompts: Optional[List[str]] - List of prompts that the team is allowed to use.\n- blocked: bool - Flag indicating if the team is blocked or not - will stop all calls from keys with this team_id.\n- tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing).\n- organization_id: Optional[str] - The organization id of the team. Default is None. Create via `/organization/new`.\n- model_aliases: Optional[dict] - Model aliases for the team. [Docs](https://docs.litellm.ai/docs/proxy/team_based_routing#create-team-with-model-alias)\n- guardrails: Optional[List[str]] - Guardrails for the team. [Docs](https://docs.litellm.ai/docs/proxy/guardrails)\n- policies: Optional[List[str]] - Policies for the team. [Docs](https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies)\n- disable_global_guardrails: Optional[bool] - Whether to disable global guardrails for the key.\n- object_permission: Optional[LiteLLM_ObjectPermissionBase] - team-specific object permission. Example - {\"vector_stores\": [\"vector_store_1\", \"vector_store_2\"], \"agents\": [\"agent_1\", \"agent_2\"], \"agent_access_groups\": [\"dev_group\"]}. IF null or {} then no object permission.\n- team_member_budget: Optional[float] - The maximum budget allocated to an individual team member.\n- team_member_budget_duration: Optional[str] - The duration of the budget for the team member. Doc [here](https://docs.litellm.ai/docs/proxy/team_budgets)\n- team_member_rpm_limit: Optional[int] - The RPM (Requests Per Minute) limit for individual team members.\n- team_member_tpm_limit: Optional[int] - The TPM (Tokens Per Minute) limit for individual team members.\n- team_member_key_duration: Optional[str] - The duration for a team member's key. e.g. \"1d\", \"1w\", \"1mo\"\n- allowed_passthrough_routes: Optional[List[str]] - List of allowed pass through routes for the team.\n- model_rpm_limit: Optional[Dict[str, int]] - The RPM (Requests Per Minute) limit per model for this team. Example: {\"gpt-4\": 100, \"gpt-3.5-turbo\": 200}\n- model_tpm_limit: Optional[Dict[str, int]] - The TPM (Tokens Per Minute) limit per model for this team. Example: {\"gpt-4\": 10000, \"gpt-3.5-turbo\": 20000}\nExample - update team TPM Limit\n- allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{\"index_name\": \"my-index\", \"index_permissions\": [\"write\", \"read\"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint.\n- secret_manager_settings: Optional[dict] - Secret manager settings for the team. [Docs](https://docs.litellm.ai/docs/secret_managers/overview)\n- router_settings: Optional[UpdateRouterConfig] - team-specific router settings. Example - {\"model_group_retry_policy\": {\"max_retries\": 5}}. IF null or {} then no router settings.\n- access_group_ids: Optional[List[str]] - List of access group IDs to associate with the team. Access groups define which models the team can access. Example - [\"access_group_1\", \"access_group_2\"].\n- enforced_file_expires_after: Optional[dict] - Enforced file expiration policy for the team. Keys created under this team will inherit this policy for file uploads. Example - {\"anchor\": \"created_at\", \"days\": 30}.\n- enforced_batch_output_expires_after: Optional[dict] - Enforced batch output file expiration policy for the team. Keys created under this team will inherit this policy for batch output files. Example - {\"anchor\": \"created_at\", \"days\": 30}.\n\n```\ncurl --location 'http://0.0.0.0:4000/team/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{\n \"team_id\": \"8d916b1c-510d-4894-a334-1c16a93344f5\",\n \"tpm_limit\": 100\n}'\n```\n\nExample - Update Team `max_budget` budget\n```\ncurl --location 'http://0.0.0.0:4000/team/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{\n \"team_id\": \"8d916b1c-510d-4894-a334-1c16a93344f5\",\n \"max_budget\": 10\n}'\n```", "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}/callback": { "post": { "tags": [ "team management" ], "summary": "Add Team Callbacks", "description": "Add a success/failure callback to a team\n\nUse this if if you want different teams to have different success/failure callbacks\n\nParameters:\n- callback_name (Literal[\"langfuse\", \"langsmith\", \"gcs\"], required): The name of the callback to add\n- callback_type (Literal[\"success\", \"failure\", \"success_and_failure\"], required): The type of callback to add. One of:\n - \"success\": Callback for successful LLM calls\n - \"failure\": Callback for failed LLM calls\n - \"success_and_failure\": Callback for both successful and failed LLM calls\n- callback_vars (StandardCallbackDynamicParams, required): A dictionary of variables to pass to the callback\n - langfuse_public_key: The public key for the Langfuse callback\n - langfuse_secret_key: The secret key for the Langfuse callback\n - langfuse_secret: The secret for the Langfuse callback\n - langfuse_host: The host for the Langfuse callback\n - gcs_bucket_name: The name of the GCS bucket\n - gcs_path_service_account: The path to the GCS service account\n - langsmith_api_key: The API key for the Langsmith callback\n - langsmith_project: The project for the Langsmith callback\n - langsmith_base_url: The base URL for the Langsmith callback\n\nExample curl:\n```\ncurl -X POST 'http:/localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' -H 'Content-Type: application/json' -H 'Authorization: Bearer sk-1234' -d '{\n \"callback_name\": \"langfuse\",\n \"callback_type\": \"success\",\n \"callback_vars\": {\"langfuse_public_key\": \"pk-lf-xxxx1\", \"langfuse_secret_key\": \"sk-xxxxx\"}\n \n}'\n```\n\nThis 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\n\nParameters:\n- team_id (str, required): The unique identifier for the team\n\nExample curl:\n```\ncurl -X GET 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' -H 'Authorization: Bearer sk-1234'\n```\n\nThis will return the callback settings for the team with id dbe2f686-a686-4896-864a-4c3924458709\n\nReturns {\n \"status\": \"success\",\n \"data\": {\n \"team_id\": team_id,\n \"success_callbacks\": team_callback_settings_obj.success_callback,\n \"failure_callbacks\": team_callback_settings_obj.failure_callback,\n \"callback_vars\": team_callback_settings_obj.callback_vars,\n },\n }", "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}/disable_logging": { "post": { "tags": [ "team management" ], "summary": "Disable Team Logging", "description": "Disable all logging callbacks for a team\n\nParameters:\n- team_id (str, required): The unique identifier for the team\n\nExample curl:\n```\ncurl -X POST 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/disable_logging' -H 'Authorization: Bearer sk-1234'\n```", "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" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }