openapi: 3.2.0 info: title: LiteLLM organization 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: Organization Management paths: /organization/new: post: tags: - Organization Management summary: New Organization description: 'Allow orgs to own teams Set org level budgets + model access. Only admins can create orgs. # Parameters - organization_alias: *str* - The name of the organization. - models: *List* - The models the organization has access to. - budget_id: *Optional[str]* - The id for a budget (tpm/rpm/max budget) for the organization. ### IF NO BUDGET ID - CREATE ONE WITH THESE PARAMS ### - max_budget: *Optional[float]* - Max budget for org - tpm_limit: *Optional[int]* - Max tpm limit for org - rpm_limit: *Optional[int]* - Max rpm limit for org - model_rpm_limit: *Optional[Dict[str, int]]* - The RPM (Requests Per Minute) limit per model for this organization. - model_tpm_limit: *Optional[Dict[str, int]]* - The TPM (Tokens Per Minute) limit per model for this organization. - max_parallel_requests: *Optional[int]* - [Not Implemented Yet] Max parallel requests for org - soft_budget: *Optional[float]* - [Not Implemented Yet] Get a slack alert when this soft budget is reached. Don''t block requests. - model_max_budget: *Optional[dict]* - Max budget for a specific model - budget_duration: *Optional[str]* - Frequency of reseting org budget - metadata: *Optional[dict]* - Metadata for organization, store information for organization. Example metadata - {"extra_info": "some info"} - blocked: *bool* - Flag indicating if the org is blocked or not - will stop all calls from keys with this org_id. - tags: *Optional[List[str]]* - Tags for tracking spend and/or doing tag-based routing. - organization_id: *Optional[str]* - The organization id of the team. Default is None. Create via `/organization/new`. - model_aliases: Optional[dict] - Model aliases for the team. Docs - object_permission: Optional[LiteLLM_ObjectPermissionBase] - organization-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"]}. IF null or {} then no object permission. - allowed_models: Optional[List[str]] - List of models the organization is allowed to access. If not set, defaults to the models field. Case 1: Create new org **without** a budget_id ```bash curl --location ''http://0.0.0.0:4000/organization/new'' --header ''Authorization: Bearer sk-1234'' --header ''Content-Type: application/json'' --data ''{ "organization_alias": "my-secret-org", "models": ["model1", "model2"], "max_budget": 100 }'' ``` Case 2: Create new org **with** a budget_id ```bash curl --location ''http://0.0.0.0:4000/organization/new'' --header ''Authorization: Bearer sk-1234'' --header ''Content-Type: application/json'' --data ''{ "organization_alias": "my-secret-org", "models": ["model1", "model2"], "budget_id": "428eeaa8-f3ac-4e85-a8fb-7dc8d7aa8689" }'' ```' operationId: new_organization_organization_new_post requestBody: content: application/json: schema: $ref: '#/components/schemas/NewOrganizationRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/NewOrganizationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /organization/daily/activity: get: tags: - Organization Management summary: Get Organization Daily Activity description: Get daily activity for specific organizations or all accessible organizations. operationId: get_organization_daily_activity_organization_daily_activity_get security: - APIKeyHeader: [] parameters: - name: organization_ids in: query required: false schema: anyOf: - type: string - type: 'null' title: Organization 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_organization_ids in: query required: false schema: anyOf: - type: string - type: 'null' title: Exclude Organization 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' /organization/update: patch: tags: - Organization Management summary: Update Organization description: Update an organization operationId: update_organization_organization_update_patch responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LiteLLM_OrganizationTableWithMembers' security: - APIKeyHeader: [] /v2/organization/{organization_id}: patch: tags: - Organization Management summary: Update Organization V2 description: 'Partial update of an organization (RESTful PATCH, RFC 7396 merge-patch semantics). A sent field is written and an omitted one is left untouched (presence is read from ``model_fields_set``). Clear tokens are per field: budget limits and ``metadata`` clear with ``null``, ``models`` with ``[]``, and ``object_permission`` with ``null`` (it merges when sent, so an empty ``{}`` is rejected). ``organization_alias`` is required and cannot be cleared. Validation failures return 422; the object-permission upsert, budget-row write, and org-row write are one transaction.' operationId: update_organization_v2_v2_organization__organization_id__patch security: - APIKeyHeader: [] parameters: - name: organization_id in: path required: true schema: type: string title: Organization Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OrganizationUpdateRequestV2' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LiteLLM_OrganizationTableWithMembers' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /organization/delete: delete: tags: - Organization Management summary: Delete Organization description: 'Delete an organization # Parameters: - organization_ids: List[str] - The organization ids to delete.' operationId: delete_organization_organization_delete_delete requestBody: content: application/json: schema: $ref: '#/components/schemas/DeleteOrganizationRequest' required: true responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/LiteLLM_OrganizationTableWithMembers' type: array title: Response Delete Organization Organization Delete Delete '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /organization/list: get: tags: - Organization Management summary: List Organization description: 'Get a list of organizations with optional filtering. Parameters: org_id: Optional[str] Filter organizations by exact organization_id match org_alias: Optional[str] Filter organizations by partial organization_alias match (case-insensitive) Example: ``` curl --location --request GET ''http://0.0.0.0:4000/organization/list?org_alias=my-org'' --header ''Authorization: Bearer sk-1234'' ``` Example with org_id: ``` curl --location --request GET ''http://0.0.0.0:4000/organization/list?org_id=123e4567-e89b-12d3-a456-426614174000'' --header ''Authorization: Bearer sk-1234'' ```' operationId: list_organization_organization_list_get security: - APIKeyHeader: [] parameters: - name: org_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter organizations by exact organization_id match title: Org Id description: Filter organizations by exact organization_id match - name: org_alias in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter organizations by partial organization_alias match. Supports case-insensitive search. title: Org Alias description: Filter organizations by partial organization_alias match. Supports case-insensitive search. responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/LiteLLM_OrganizationTableWithMembers' title: Response List Organization Organization List Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /organization/info: get: tags: - Organization Management summary: Info Organization description: Get the org specific information operationId: info_organization_organization_info_get security: - APIKeyHeader: [] parameters: - name: organization_id in: query required: true schema: type: string title: Organization Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LiteLLM_OrganizationTableWithMembers' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - Organization Management summary: Deprecated Info Organization description: 'DEPRECATED: Use GET /organization/info instead' operationId: deprecated_info_organization_organization_info_post security: - APIKeyHeader: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OrganizationRequest' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /organization/member_add: post: tags: - Organization Management summary: Organization Member Add description: '[BETA] Add new members (either via user_email or user_id) to an organization If user doesn''t exist, new user row will also be added to User Table Only proxy_admin or org_admin of organization, allowed to access this endpoint. # Parameters: - organization_id: str (required) - member: Union[List[Member], Member] (required) - role: Literal[LitellmUserRoles] (required) - user_id: Optional[str] - user_email: Optional[str] Note: Either user_id or user_email must be provided for each member. Example: ``` curl -X POST ''http://0.0.0.0:4000/organization/member_add'' -H ''Authorization: Bearer sk-1234'' -H ''Content-Type: application/json'' -d ''{ "organization_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", "member": { "role": "internal_user", "user_id": "krrish247652@berri.ai" }, "max_budget_in_organization": 100.0 }'' ``` The following is executed in this function: 1. Check if organization exists 2. Creates a new Internal User if the user_id or user_email is not found in LiteLLM_UserTable 3. Add Internal User to the `LiteLLM_OrganizationMembership` table' operationId: organization_member_add_organization_member_add_post requestBody: content: application/json: schema: $ref: '#/components/schemas/OrganizationMemberAddRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/OrganizationAddMemberResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /organization/member_update: patch: tags: - Organization Management summary: Organization Member Update description: Update a member's role in an organization operationId: organization_member_update_organization_member_update_patch requestBody: content: application/json: schema: $ref: '#/components/schemas/OrganizationMemberUpdateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LiteLLM_OrganizationMembershipTable' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /organization/member_delete: delete: tags: - Organization Management summary: Organization Member Delete description: Delete a member from an organization operationId: organization_member_delete_organization_member_delete_delete requestBody: content: application/json: schema: $ref: '#/components/schemas/OrganizationMemberDeleteRequest' 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: [] 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 LitellmUserRoles: type: string enum: - proxy_admin - proxy_admin_viewer - org_admin - internal_user - internal_user_viewer - team - customer title: LitellmUserRoles description: 'Admin Roles: PROXY_ADMIN: admin over the platform PROXY_ADMIN_VIEW_ONLY: can login, view all own keys, view all spend ORG_ADMIN: admin over a specific organization, can create teams, users only within their organization Internal User Roles: INTERNAL_USER: can login, view/create/delete their own keys, view their spend INTERNAL_USER_VIEW_ONLY: can login, view their own keys, view their own spend Team Roles: TEAM: used for JWT auth Customer Roles: CUSTOMER: External users -> these are customers' 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 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. 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 HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError OrganizationMemberAddRequest: properties: member: anyOf: - items: $ref: '#/components/schemas/OrgMember' type: array - $ref: '#/components/schemas/OrgMember' title: Member organization_id: type: string title: Organization Id max_budget_in_organization: anyOf: - type: number - type: 'null' title: Max Budget In Organization type: object required: - member - organization_id title: OrganizationMemberAddRequest 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 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 OrganizationUpdateRequestV2: properties: organization_alias: anyOf: - type: string - type: 'null' title: Organization Alias models: anyOf: - items: type: string type: array - type: 'null' title: Models 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 max_parallel_requests: anyOf: - type: integer - type: 'null' title: Max Parallel Requests model_max_budget: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Max Budget budget_duration: anyOf: - type: string - type: 'null' title: Budget Duration object_permission: anyOf: - $ref: '#/components/schemas/LiteLLM_ObjectPermissionBase' - type: 'null' additionalProperties: false type: object title: OrganizationUpdateRequestV2 description: 'Typed PATCH body for ``/v2/organization/{organization_id}`` (RFC 7396 merge-patch). Presence is read from ``model_fields_set``, so a sent field is written and an omitted one is left untouched. ``extra="forbid"`` makes an unknown key a 422 rather than a silent no-op, since the contract hinges on which keys are present. See the endpoint for the per-field clear tokens.' OrganizationRequest: properties: organizations: items: type: string type: array title: Organizations type: object required: - organizations title: OrganizationRequest DeleteOrganizationRequest: properties: organization_ids: items: type: string type: array title: Organization Ids type: object required: - organization_ids title: DeleteOrganizationRequest OrganizationMemberDeleteRequest: properties: user_id: anyOf: - type: string - type: 'null' title: User Id user_email: anyOf: - type: string - type: 'null' title: User Email organization_id: type: string title: Organization Id type: object required: - organization_id title: OrganizationMemberDeleteRequest 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 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 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 OrganizationAddMemberResponse: properties: organization_id: type: string title: Organization Id updated_users: items: $ref: '#/components/schemas/LiteLLM_UserTable' type: array title: Updated Users updated_organization_memberships: items: $ref: '#/components/schemas/LiteLLM_OrganizationMembershipTable' type: array title: Updated Organization Memberships type: object required: - organization_id - updated_users - updated_organization_memberships title: OrganizationAddMemberResponse LiteLLM_OrganizationTableWithMembers: properties: organization_id: anyOf: - type: string - type: 'null' title: Organization Id organization_alias: anyOf: - type: string - type: 'null' title: Organization Alias budget_id: type: string title: Budget Id spend: type: number title: Spend default: 0.0 metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata models: items: type: string type: array title: Models default: [] model_spend: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Spend default: {} created_by: type: string title: Created By updated_by: type: string title: Updated By users: anyOf: - items: $ref: '#/components/schemas/LiteLLM_UserTable' type: array - type: 'null' title: Users litellm_budget_table: anyOf: - $ref: '#/components/schemas/LiteLLM_BudgetTable' - type: 'null' object_permission: anyOf: - $ref: '#/components/schemas/LiteLLM_ObjectPermissionTable' - type: 'null' object_permission_id: anyOf: - type: string - type: 'null' title: Object Permission Id members: items: $ref: '#/components/schemas/LiteLLM_OrganizationMembershipTable' type: array title: Members default: [] teams: items: $ref: '#/components/schemas/LiteLLM_TeamTable' type: array title: Teams default: [] created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At type: object required: - budget_id - created_by - updated_by - created_at - updated_at title: LiteLLM_OrganizationTableWithMembers description: Returned by the /organization/info endpoint and /organization/list endpoint 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 OrgMember: 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: - org_admin - internal_user - internal_user_viewer title: Role type: object required: - role title: OrgMember 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.' OrganizationMemberUpdateRequest: properties: user_id: anyOf: - type: string - type: 'null' title: User Id user_email: anyOf: - type: string - type: 'null' title: User Email organization_id: type: string title: Organization Id max_budget_in_organization: anyOf: - type: number - type: 'null' title: Max Budget In Organization role: anyOf: - $ref: '#/components/schemas/LitellmUserRoles' - type: 'null' type: object required: - organization_id title: OrganizationMemberUpdateRequest 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 NewOrganizationResponse: properties: organization_id: type: string title: Organization Id organization_alias: anyOf: - type: string - type: 'null' title: Organization Alias budget_id: type: string title: Budget Id spend: type: number title: Spend default: 0.0 metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata models: items: type: string type: array title: Models default: [] model_spend: anyOf: - additionalProperties: true type: object - type: 'null' title: Model Spend default: {} created_by: type: string title: Created By updated_by: type: string title: Updated By users: anyOf: - items: $ref: '#/components/schemas/LiteLLM_UserTable' type: array - type: 'null' title: Users litellm_budget_table: anyOf: - $ref: '#/components/schemas/LiteLLM_BudgetTable' - type: 'null' object_permission: anyOf: - $ref: '#/components/schemas/LiteLLM_ObjectPermissionTable' - type: 'null' object_permission_id: anyOf: - type: string - type: 'null' title: Object Permission Id created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At type: object required: - organization_id - budget_id - created_by - updated_by - created_at - updated_at title: NewOrganizationResponse NewOrganizationRequest: 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 organization_id: anyOf: - type: string - type: 'null' title: Organization Id organization_alias: type: string title: Organization Alias models: items: {} type: array title: Models default: [] metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata 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 object_permission: anyOf: - $ref: '#/components/schemas/LiteLLM_ObjectPermissionBase' - type: 'null' type: object required: - organization_alias title: NewOrganizationRequest securitySchemes: APIKeyHeader: type: apiKey description: Bearer token in: header name: x-litellm-api-key