- Add mask_api_key() and is_masked_or_placeholder() to llm_provider service - Return masked keys in all provider CRUD endpoints - Reject masked/placeholder keys in fetch_models and test_provider_config - Show masked key with Change button in ProviderConfig.svelte edit form - Exclude masked keys from fetch-models, test, and submit payloads on frontend - Update semantics-core skill with clarified complexity tier rules - Switch agent modes from subagent to all
591 lines
19 KiB
JSON
591 lines
19 KiB
JSON
{
|
|
"/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/delete": {
|
|
"delete": {
|
|
"tags": [
|
|
"organization management"
|
|
],
|
|
"summary": "Delete Organization",
|
|
"description": "Delete an organization\n\n# Parameters:\n\n- 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/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/list": {
|
|
"get": {
|
|
"tags": [
|
|
"organization management"
|
|
],
|
|
"summary": "List Organization",
|
|
"description": "Get a list of organizations with optional filtering.\n\nParameters:\n org_id: Optional[str]\n Filter organizations by exact organization_id match\n org_alias: Optional[str]\n Filter organizations by partial organization_alias match (case-insensitive)\n\nExample:\n```\ncurl --location --request GET 'http://0.0.0.0:4000/organization/list?org_alias=my-org' --header 'Authorization: Bearer sk-1234'\n```\n\nExample with org_id:\n```\ncurl --location --request GET 'http://0.0.0.0:4000/organization/list?org_id=123e4567-e89b-12d3-a456-426614174000' --header 'Authorization: Bearer sk-1234'\n```",
|
|
"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/member_add": {
|
|
"post": {
|
|
"tags": [
|
|
"organization management"
|
|
],
|
|
"summary": "Organization Member Add",
|
|
"description": "[BETA]\n\nAdd new members (either via user_email or user_id) to an organization\n\nIf user doesn't exist, new user row will also be added to User Table\n\nOnly proxy_admin or org_admin of organization, allowed to access this endpoint.\n\n# Parameters:\n\n- organization_id: str (required)\n- member: Union[List[Member], Member] (required)\n - role: Literal[LitellmUserRoles] (required)\n - user_id: Optional[str]\n - user_email: Optional[str]\n\nNote: Either user_id or user_email must be provided for each member.\n\nExample:\n```\ncurl -X POST 'http://0.0.0.0:4000/organization/member_add' -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{\n \"organization_id\": \"45e3e396-ee08-4a61-a88e-16b3ce7e0849\",\n \"member\": {\n \"role\": \"internal_user\",\n \"user_id\": \"krrish247652@berri.ai\"\n },\n \"max_budget_in_organization\": 100.0\n}'\n```\n\nThe following is executed in this function:\n\n1. Check if organization exists\n2. Creates a new Internal User if the user_id or user_email is not found in LiteLLM_UserTable\n3. 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_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": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/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/new": {
|
|
"post": {
|
|
"tags": [
|
|
"organization management"
|
|
],
|
|
"summary": "New Organization",
|
|
"description": "Allow orgs to own teams\n\nSet org level budgets + model access.\n\nOnly admins can create orgs.\n\n# Parameters\n\n- organization_alias: *str* - The name of the organization.\n- models: *List* - The models the organization has access to.\n- budget_id: *Optional[str]* - The id for a budget (tpm/rpm/max budget) for the organization.\n### IF NO BUDGET ID - CREATE ONE WITH THESE PARAMS ###\n- max_budget: *Optional[float]* - Max budget for org\n- tpm_limit: *Optional[int]* - Max tpm limit for org\n- rpm_limit: *Optional[int]* - Max rpm limit for org\n- model_rpm_limit: *Optional[Dict[str, int]]* - The RPM (Requests Per Minute) limit per model for this organization.\n- model_tpm_limit: *Optional[Dict[str, int]]* - The TPM (Tokens Per Minute) limit per model for this organization.\n- max_parallel_requests: *Optional[int]* - [Not Implemented Yet] Max parallel requests for org\n- soft_budget: *Optional[float]* - [Not Implemented Yet] Get a slack alert when this soft budget is reached. Don't block requests.\n- model_max_budget: *Optional[dict]* - Max budget for a specific model\n- budget_duration: *Optional[str]* - Frequency of reseting org budget\n- metadata: *Optional[dict]* - Metadata for organization, store information for organization. Example metadata - {\"extra_info\": \"some info\"}\n- blocked: *bool* - Flag indicating if the org is blocked or not - will stop all calls from keys with this org_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- 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.\nCase 1: Create new org **without** a budget_id\n\n```bash\ncurl --location 'http://0.0.0.0:4000/organization/new' \n--header 'Authorization: Bearer sk-1234' \n--header 'Content-Type: application/json' \n--data '{\n \"organization_alias\": \"my-secret-org\",\n \"models\": [\"model1\", \"model2\"],\n \"max_budget\": 100\n}'\n\n\n```\n\nCase 2: Create new org **with** a budget_id\n\n```bash\ncurl --location 'http://0.0.0.0:4000/organization/new' \n--header 'Authorization: Bearer sk-1234' \n--header 'Content-Type: application/json' \n--data '{\n \"organization_alias\": \"my-secret-org\",\n \"models\": [\"model1\", \"model2\"],\n \"budget_id\": \"428eeaa8-f3ac-4e85-a8fb-7dc8d7aa8689\"\n}'\n```",
|
|
"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/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": []
|
|
}
|
|
]
|
|
}
|
|
}
|
|
} |