diff --git a/.circleci/config.yml b/.circleci/config.yml index 32d2cf0390c..f1506780003 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1771,6 +1771,7 @@ jobs: -e LANGFUSE_PROJECT2_SECRET=$LANGFUSE_PROJECT2_SECRET \ -e RECORDER_OPENAI_BASE_URL=http://host.docker.internal:8090/v1 \ -e LITELLM_LOG=ERROR \ + -e LITELLM_MASTER_KEY="sk-1234" \ --add-host host.docker.internal:host-gateway \ --name my-app \ -v $(pwd)/proxy_server_config.yaml:/app/config.yaml \ diff --git a/.env.example b/.env.example index 24c2b608414..280a9c4fbc4 100644 --- a/.env.example +++ b/.env.example @@ -26,6 +26,7 @@ NOVITA_API_KEY = "" INFINITY_API_KEY = "" # Development Configs -LITELLM_MASTER_KEY = "sk-1234" +# Generate one with: python -c "import secrets; print('sk-' + secrets.token_urlsafe(32))" +LITELLM_MASTER_KEY = "sk-" DATABASE_URL = "postgresql://llmproxy:dbpassword9090@db:5432/litellm" STORE_MODEL_IN_DB = "True" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0443f1bed75..bbccbad88d7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -272,7 +272,7 @@ docker build -f docker/Dockerfile.non_root -t litellm_dev . # Run with your config docker run \ -v $(pwd)/proxy_config.yaml:/app/config.yaml \ - -e LITELLM_MASTER_KEY="sk-1234" \ + -e LITELLM_MASTER_KEY="sk-" \ -p 4000:4000 \ litellm_dev \ --config /app/config.yaml --detailed_debug diff --git a/README.md b/README.md index 901cc5b0cea..e23ef223b54 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ from a2a.utils.constants import TransportProtocol from uuid import uuid4 base_url = "http://localhost:4000/a2a/my-agent" # LiteLLM proxy + agent name -headers = {"Authorization": "Bearer sk-1234"} # LiteLLM Virtual Key +headers = {"Authorization": "Bearer sk-"} # LiteLLM Virtual Key async with httpx.AsyncClient(headers=headers, timeout=60.0) as http_client: resolver = A2ACardResolver(httpx_client=http_client, base_url=base_url) @@ -233,7 +233,7 @@ async with stdio_client(server_params) as (read, write): ```bash curl -X POST 'http://0.0.0.0:4000/v1/chat/completions' \ - -H 'Authorization: Bearer sk-1234' \ + -H "Authorization: Bearer $LITELLM_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "model": "gpt-4o", @@ -255,7 +255,7 @@ curl -X POST 'http://0.0.0.0:4000/v1/chat/completions' \ "LiteLLM": { "url": "http://localhost:4000/mcp/", "headers": { - "x-litellm-api-key": "Bearer sk-1234" + "x-litellm-api-key": "Bearer sk-" } } } diff --git a/cookbook/Migrating_to_LiteLLM_Proxy_from_OpenAI_Azure_OpenAI.ipynb b/cookbook/Migrating_to_LiteLLM_Proxy_from_OpenAI_Azure_OpenAI.ipynb index 740e7c7a4c8..35c9577d647 100644 --- a/cookbook/Migrating_to_LiteLLM_Proxy_from_OpenAI_Azure_OpenAI.ipynb +++ b/cookbook/Migrating_to_LiteLLM_Proxy_from_OpenAI_Azure_OpenAI.ipynb @@ -97,7 +97,7 @@ "source": [ "from openai import OpenAI\n", "client = OpenAI(\n", - " api_key=\"sk-1234\", # [OPTIONAL] set if you set one on proxy, else set \"\"\n", + " api_key=\"sk-\", # [OPTIONAL] set if you set one on proxy, else set \"\"\n", " base_url=\"http://0.0.0.0:4000\",\n", ")\n", "\n", @@ -298,14 +298,14 @@ " engine=\"azure-gpt-3.5\", # model_name on litellm proxy\n", " temperature=0.0,\n", " azure_endpoint=\"http://0.0.0.0:4000\", # litellm proxy endpoint\n", - " api_key=\"sk-1234\", # litellm proxy API Key\n", + " api_key=\"sk-\", # litellm proxy API Key\n", " api_version=\"2023-07-01-preview\",\n", ")\n", "\n", "embed_model = AzureOpenAIEmbedding(\n", " deployment_name=\"azure-embedding-model\",\n", " azure_endpoint=\"http://0.0.0.0:4000\",\n", - " api_key=\"sk-1234\",\n", + " api_key=\"sk-\",\n", " api_version=\"2023-07-01-preview\",\n", ")\n", "\n", @@ -341,7 +341,7 @@ "\n", "const model = new ChatOpenAI({\n", " modelName: \"gpt-4\",\n", - " openAIApiKey: \"sk-1234\",\n", + " openAIApiKey: \"sk-\",\n", " modelKwargs: {\"metadata\": \"hello world\"} // 👈 PASS Additional params here\n", "}, {\n", " basePath: \"http://0.0.0.0:4000\",\n", @@ -372,7 +372,7 @@ "const { OpenAI } = require('openai');\n", "\n", "const openai = new OpenAI({\n", - " apiKey: \"sk-1234\", // This is the default and can be omitted\n", + " apiKey: \"sk-\", // This is the default and can be omitted\n", " baseURL: \"http://0.0.0.0:4000\"\n", "});\n", "\n", diff --git a/cookbook/Proxy_Batch_Users.ipynb b/cookbook/Proxy_Batch_Users.ipynb index c362ab8f8a2..388c8195295 100644 --- a/cookbook/Proxy_Batch_Users.ipynb +++ b/cookbook/Proxy_Batch_Users.ipynb @@ -24,7 +24,7 @@ "import asyncio\n", "\n", "proxy_base_url = \"http://0.0.0.0:4000\" # 👈 SET TO PROXY URL\n", - "master_key = \"sk-1234\" # 👈 SET TO PROXY MASTER KEY" + "master_key = \"sk-\" # 👈 SET TO PROXY MASTER KEY" ] }, { diff --git a/cookbook/ai_coding_tool_guides/claude_code_quickstart/guide.md b/cookbook/ai_coding_tool_guides/claude_code_quickstart/guide.md index b2d81be25bb..3a9e58b8565 100644 --- a/cookbook/ai_coding_tool_guides/claude_code_quickstart/guide.md +++ b/cookbook/ai_coding_tool_guides/claude_code_quickstart/guide.md @@ -47,7 +47,7 @@ Set your environment variables: ```bash export ANTHROPIC_API_KEY="your-anthropic-api-key" -export LITELLM_MASTER_KEY="sk-1234567890" # Generate a secure key +export LITELLM_MASTER_KEY="sk-" # Generate a secure key ``` ## Step 2: Start Proxy diff --git a/cookbook/anthropic_agent_sdk/README.md b/cookbook/anthropic_agent_sdk/README.md index 294d949e24e..c17e6eaa4fc 100644 --- a/cookbook/anthropic_agent_sdk/README.md +++ b/cookbook/anthropic_agent_sdk/README.md @@ -58,7 +58,7 @@ Set these environment variables if needed: ```bash export LITELLM_PROXY_URL="http://localhost:4000" -export LITELLM_API_KEY="sk-1234" +export LITELLM_API_KEY="sk-" export LITELLM_MODEL="bedrock-claude-sonnet-4.5" ``` @@ -98,7 +98,7 @@ The key is pointing the Agent SDK to LiteLLM instead of directly to Anthropic: ```python # Point to LiteLLM gateway (not Anthropic) os.environ["ANTHROPIC_BASE_URL"] = "http://localhost:4000" -os.environ["ANTHROPIC_API_KEY"] = "sk-1234" # Your LiteLLM key +os.environ["ANTHROPIC_API_KEY"] = "sk-" # Your LiteLLM key # Use any model configured in LiteLLM options = ClaudeAgentOptions( diff --git a/cookbook/anthropic_agent_sdk/common.py b/cookbook/anthropic_agent_sdk/common.py index a2555ed3372..7fb06810d75 100644 --- a/cookbook/anthropic_agent_sdk/common.py +++ b/cookbook/anthropic_agent_sdk/common.py @@ -13,7 +13,7 @@ class Config: LITELLM_PROXY_URL = os.getenv("LITELLM_PROXY_URL", "http://localhost:4000") # LiteLLM API key (master key or virtual key) - LITELLM_API_KEY = os.getenv("LITELLM_API_KEY", "sk-1234") + LITELLM_API_KEY = os.getenv("LITELLM_API_KEY", "sk-") # Model name as configured in LiteLLM (e.g., "bedrock-claude-sonnet-4", "gpt-4", etc.) LITELLM_MODEL = os.getenv("LITELLM_MODEL", "bedrock-claude-sonnet-4.5") diff --git a/cookbook/litellm_proxy_server/batch_api/bedrock/bedrock.py b/cookbook/litellm_proxy_server/batch_api/bedrock/bedrock.py index b5117ab9eeb..4052a141ab0 100644 --- a/cookbook/litellm_proxy_server/batch_api/bedrock/bedrock.py +++ b/cookbook/litellm_proxy_server/batch_api/bedrock/bedrock.py @@ -2,7 +2,7 @@ from openai import OpenAI client = OpenAI( base_url="http://0.0.0.0:4000", - api_key="sk-1234", + api_key="sk-", ) BEDROCK_BATCH_MODEL = "bedrock/batch-anthropic.claude-3-5-sonnet-20240620-v1:0" diff --git a/cookbook/litellm_proxy_server/mcp/mcp_with_litellm_proxy.py b/cookbook/litellm_proxy_server/mcp/mcp_with_litellm_proxy.py index cc93302761d..4f6b8677d9c 100644 --- a/cookbook/litellm_proxy_server/mcp/mcp_with_litellm_proxy.py +++ b/cookbook/litellm_proxy_server/mcp/mcp_with_litellm_proxy.py @@ -7,7 +7,7 @@ When using LiteLLM Proxy, you can use the same MCP tools across all your LLM pro import openai client = openai.OpenAI( - api_key="sk-1234", # paste your litellm proxy api key here + api_key="sk-", # paste your litellm proxy api key here base_url="http://localhost:4000", # paste your litellm proxy base url here ) print("Making API request to Responses API with MCP tools") diff --git a/cookbook/livekit_agent_sdk/README.md b/cookbook/livekit_agent_sdk/README.md index 1c3f0bf9564..9167fbfb4c5 100644 --- a/cookbook/livekit_agent_sdk/README.md +++ b/cookbook/livekit_agent_sdk/README.md @@ -32,7 +32,7 @@ Set these environment variables if needed: ```bash export LITELLM_PROXY_URL="http://localhost:4000" -export LITELLM_API_KEY="sk-1234" +export LITELLM_API_KEY="sk-" export LITELLM_MODEL="grok-voice-agent" ``` @@ -59,7 +59,7 @@ model_list: mode: realtime general_settings: - master_key: sk-1234 + master_key: os.environ/LITELLM_MASTER_KEY ``` Then start: `litellm --config config.yaml --port 4000` @@ -73,7 +73,7 @@ from livekit.plugins import xai model = xai.realtime.RealtimeModel( voice="ara", - api_key="sk-1234", # LiteLLM proxy key + api_key="sk-", # LiteLLM proxy key base_url="http://localhost:4000", # Point to LiteLLM ) ``` diff --git a/cookbook/livekit_agent_sdk/config.example.yaml b/cookbook/livekit_agent_sdk/config.example.yaml index 1361f36af34..0f7cfa9647e 100644 --- a/cookbook/livekit_agent_sdk/config.example.yaml +++ b/cookbook/livekit_agent_sdk/config.example.yaml @@ -18,4 +18,4 @@ litellm_settings: telemetry: False general_settings: - master_key: sk-1234 # Change this to a secure key + master_key: os.environ/LITELLM_MASTER_KEY # Change this to a secure key diff --git a/cookbook/livekit_agent_sdk/main.py b/cookbook/livekit_agent_sdk/main.py index c68e5534ea8..eb1baf070af 100644 --- a/cookbook/livekit_agent_sdk/main.py +++ b/cookbook/livekit_agent_sdk/main.py @@ -13,7 +13,7 @@ import websockets # Configuration PROXY_URL = os.getenv("LITELLM_PROXY_URL", "http://localhost:4000") -API_KEY = os.getenv("LITELLM_API_KEY", "sk-1234") +API_KEY = os.getenv("LITELLM_API_KEY", "sk-") MODEL = os.getenv("LITELLM_MODEL", "grok-voice-agent") diff --git a/cookbook/misc/config.yaml b/cookbook/misc/config.yaml index d1d06eb5842..0935d55a71c 100644 --- a/cookbook/misc/config.yaml +++ b/cookbook/misc/config.yaml @@ -59,7 +59,7 @@ litellm_settings: context_window_fallbacks: [{"gpt-3.5-turbo": ["gpt-3.5-turbo-large"]}] general_settings: - master_key: sk-1234 # [OPTIONAL] Use to enforce auth on proxy. See - https://docs.litellm.ai/docs/proxy/virtual_keys + master_key: os.environ/LITELLM_MASTER_KEY # [OPTIONAL] Use to enforce auth on proxy. See - https://docs.litellm.ai/docs/proxy/virtual_keys store_model_in_db: True proxy_budget_rescheduler_min_time: 60 proxy_budget_rescheduler_max_time: 64 diff --git a/cookbook/misc/migrate_proxy_config.py b/cookbook/misc/migrate_proxy_config.py index 31c3f32c08a..ec6c2399d95 100644 --- a/cookbook/misc/migrate_proxy_config.py +++ b/cookbook/misc/migrate_proxy_config.py @@ -89,7 +89,7 @@ def migrate_models(config_file, proxy_base_url): # Usage config_file = "config.yaml" proxy_base_url = "http://0.0.0.0:4000" -master_key = "sk-1234" +master_key = "sk-" print(f"config_file: {config_file}") print(f"proxy_base_url: {proxy_base_url}") migrate_models(config_file, proxy_base_url) diff --git a/cookbook/mlflow_langchain_tracing_litellm_proxy.ipynb b/cookbook/mlflow_langchain_tracing_litellm_proxy.ipynb index 1aca0e13c87..2db6f121e17 100644 --- a/cookbook/mlflow_langchain_tracing_litellm_proxy.ipynb +++ b/cookbook/mlflow_langchain_tracing_litellm_proxy.ipynb @@ -164,7 +164,7 @@ " openai_api_base=\"LITELLM_PROXY_BASE_URL\", # e.g.: http://0.0.0.0:4000\n", " model = \"gpt-3.5-turbo\", # LITELLM 'model_name'\n", " temperature=0.1, \n", - " api_key=\"LITELLM_PROXY_API_KEY\" # e.g.: \"sk-1234\"\n", + " api_key=\"LITELLM_PROXY_API_KEY\" # e.g.: \"sk-\"\n", ")" ] }, diff --git a/cookbook/mock_prompt_management_server/README.md b/cookbook/mock_prompt_management_server/README.md index 9ec76baacf7..e8b80354962 100644 --- a/cookbook/mock_prompt_management_server/README.md +++ b/cookbook/mock_prompt_management_server/README.md @@ -69,7 +69,7 @@ litellm --config config.yaml ```bash curl http://0.0.0.0:4000/v1/chat/completions \ -H "Content-Type: application/json" \ - -H "Authorization: Bearer sk-1234" \ + -H "Authorization: Bearer $LITELLM_API_KEY" \ -d '{ "model": "gpt-3.5-turbo", "prompt_id": "hello-world-prompt", diff --git a/cookbook/nova_sonic_realtime.py b/cookbook/nova_sonic_realtime.py index ab510556254..b9cf588d7f1 100644 --- a/cookbook/nova_sonic_realtime.py +++ b/cookbook/nova_sonic_realtime.py @@ -33,7 +33,7 @@ CHUNK_SIZE = 1024 # LiteLLM proxy configuration LITELLM_PROXY_URL = "ws://localhost:4000/v1/realtime?model=bedrock-sonic" -LITELLM_API_KEY = "sk-12345" # Your LiteLLM API key +LITELLM_API_KEY = "sk-" # Your LiteLLM API key class RealtimeClient: diff --git a/cookbook/veo_video_generation.py b/cookbook/veo_video_generation.py index 4df2d946a01..23a962f7018 100644 --- a/cookbook/veo_video_generation.py +++ b/cookbook/veo_video_generation.py @@ -25,7 +25,7 @@ class VeoVideoGenerator: def __init__( self, base_url: str = "http://localhost:4000/gemini/v1beta", - api_key: str = "sk-1234", + api_key: str = "sk-", ): """ Initialize the Veo video generator. @@ -274,12 +274,12 @@ def main(): Configure these environment variables: - LITELLM_BASE_URL: Your LiteLLM proxy URL (default: http://localhost:4000/gemini/v1beta) - - LITELLM_API_KEY: Your LiteLLM API key (default: sk-1234) + - LITELLM_API_KEY: Your LiteLLM API key (default: sk-) """ # Configuration from environment or defaults base_url = os.getenv("LITELLM_BASE_URL", "http://localhost:4000/gemini/v1beta") - api_key = os.getenv("LITELLM_API_KEY", "sk-1234") + api_key = os.getenv("LITELLM_API_KEY", "sk-") print("🚀 Starting Veo Video Generation Example") print(f"📡 Using LiteLLM proxy at: {base_url}") diff --git a/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py b/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py index b2eda76f9ae..ccc6d84bf86 100644 --- a/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py +++ b/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py @@ -430,7 +430,7 @@ async def new_project( ```bash curl --location 'http://0.0.0.0:4000/project/new' \\ - --header 'Authorization: Bearer sk-1234' \\ + --header "Authorization: Bearer $LITELLM_API_KEY" \\ --header 'Content-Type: application/json' \\ --data '{ "project_alias": "flight-search-assistant", @@ -457,7 +457,7 @@ async def new_project( ```bash curl --location 'http://0.0.0.0:4000/project/new' \\ - --header 'Authorization: Bearer sk-1234' \\ + --header "Authorization: Bearer $LITELLM_API_KEY" \\ --header 'Content-Type: application/json' \\ --data '{ "project_alias": "hotel-recommendations", @@ -644,7 +644,7 @@ async def update_project( Example: ```bash curl --location 'http://0.0.0.0:4000/project/update' \\ - --header 'Authorization: Bearer sk-1234' \\ + --header "Authorization: Bearer $LITELLM_API_KEY" \\ --header 'Content-Type: application/json' \\ --data '{ "project_id": "project-123", @@ -867,7 +867,7 @@ async def delete_project( Example: ```bash curl --location --request DELETE 'http://0.0.0.0:4000/project/delete' \\ - --header 'Authorization: Bearer sk-1234' \\ + --header "Authorization: Bearer $LITELLM_API_KEY" \\ --header 'Content-Type: application/json' \\ --data '{ "project_ids": ["project-123", "project-456"] @@ -973,7 +973,7 @@ async def project_info( Example: ```bash curl --location 'http://0.0.0.0:4000/project/info?project_id=project-123' \\ - --header 'Authorization: Bearer sk-1234' + --header "Authorization: Bearer $LITELLM_API_KEY" ``` """ from litellm.proxy.proxy_server import prisma_client @@ -1042,7 +1042,7 @@ async def list_projects( Example: ```bash curl --location 'http://0.0.0.0:4000/project/list' \\ - --header 'Authorization: Bearer sk-1234' + --header "Authorization: Bearer $LITELLM_API_KEY" ``` """ from litellm.proxy.proxy_server import prisma_client diff --git a/litellm/anthropic_interface/readme.md b/litellm/anthropic_interface/readme.md index 01c5f1b7c31..40dc3a6213e 100644 --- a/litellm/anthropic_interface/readme.md +++ b/litellm/anthropic_interface/readme.md @@ -86,7 +86,7 @@ import anthropic # point anthropic sdk to litellm proxy client = anthropic.Anthropic( base_url="http://0.0.0.0:4000", - api_key="sk-1234", + api_key="sk-", ) response = client.messages.create( @@ -101,7 +101,7 @@ response = client.messages.create( ```bash showLineNumbers title="Example using LiteLLM Proxy Server" curl -L -X POST 'http://0.0.0.0:4000/v1/messages' \ -H 'content-type: application/json' \ --H 'x-api-key: $LITELLM_API_KEY' \ +-H "x-api-key: $LITELLM_API_KEY" \ -H 'anthropic-version: 2023-06-01' \ -d '{ "model": "anthropic-claude", diff --git a/litellm/containers/README.md b/litellm/containers/README.md index 2b9fb5dec66..de74968fe7c 100644 --- a/litellm/containers/README.md +++ b/litellm/containers/README.md @@ -183,14 +183,14 @@ def get_provider_container_config( ```bash # Create container via Azure curl -X POST "http://localhost:4000/v1/containers" \ - -H "Authorization: Bearer sk-1234" \ + -H "Authorization: Bearer $LITELLM_API_KEY" \ -H "custom-llm-provider: azure" \ -H "Content-Type: application/json" \ -d '{"name": "My Azure Container"}' # List container files via Azure curl -X GET "http://localhost:4000/v1/containers/cntr_123/files" \ - -H "Authorization: Bearer sk-1234" \ + -H "Authorization: Bearer $LITELLM_API_KEY" \ -H "custom-llm-provider: azure" ``` @@ -224,7 +224,7 @@ cd litellm/proxy && python proxy_cli.py --config proxy_config.yaml --port 4000 # Test endpoints curl -X GET "http://localhost:4000/v1/containers/cntr_123/files" \ - -H "Authorization: Bearer sk-1234" + -H "Authorization: Bearer $LITELLM_API_KEY" ``` --- diff --git a/litellm/integrations/bitbucket/README.md b/litellm/integrations/bitbucket/README.md index 473beeea9e0..b729c0445ef 100644 --- a/litellm/integrations/bitbucket/README.md +++ b/litellm/integrations/bitbucket/README.md @@ -148,7 +148,7 @@ litellm --config config.yaml --detailed_debug ```bash curl -L -X POST 'http://0.0.0.0:4000/v1/chat/completions' \ -H 'Content-Type: application/json' \ --H 'Authorization: Bearer sk-1234' \ +-H "Authorization: Bearer $LITELLM_API_KEY" \ -d '{ "model": "my-bitbucket-model", "messages": [{"role": "user", "content": "IGNORED"}], diff --git a/litellm/integrations/gitlab/README.md b/litellm/integrations/gitlab/README.md index 14fb62905c8..9d5607dd4ae 100644 --- a/litellm/integrations/gitlab/README.md +++ b/litellm/integrations/gitlab/README.md @@ -148,7 +148,7 @@ litellm --config config.yaml --detailed_debug ```bash curl -L -X POST 'http://0.0.0.0:4000/v1/chat/completions' \ -H 'Content-Type: application/json' \ --H 'Authorization: Bearer sk-1234' \ +-H "Authorization: Bearer $LITELLM_API_KEY" \ -d '{ "model": "my-gitlab-model", "messages": [{"role": "user", "content": "IGNORED"}], diff --git a/litellm/litellm_core_utils/logging_callback_manager.py b/litellm/litellm_core_utils/logging_callback_manager.py index 31523c9309d..595ee1506c3 100644 --- a/litellm/litellm_core_utils/logging_callback_manager.py +++ b/litellm/litellm_core_utils/logging_callback_manager.py @@ -175,7 +175,7 @@ class LoggingCallbackManager: callback_type: generic_api endpoint: https://webhook-test.com/30343bc33591bc5e6dc44217ceae3e0a headers: - Authorization: Bearer sk-1234 + Authorization: Bearer sk- """ callback_config: Final = litellm.callback_settings.get(callback) diff --git a/litellm/proxy/_lazy_openapi_snapshot.json b/litellm/proxy/_lazy_openapi_snapshot.json index cb7a18cd107..9b3f054585c 100644 --- a/litellm/proxy/_lazy_openapi_snapshot.json +++ b/litellm/proxy/_lazy_openapi_snapshot.json @@ -1241,7 +1241,7 @@ "paths": { "/access_group/list": { "get": { - "description": "List all access groups.\n\nReturns a list of all access groups with their model names, deployment counts, shared budget\nand the spend drawn against it.\n\nExample:\n```bash\ncurl -X GET 'http://localhost:4000/access_group/list' \\\n -H 'Authorization: Bearer sk-1234'\n```\n\nReturns:\n- ListAccessGroupsResponse with all access groups", + "description": "List all access groups.\n\nReturns a list of all access groups with their model names, deployment counts, shared budget\nand the spend drawn against it.\n\nExample:\n```bash\ncurl -X GET 'http://localhost:4000/access_group/list' \\\n -H \"Authorization: Bearer $LITELLM_API_KEY\"\n```\n\nReturns:\n- ListAccessGroupsResponse with all access groups", "operationId": "list_access_groups_access_group_list_get", "responses": { "200": { @@ -1268,7 +1268,7 @@ }, "/access_group/new": { "post": { - "description": "Create a new access group containing multiple model names.\n\nAn access group is a named collection of model groups that can be referenced\nby teams/keys for simplified access control.\n\nExample:\n```bash\ncurl -X POST 'http://localhost:4000/access_group/new' \\\n -H 'Authorization: Bearer sk-1234' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"access_group\": \"production-models\",\n \"model_names\": [\"gpt-4\", \"claude-3-opus\", \"gemini-pro\"]\n }'\n```\n\nParameters:\n- access_group: str - The access group name (e.g., \"production-models\")\n- model_names: List[str] - List of existing model groups to include\n\nReturns:\n- NewModelGroupResponse with the created access group details\n\nRaises:\n- HTTPException 400: If any model names don't exist\n- HTTPException 500: If database operations fail", + "description": "Create a new access group containing multiple model names.\n\nAn access group is a named collection of model groups that can be referenced\nby teams/keys for simplified access control.\n\nExample:\n```bash\ncurl -X POST 'http://localhost:4000/access_group/new' \\\n -H \"Authorization: Bearer $LITELLM_API_KEY\" \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"access_group\": \"production-models\",\n \"model_names\": [\"gpt-4\", \"claude-3-opus\", \"gemini-pro\"]\n }'\n```\n\nParameters:\n- access_group: str - The access group name (e.g., \"production-models\")\n- model_names: List[str] - List of existing model groups to include\n\nReturns:\n- NewModelGroupResponse with the created access group details\n\nRaises:\n- HTTPException 400: If any model names don't exist\n- HTTPException 500: If database operations fail", "operationId": "create_model_group_access_group_new_post", "requestBody": { "content": { @@ -1315,7 +1315,7 @@ }, "/access_group/{access_group}/budget": { "delete": { - "description": "Clear the shared budget of an access group, leaving the group itself in place.\n\nExample:\n```bash\ncurl -X DELETE 'http://localhost:4000/access_group/production-models/budget' \\\n -H 'Authorization: Bearer sk-1234'\n```\n\nParameters:\n- access_group: str - The access group name (URL path parameter)\n\nReturns:\n- DeleteAccessGroupBudgetResponse; budget_deleted is false when there was nothing to clear\n\nRaises:\n- HTTPException 404: If access group not found", + "description": "Clear the shared budget of an access group, leaving the group itself in place.\n\nExample:\n```bash\ncurl -X DELETE 'http://localhost:4000/access_group/production-models/budget' \\\n -H \"Authorization: Bearer $LITELLM_API_KEY\"\n```\n\nParameters:\n- access_group: str - The access group name (URL path parameter)\n\nReturns:\n- DeleteAccessGroupBudgetResponse; budget_deleted is false when there was nothing to clear\n\nRaises:\n- HTTPException 404: If access group not found", "operationId": "delete_access_group_budget_access_group__access_group__budget_delete", "parameters": [ { @@ -1361,7 +1361,7 @@ ] }, "get": { - "description": "Get the shared budget of an access group, and the spend drawn against it.\n\nExample:\n```bash\ncurl -X GET 'http://localhost:4000/access_group/production-models/budget' \\\n -H 'Authorization: Bearer sk-1234'\n```\n\nParameters:\n- access_group: str - The access group name (URL path parameter)\n\nReturns:\n- AccessGroupBudgetResponse; budget is null when the group has no budget set\n\nRaises:\n- HTTPException 404: If access group not found", + "description": "Get the shared budget of an access group, and the spend drawn against it.\n\nExample:\n```bash\ncurl -X GET 'http://localhost:4000/access_group/production-models/budget' \\\n -H \"Authorization: Bearer $LITELLM_API_KEY\"\n```\n\nParameters:\n- access_group: str - The access group name (URL path parameter)\n\nReturns:\n- AccessGroupBudgetResponse; budget is null when the group has no budget set\n\nRaises:\n- HTTPException 404: If access group not found", "operationId": "get_access_group_budget_access_group__access_group__budget_get", "parameters": [ { @@ -1407,7 +1407,7 @@ ] }, "put": { - "description": "Set or replace the shared budget of an access group. Idempotent.\n\nEvery key that can reach a model in the group draws from this one budget.\n\nExample:\n```bash\ncurl -X PUT 'http://localhost:4000/access_group/production-models/budget' \\\n -H 'Authorization: Bearer sk-1234' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"max_budget\": 100.0,\n \"budget_duration\": \"30d\"\n }'\n```\n\nParameters:\n- access_group: str - The access group name (URL path parameter)\n- max_budget: Optional[float] - Requests fail once the group's shared spend exceeds this\n- soft_budget: Optional[float] - Fires an alert when reached; requests still succeed\n- budget_duration: Optional[str] - Frequency of resetting the group's spend (e.g. '30d')\n- budget_id: Optional[str] - Link an existing budget instead of creating one\n\nReturns:\n- AccessGroupBudgetResponse with the stored budget and current spend\n\nRaises:\n- HTTPException 400: If no budget field is given, or budget_duration cannot be parsed\n- HTTPException 404: If access group not found", + "description": "Set or replace the shared budget of an access group. Idempotent.\n\nEvery key that can reach a model in the group draws from this one budget.\n\nExample:\n```bash\ncurl -X PUT 'http://localhost:4000/access_group/production-models/budget' \\\n -H \"Authorization: Bearer $LITELLM_API_KEY\" \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"max_budget\": 100.0,\n \"budget_duration\": \"30d\"\n }'\n```\n\nParameters:\n- access_group: str - The access group name (URL path parameter)\n- max_budget: Optional[float] - Requests fail once the group's shared spend exceeds this\n- soft_budget: Optional[float] - Fires an alert when reached; requests still succeed\n- budget_duration: Optional[str] - Frequency of resetting the group's spend (e.g. '30d')\n- budget_id: Optional[str] - Link an existing budget instead of creating one\n\nReturns:\n- AccessGroupBudgetResponse with the stored budget and current spend\n\nRaises:\n- HTTPException 400: If no budget field is given, or budget_duration cannot be parsed\n- HTTPException 404: If access group not found", "operationId": "set_access_group_budget_access_group__access_group__budget_put", "parameters": [ { @@ -1465,7 +1465,7 @@ }, "/access_group/{access_group}/delete": { "delete": { - "description": "Delete an access group.\n\nRemoves the access group from all deployments that have it.\n\nExample:\n```bash\ncurl -X DELETE 'http://localhost:4000/access_group/production-models/delete' \\\n -H 'Authorization: Bearer sk-1234'\n```\n\nParameters:\n- access_group: str - The access group name (URL path parameter)\n\nReturns:\n- DeleteModelGroupResponse with deletion details\n\nRaises:\n- HTTPException 404: If access group not found", + "description": "Delete an access group.\n\nRemoves the access group from all deployments that have it.\n\nExample:\n```bash\ncurl -X DELETE 'http://localhost:4000/access_group/production-models/delete' \\\n -H \"Authorization: Bearer $LITELLM_API_KEY\"\n```\n\nParameters:\n- access_group: str - The access group name (URL path parameter)\n\nReturns:\n- DeleteModelGroupResponse with deletion details\n\nRaises:\n- HTTPException 404: If access group not found", "operationId": "delete_access_group_access_group__access_group__delete_delete", "parameters": [ { @@ -1513,7 +1513,7 @@ }, "/access_group/{access_group}/info": { "get": { - "description": "Get information about a specific access group.\n\nExample:\n```bash\ncurl -X GET 'http://localhost:4000/access_group/production-models/info' \\\n -H 'Authorization: Bearer sk-1234'\n```\n\nParameters:\n- access_group: str - The access group name (URL path parameter)\n\nReturns:\n- AccessGroupInfo with the access group details, its shared budget and its spend\n\nRaises:\n- HTTPException 404: If access group not found", + "description": "Get information about a specific access group.\n\nExample:\n```bash\ncurl -X GET 'http://localhost:4000/access_group/production-models/info' \\\n -H \"Authorization: Bearer $LITELLM_API_KEY\"\n```\n\nParameters:\n- access_group: str - The access group name (URL path parameter)\n\nReturns:\n- AccessGroupInfo with the access group details, its shared budget and its spend\n\nRaises:\n- HTTPException 404: If access group not found", "operationId": "get_access_group_info_access_group__access_group__info_get", "parameters": [ { @@ -1561,7 +1561,7 @@ }, "/access_group/{access_group}/update": { "put": { - "description": "Update an access group's model names.\n\nThis will:\n1. Remove the access group from all current deployments\n2. Add the access group to all deployments for the new model_names list\n\nExample:\n```bash\ncurl -X PUT 'http://localhost:4000/access_group/production-models/update' \\\n -H 'Authorization: Bearer sk-1234' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"model_names\": [\"gpt-4\", \"claude-3-sonnet\"]\n }'\n```\n\nParameters:\n- access_group: str - The access group name (URL path parameter)\n- model_names: List[str] - New list of model groups to include\n\nReturns:\n- NewModelGroupResponse with the updated access group details\n\nRaises:\n- HTTPException 400: If any model names don't exist\n- HTTPException 404: If access group not found", + "description": "Update an access group's model names.\n\nThis will:\n1. Remove the access group from all current deployments\n2. Add the access group to all deployments for the new model_names list\n\nExample:\n```bash\ncurl -X PUT 'http://localhost:4000/access_group/production-models/update' \\\n -H \"Authorization: Bearer $LITELLM_API_KEY\" \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"model_names\": [\"gpt-4\", \"claude-3-sonnet\"]\n }'\n```\n\nParameters:\n- access_group: str - The access group name (URL path parameter)\n- model_names: List[str] - New list of model groups to include\n\nReturns:\n- NewModelGroupResponse with the updated access group details\n\nRaises:\n- HTTPException 400: If any model names don't exist\n- HTTPException 404: If access group not found", "operationId": "update_access_group_access_group__access_group__update_put", "parameters": [ { @@ -17440,7 +17440,7 @@ }, "/cursor/chat/completions": { "post": { - "description": "Cursor BYOK endpoint. Accepts both request shapes Cursor sends to its OpenAI-compatible\nbase URL and always answers in chat completions format.\n\nCursor agent mode sends Responses API format bodies (`input`, flat tool defs, `reasoning`,\ncustom tools) to the chat/completions path while expecting chat completions responses;\nthose are routed through the Responses API pipeline and converted back. Genuine chat\ncompletions bodies (`messages` present) are routed through the standard chat completions\npipeline, after normalizing each level of the `tools` array and `tool_choice` to the chat\ncompletions shapes OpenAI requires. Cursor mixes Responses API shapes into chat bodies\nper level, independently: a flat tool def (`{\"type\": \"custom\", \"name\": \"ApplyPatch\", ...}`)\ngets nested under `custom`, and a flat grammar format\n(`{\"type\": \"grammar\", \"definition\", \"syntax\"}`) gets wrapped as\n`{\"type\": \"grammar\", \"grammar\": {...}}` wherever it appears, including inside tool defs\nCursor already sent pre-nested.\n\n```bash\ncurl -X POST http://localhost:4000/cursor/chat/completions -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n}'\nResponds back in chat completions format.\n```", + "description": "Cursor BYOK endpoint. Accepts both request shapes Cursor sends to its OpenAI-compatible\nbase URL and always answers in chat completions format.\n\nCursor agent mode sends Responses API format bodies (`input`, flat tool defs, `reasoning`,\ncustom tools) to the chat/completions path while expecting chat completions responses;\nthose are routed through the Responses API pipeline and converted back. Genuine chat\ncompletions bodies (`messages` present) are routed through the standard chat completions\npipeline, after normalizing each level of the `tools` array and `tool_choice` to the chat\ncompletions shapes OpenAI requires. Cursor mixes Responses API shapes into chat bodies\nper level, independently: a flat tool def (`{\"type\": \"custom\", \"name\": \"ApplyPatch\", ...}`)\ngets nested under `custom`, and a flat grammar format\n(`{\"type\": \"grammar\", \"definition\", \"syntax\"}`) gets wrapped as\n`{\"type\": \"grammar\", \"grammar\": {...}}` wherever it appears, including inside tool defs\nCursor already sent pre-nested.\n\n```bash\ncurl -X POST http://localhost:4000/cursor/chat/completions -H \"Content-Type: application/json\" -H \"Authorization: Bearer $LITELLM_API_KEY\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n}'\nResponds back in chat completions format.\n```", "operationId": "cursor_chat_completions_cursor_chat_completions_post", "responses": { "200": { @@ -18817,7 +18817,7 @@ }, "/openai/deployments/{model}/chat/completions": { "post": { - "description": "Follows the exact same API spec as `OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat`\n\n```bash\ncurl -X POST http://localhost:4000/v1/chat/completions \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer sk-1234\" \n-d '{\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n}'\n```", + "description": "Follows the exact same API spec as `OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat`\n\n```bash\ncurl -X POST http://localhost:4000/v1/chat/completions \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer $LITELLM_API_KEY\" \n-d '{\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n}'\n```", "operationId": "chat_completion_openai_deployments__model__chat_completions_post", "parameters": [ { @@ -18950,7 +18950,7 @@ }, "/openai/deployments/{model}/completions": { "post": { - "description": "Follows the exact same API spec as `OpenAI's Completions API https://platform.openai.com/docs/api-reference/completions`\n\n```bash\ncurl -X POST http://localhost:4000/v1/completions \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer sk-1234\" \n-d '{\n \"model\": \"gpt-3.5-turbo-instruct\",\n \"prompt\": \"Once upon a time\",\n \"max_tokens\": 50,\n \"temperature\": 0.7\n}'\n```", + "description": "Follows the exact same API spec as `OpenAI's Completions API https://platform.openai.com/docs/api-reference/completions`\n\n```bash\ncurl -X POST http://localhost:4000/v1/completions \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer $LITELLM_API_KEY\" \n-d '{\n \"model\": \"gpt-3.5-turbo-instruct\",\n \"prompt\": \"Once upon a time\",\n \"max_tokens\": 50,\n \"temperature\": 0.7\n}'\n```", "operationId": "completion_openai_deployments__model__completions_post", "parameters": [ { @@ -19003,7 +19003,7 @@ }, "/openai/deployments/{model}/embeddings": { "post": { - "description": "Follows the exact same API spec as `OpenAI's Embeddings API https://platform.openai.com/docs/api-reference/embeddings`\n\n```bash\ncurl -X POST http://localhost:4000/v1/embeddings \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer sk-1234\" \n-d '{\n \"model\": \"text-embedding-ada-002\",\n \"input\": \"The quick brown fox jumps over the lazy dog\"\n}'\n```", + "description": "Follows the exact same API spec as `OpenAI's Embeddings API https://platform.openai.com/docs/api-reference/embeddings`\n\n```bash\ncurl -X POST http://localhost:4000/v1/embeddings \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer $LITELLM_API_KEY\" \n-d '{\n \"model\": \"text-embedding-ada-002\",\n \"input\": \"The quick brown fox jumps over the lazy dog\"\n}'\n```", "operationId": "embeddings_openai_deployments__model__embeddings_post", "parameters": [ { @@ -19056,7 +19056,7 @@ }, "/openai/deployments/{model}/images/edits": { "post": { - "description": "Follows the OpenAI Images API spec: https://platform.openai.com/docs/api-reference/images/create\n\n```bash\ncurl -s -D >(grep -i x-request-id >&2) -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) -X POST \"http://localhost:4000/v1/images/edits\" -H \"Authorization: Bearer sk-1234\" -F \"model=gpt-image-1\" -F \"image[]=@soap.png\" -F 'prompt=Create a studio ghibli image of this'\n```", + "description": "Follows the OpenAI Images API spec: https://platform.openai.com/docs/api-reference/images/create\n\n```bash\ncurl -s -D >(grep -i x-request-id >&2) -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) -X POST \"http://localhost:4000/v1/images/edits\" -H \"Authorization: Bearer $LITELLM_API_KEY\" -F \"model=gpt-image-1\" -F \"image[]=@soap.png\" -F 'prompt=Create a studio ghibli image of this'\n```", "operationId": "image_edit_api_openai_deployments__model__images_edits_post", "parameters": [ { @@ -19242,7 +19242,7 @@ }, "/openai/v1/responses": { "post": { - "description": "Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses\n\nSupports background mode with polling_via_cache for partial response retrieval.\nWhen background=true and polling_via_cache is enabled, returns a polling_id immediately\nand streams the response in the background, updating Redis cache.\n\n```bash\n# Normal request\ncurl -X POST http://localhost:4000/v1/responses -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": \"Tell me about AI\"\n}'\n\n# Background request with polling\ncurl -X POST http://localhost:4000/v1/responses -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": \"Tell me about AI\",\n \"background\": true\n}'\n```", + "description": "Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses\n\nSupports background mode with polling_via_cache for partial response retrieval.\nWhen background=true and polling_via_cache is enabled, returns a polling_id immediately\nand streams the response in the background, updating Redis cache.\n\n```bash\n# Normal request\ncurl -X POST http://localhost:4000/v1/responses -H \"Content-Type: application/json\" -H \"Authorization: Bearer $LITELLM_API_KEY\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": \"Tell me about AI\"\n}'\n\n# Background request with polling\ncurl -X POST http://localhost:4000/v1/responses -H \"Content-Type: application/json\" -H \"Authorization: Bearer $LITELLM_API_KEY\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": \"Tell me about AI\",\n \"background\": true\n}'\n```", "operationId": "responses_api_openai_v1_responses_post", "responses": { "200": { @@ -19267,7 +19267,7 @@ }, "/openai/v1/responses/compact": { "post": { - "description": "Compact a response by running a compaction pass over a conversation.\n\nReturns encrypted, opaque items that can be used to reduce context size.\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/compact\n\n```bash\ncurl -X POST http://localhost:4000/v1/responses/compact -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n}'\n```", + "description": "Compact a response by running a compaction pass over a conversation.\n\nReturns encrypted, opaque items that can be used to reduce context size.\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/compact\n\n```bash\ncurl -X POST http://localhost:4000/v1/responses/compact -H \"Content-Type: application/json\" -H \"Authorization: Bearer $LITELLM_API_KEY\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n}'\n```", "operationId": "compact_response_openai_v1_responses_compact_post", "responses": { "200": { @@ -19292,7 +19292,7 @@ }, "/openai/v1/responses/input_tokens": { "post": { - "description": "Count the input tokens of a Responses API request without calling the model.\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/input-tokens\n\n```bash\ncurl -X POST http://localhost:4000/v1/responses/input_tokens -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": \"Hello, how are you?\"\n}'\n```\n\nReturns: `{\"object\": \"response.input_tokens\", \"input_tokens\": }`", + "description": "Count the input tokens of a Responses API request without calling the model.\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/input-tokens\n\n```bash\ncurl -X POST http://localhost:4000/v1/responses/input_tokens -H \"Content-Type: application/json\" -H \"Authorization: Bearer $LITELLM_API_KEY\" -d '{\n \"model\": \"gpt-4o\",\n \"input\": \"Hello, how are you?\"\n}'\n```\n\nReturns: `{\"object\": \"response.input_tokens\", \"input_tokens\": }`", "operationId": "responses_input_tokens_openai_v1_responses_input_tokens_post", "responses": { "200": { @@ -19317,7 +19317,7 @@ }, "/openai/v1/responses/{response_id}": { "delete": { - "description": "Delete a response by ID.\n\nSupports both:\n- Polling IDs (litellm_poll_*): Deletes from Redis cache\n- Provider response IDs: Passes through to provider API\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/delete\n\n```bash\ncurl -X DELETE http://localhost:4000/v1/responses/resp_abc123 -H \"Authorization: Bearer sk-1234\"\n```", + "description": "Delete a response by ID.\n\nSupports both:\n- Polling IDs (litellm_poll_*): Deletes from Redis cache\n- Provider response IDs: Passes through to provider API\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/delete\n\n```bash\ncurl -X DELETE http://localhost:4000/v1/responses/resp_abc123 -H \"Authorization: Bearer $LITELLM_API_KEY\"\n```", "operationId": "delete_response_openai_v1_responses__response_id__delete", "parameters": [ { @@ -19361,7 +19361,7 @@ ] }, "get": { - "description": "Get a response by ID.\n\nSupports both:\n- Polling IDs (litellm_poll_*): Returns cumulative cached content from background responses\n- Provider response IDs: Passes through to provider API\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/get\n\n```bash\n# Get polling response\ncurl -X GET http://localhost:4000/v1/responses/litellm_poll_abc123 -H \"Authorization: Bearer sk-1234\"\n\n# Get provider response\ncurl -X GET http://localhost:4000/v1/responses/resp_abc123 -H \"Authorization: Bearer sk-1234\"\n```", + "description": "Get a response by ID.\n\nSupports both:\n- Polling IDs (litellm_poll_*): Returns cumulative cached content from background responses\n- Provider response IDs: Passes through to provider API\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/get\n\n```bash\n# Get polling response\ncurl -X GET http://localhost:4000/v1/responses/litellm_poll_abc123 -H \"Authorization: Bearer $LITELLM_API_KEY\"\n\n# Get provider response\ncurl -X GET http://localhost:4000/v1/responses/resp_abc123 -H \"Authorization: Bearer $LITELLM_API_KEY\"\n```", "operationId": "get_response_openai_v1_responses__response_id__get", "parameters": [ { @@ -19407,7 +19407,7 @@ }, "/openai/v1/responses/{response_id}/cancel": { "post": { - "description": "Cancel a response by ID.\n\nSupports both:\n- Polling IDs (litellm_poll_*): Cancels background response and updates status in Redis\n- Provider response IDs: Passes through to provider API\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/cancel\n\n```bash\n# Cancel polling response\ncurl -X POST http://localhost:4000/v1/responses/litellm_poll_abc123/cancel -H \"Authorization: Bearer sk-1234\"\n\n# Cancel provider response\ncurl -X POST http://localhost:4000/v1/responses/resp_abc123/cancel -H \"Authorization: Bearer sk-1234\"\n```", + "description": "Cancel a response by ID.\n\nSupports both:\n- Polling IDs (litellm_poll_*): Cancels background response and updates status in Redis\n- Provider response IDs: Passes through to provider API\n\nFollows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/cancel\n\n```bash\n# Cancel polling response\ncurl -X POST http://localhost:4000/v1/responses/litellm_poll_abc123/cancel -H \"Authorization: Bearer $LITELLM_API_KEY\"\n\n# Cancel provider response\ncurl -X POST http://localhost:4000/v1/responses/resp_abc123/cancel -H \"Authorization: Bearer $LITELLM_API_KEY\"\n```", "operationId": "cancel_response_openai_v1_responses__response_id__cancel_post", "parameters": [ { @@ -44527,7 +44527,7 @@ "paths": { "/v1/indexes": { "get": { - "description": "List all vector store indexes. Proxy admin only.\n\n```bash\ncurl -L -X GET 'http://0.0.0.0:4000/v1/indexes' -H 'Authorization: Bearer sk-1234'\n```", + "description": "List all vector store indexes. Proxy admin only.\n\n```bash\ncurl -L -X GET 'http://0.0.0.0:4000/v1/indexes' -H \"Authorization: Bearer $LITELLM_API_KEY\"\n```", "operationId": "index_list_v1_indexes_get", "responses": { "200": { @@ -44552,7 +44552,7 @@ ] }, "post": { - "description": "Create an index. Just writes the index to the database.\n\n```bash\ncurl -L -X POST 'http://0.0.0.0:4000/v1/indexes' -H 'Content-Type: application/json' -H 'Authorization: Bearer sk-1234' -d '{\n \"index_name\": \"dall-e-3\",\n \"litellm_params\": {\n \"vector_store_index\": \"real-index-name\",\n \"vector_store_name\": \"azure-ai-search\"\n }\n }'\n```", + "description": "Create an index. Just writes the index to the database.\n\n```bash\ncurl -L -X POST 'http://0.0.0.0:4000/v1/indexes' -H 'Content-Type: application/json' -H \"Authorization: Bearer $LITELLM_API_KEY\" -d '{\n \"index_name\": \"dall-e-3\",\n \"litellm_params\": {\n \"vector_store_index\": \"real-index-name\",\n \"vector_store_name\": \"azure-ai-search\"\n }\n }'\n```", "operationId": "index_create_v1_indexes_post", "requestBody": { "content": { diff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yaml index 703fe6adc41..235d64f29ad 100644 --- a/litellm/proxy/_new_secret_config.yaml +++ b/litellm/proxy/_new_secret_config.yaml @@ -80,4 +80,4 @@ litellm_settings: drop_params: True general_settings: - master_key: sk-1234 # REPLACE in production + master_key: os.environ/LITELLM_MASTER_KEY diff --git a/litellm/proxy/auth/auth_utils.py b/litellm/proxy/auth/auth_utils.py index be65c3b39ec..603cce44828 100644 --- a/litellm/proxy/auth/auth_utils.py +++ b/litellm/proxy/auth/auth_utils.py @@ -628,7 +628,7 @@ def route_in_additonal_public_routes(current_route: str): ```yaml general_settings: - master_key: sk-1234 + master_key: os.environ/LITELLM_MASTER_KEY public_routes: ["LiteLLMRoutes.public_routes", "/spend/calculate", "/api/*"] ``` """ diff --git a/litellm/proxy/auth/user_api_key_auth.py b/litellm/proxy/auth/user_api_key_auth.py index 9828311112e..b86340898c8 100644 --- a/litellm/proxy/auth/user_api_key_auth.py +++ b/litellm/proxy/auth/user_api_key_auth.py @@ -394,7 +394,7 @@ def _get_bearer_token_or_received_api_key(api_key: str) -> str: api_key = api_key.replace("bearer ", "") elif api_key.startswith("AWS4-HMAC-SHA256"): # Handle AWS Signature V4 format from LangChain - # Format: AWS4-HMAC-SHA256 Credential=Bearer sk-12345/date/region/service/aws4_request, SignedHeaders=..., Signature=... + # Format: AWS4-HMAC-SHA256 Credential=Bearer sk-/date/region/service/aws4_request, SignedHeaders=..., Signature=... # Extract the Bearer token from the Credential field match = re.search(r"Credential=Bearer\s+([^/\s,]+)", api_key) if match: @@ -490,7 +490,7 @@ def _get_bearer_token( api_key = api_key.replace("bearer ", "") elif api_key.startswith("AWS4-HMAC-SHA256"): # Handle AWS Signature V4 format from LangChain - # Format: AWS4-HMAC-SHA256 Credential=Bearer sk-12345/date/region/service/aws4_request, SignedHeaders=..., Signature=... + # Format: AWS4-HMAC-SHA256 Credential=Bearer sk-/date/region/service/aws4_request, SignedHeaders=..., Signature=... # Extract the Bearer token from the Credential field match = re.search(r"Credential=Bearer\s+([^/\s,]+)", api_key) if match: @@ -1308,7 +1308,7 @@ async def _user_api_key_auth_builder( route=route, request=request, ) - # if user wants to pass LiteLLM_Master_Key as a custom header, example pass litellm keys as X-LiteLLM-Key: Bearer sk-1234 + # if user wants to pass LiteLLM_Master_Key as a custom header, example pass litellm keys as X-LiteLLM-Key: Bearer sk- custom_litellm_key_header_name: Final = general_settings.get("litellm_key_header_name") if custom_litellm_key_header_name is not None: api_key = get_api_key_from_custom_header( diff --git a/litellm/proxy/batches_endpoints/endpoints.py b/litellm/proxy/batches_endpoints/endpoints.py index 5c4bacd757c..5f33c635a02 100644 --- a/litellm/proxy/batches_endpoints/endpoints.py +++ b/litellm/proxy/batches_endpoints/endpoints.py @@ -123,7 +123,7 @@ async def create_batch( Example Curl ``` curl http://localhost:4000/v1/batches \ - -H "Authorization: Bearer sk-1234" \ + -H "Authorization: Bearer $LITELLM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "input_file_id": "file-abc123", @@ -417,7 +417,7 @@ async def retrieve_batch( Example Curl ``` curl http://localhost:4000/v1/batches/batch_abc123 \ - -H "Authorization: Bearer sk-1234" \ + -H "Authorization: Bearer $LITELLM_API_KEY" \ -H "Content-Type: application/json" \ ``` @@ -710,7 +710,7 @@ async def list_batches( Example Curl ``` curl http://localhost:4000/v1/batches?limit=2 \ - -H "Authorization: Bearer sk-1234" \ + -H "Authorization: Bearer $LITELLM_API_KEY" \ -H "Content-Type: application/json" \ ``` @@ -891,7 +891,7 @@ async def cancel_batch( Example Curl ``` curl http://localhost:4000/v1/batches/batch_abc123/cancel \ - -H "Authorization: Bearer sk-1234" \ + -H "Authorization: Bearer $LITELLM_API_KEY" \ -H "Content-Type: application/json" \ -X POST diff --git a/litellm/proxy/caching_routes.py b/litellm/proxy/caching_routes.py index eccbf75667d..b7f98c675d5 100644 --- a/litellm/proxy/caching_routes.py +++ b/litellm/proxy/caching_routes.py @@ -133,7 +133,7 @@ async def cache_delete(request: Request): ```shell curl -X POST "http://0.0.0.0:4000/cache/delete" \ - -H "Authorization: Bearer sk-1234" \ + -H "Authorization: Bearer $LITELLM_API_KEY" \ -d '{"keys": ["key1", "key2"]}' ``` @@ -226,7 +226,7 @@ async def cache_flushall(): Usage: ``` - curl -X POST http://0.0.0.0:4000/cache/flushall -H "Authorization: Bearer sk-1234" + curl -X POST http://0.0.0.0:4000/cache/flushall -H "Authorization: Bearer $LITELLM_API_KEY" ``` """ try: diff --git a/litellm/proxy/common_utils/admin_ui_utils.py b/litellm/proxy/common_utils/admin_ui_utils.py index 453f5d7349b..2835fa4cb9a 100644 --- a/litellm/proxy/common_utils/admin_ui_utils.py +++ b/litellm/proxy/common_utils/admin_ui_utils.py @@ -73,7 +73,7 @@ def missing_keys_form(missing_key_names: str):

Environment Setup Instructions

Please add the following variables to your environment variables:

-    LITELLM_MASTER_KEY="sk-1234" # Your master key for the proxy server. Can use this to send /chat/completion requests etc
+    LITELLM_MASTER_KEY="sk-" # Your master key for the proxy server. Can use this to send /chat/completion requests etc
     LITELLM_SALT_KEY="sk-XXXXXXXX" # Can NOT CHANGE THIS ONCE SET - It is used to encrypt/decrypt credentials stored in DB. If value of 'LITELLM_SALT_KEY' changes your models cannot be retrieved from DB
     DATABASE_URL="postgres://..." # Need a postgres database? (Check out Supabase, Neon, etc)
     ## OPTIONAL ##
diff --git a/litellm/proxy/common_utils/debug_utils.py b/litellm/proxy/common_utils/debug_utils.py
index dc329e55e31..973a0ad6cb5 100644
--- a/litellm/proxy/common_utils/debug_utils.py
+++ b/litellm/proxy/common_utils/debug_utils.py
@@ -328,7 +328,7 @@ async def get_memory_summary(
     - garbage_collector: GC status and pending object counts
 
     Example usage:
-    curl http://localhost:4000/debug/memory/summary -H "Authorization: Bearer sk-1234"
+    curl http://localhost:4000/debug/memory/summary -H "Authorization: Bearer $LITELLM_API_KEY"
 
     For detailed analysis, call GET /debug/memory/details
     For cache management, use the cache management endpoints
@@ -689,7 +689,7 @@ async def get_memory_details(
     - include_process_info: Include process-level memory info using psutil (default: true)
 
     Example usage:
-    curl "http://localhost:4000/debug/memory/details?top_n=30" -H "Authorization: Bearer sk-1234"
+    curl "http://localhost:4000/debug/memory/details?top_n=30" -H "Authorization: Bearer $LITELLM_API_KEY"
 
     All memory sizes are reported in both bytes and MB.
     """
@@ -751,10 +751,10 @@ async def configure_gc_thresholds_endpoint(
     - generation_2: Number of gen-1 collections before gen-2 collection (default: 10)
 
     Example for more aggressive collection:
-    curl -X POST "http://localhost:4000/debug/memory/gc/configure?generation_0=500" -H "Authorization: Bearer sk-1234"
+    curl -X POST "http://localhost:4000/debug/memory/gc/configure?generation_0=500" -H "Authorization: Bearer $LITELLM_API_KEY"
 
     Example for less aggressive collection:
-    curl -X POST "http://localhost:4000/debug/memory/gc/configure?generation_0=1000" -H "Authorization: Bearer sk-1234"
+    curl -X POST "http://localhost:4000/debug/memory/gc/configure?generation_0=1000" -H "Authorization: Bearer $LITELLM_API_KEY"
 
     Monitor memory usage with GET /debug/memory/summary after changes.
     """
diff --git a/litellm/proxy/container_endpoints/endpoints.py b/litellm/proxy/container_endpoints/endpoints.py
index e852eb5d6f9..d082fd788c2 100644
--- a/litellm/proxy/container_endpoints/endpoints.py
+++ b/litellm/proxy/container_endpoints/endpoints.py
@@ -52,7 +52,7 @@ async def create_container(
     Example:
     ```bash
     curl -X POST "http://localhost:4000/v1/containers" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H "Content-Type: application/json" \
         -d '{
             "name": "My Container",
@@ -66,7 +66,7 @@ async def create_container(
     Or specify provider via header:
     ```bash
     curl -X POST "http://localhost:4000/v1/containers" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H "custom-llm-provider: azure" \
         -H "Content-Type: application/json" \
         -d '{
@@ -187,13 +187,13 @@ async def list_containers(
     Example:
     ```bash
     curl -X GET "http://localhost:4000/v1/containers?limit=20&order=desc" \
-        -H "Authorization: Bearer sk-1234"
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     
     Or specify provider via header or query param:
     ```bash
     curl -X GET "http://localhost:4000/v1/containers?custom_llm_provider=azure" \
-        -H "Authorization: Bearer sk-1234"
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import (
@@ -290,13 +290,13 @@ async def retrieve_container(
     Example:
     ```bash
     curl -X GET "http://localhost:4000/v1/containers/cntr_123" \
-        -H "Authorization: Bearer sk-1234"
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     
     Or specify provider via header:
     ```bash
     curl -X GET "http://localhost:4000/v1/containers/cntr_123" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H "custom-llm-provider: azure"
     ```
     """
@@ -395,13 +395,13 @@ async def delete_container(
     Example:
     ```bash
     curl -X DELETE "http://localhost:4000/v1/containers/cntr_123" \
-        -H "Authorization: Bearer sk-1234"
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     
     Or specify provider via header:
     ```bash
     curl -X DELETE "http://localhost:4000/v1/containers/cntr_123" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H "custom-llm-provider: azure"
     ```
     """
diff --git a/litellm/proxy/dev_config.yaml b/litellm/proxy/dev_config.yaml
index f78431f694b..a9aa78480b6 100644
--- a/litellm/proxy/dev_config.yaml
+++ b/litellm/proxy/dev_config.yaml
@@ -198,7 +198,7 @@ model_list:
       api_key: os.environ/OPENAI_API_KEY
 
 general_settings:
-  master_key: sk-1234
+  master_key: os.environ/LITELLM_MASTER_KEY
   # Opt-in: let CheckBatchCost track cost for unmanaged batches created with a raw
   # gs:// (Vertex) or s3:// (Bedrock) input_file_id. Requires a matching deployment
   # configured for the batched model. Defaults to false.
diff --git a/litellm/proxy/example_config_yaml/adaptive_router_example.yaml b/litellm/proxy/example_config_yaml/adaptive_router_example.yaml
index 58f5398ca57..32fda39a8e3 100644
--- a/litellm/proxy/example_config_yaml/adaptive_router_example.yaml
+++ b/litellm/proxy/example_config_yaml/adaptive_router_example.yaml
@@ -49,4 +49,4 @@ litellm_settings:
   drop_params: True
 
 general_settings:
-  master_key: sk-1234 # REPLACE in production
+  master_key: os.environ/LITELLM_MASTER_KEY
diff --git a/litellm/proxy/example_config_yaml/oai_misc_config.yaml b/litellm/proxy/example_config_yaml/oai_misc_config.yaml
index 16cc69c19a5..26597a31430 100644
--- a/litellm/proxy/example_config_yaml/oai_misc_config.yaml
+++ b/litellm/proxy/example_config_yaml/oai_misc_config.yaml
@@ -72,4 +72,4 @@ files_settings:
     api_key: os.environ/OPENAI_API_KEY
 
 general_settings: 
-  master_key: sk-1234 # [OPTIONAL] Use to enforce auth on proxy. See - https://docs.litellm.ai/docs/proxy/virtual_keys
\ No newline at end of file
+  master_key: os.environ/LITELLM_MASTER_KEY # [OPTIONAL] Use to enforce auth on proxy. See - https://docs.litellm.ai/docs/proxy/virtual_keys
\ No newline at end of file
diff --git a/litellm/proxy/example_config_yaml/pass_through_config.yaml b/litellm/proxy/example_config_yaml/pass_through_config.yaml
index 373ee189f3f..d829b7938ad 100644
--- a/litellm/proxy/example_config_yaml/pass_through_config.yaml
+++ b/litellm/proxy/example_config_yaml/pass_through_config.yaml
@@ -29,7 +29,7 @@ model_list:
       model: openai/*
       api_key: os.environ/OPENAI_API_KEY
 general_settings: 
-  master_key: sk-1234 
+  master_key: os.environ/LITELLM_MASTER_KEY 
   custom_auth: custom_auth_basic.user_api_key_auth
   pass_through_endpoints:
     - path: "/azure-config-passthrough"
diff --git a/litellm/proxy/example_config_yaml/reject_clientside_metadata_tags_config.yaml b/litellm/proxy/example_config_yaml/reject_clientside_metadata_tags_config.yaml
index 3c43c3c5374..ebe9aebbf2e 100644
--- a/litellm/proxy/example_config_yaml/reject_clientside_metadata_tags_config.yaml
+++ b/litellm/proxy/example_config_yaml/reject_clientside_metadata_tags_config.yaml
@@ -5,7 +5,7 @@ model_list:
       api_key: os.environ/OPENAI_API_KEY
 
 general_settings:
-  master_key: sk-1234
+  master_key: os.environ/LITELLM_MASTER_KEY
   database_url: "postgresql://user:password@localhost:5432/litellm"
   
   # Reject requests that contain client-side metadata.tags
diff --git a/litellm/proxy/example_config_yaml/tool_permission_example.yaml b/litellm/proxy/example_config_yaml/tool_permission_example.yaml
index 735b4bb7ed2..d2d9ffac794 100644
--- a/litellm/proxy/example_config_yaml/tool_permission_example.yaml
+++ b/litellm/proxy/example_config_yaml/tool_permission_example.yaml
@@ -29,7 +29,7 @@ guardrails:
 
 # Optional: Configure general settings
 general_settings:
-  master_key: sk-1234
+  master_key: os.environ/LITELLM_MASTER_KEY
   
 # Optional: Add logging configuration
 litellm_settings:
diff --git a/litellm/proxy/fine_tuning_endpoints/endpoints.py b/litellm/proxy/fine_tuning_endpoints/endpoints.py
index a13ad00713d..79602ebee6f 100644
--- a/litellm/proxy/fine_tuning_endpoints/endpoints.py
+++ b/litellm/proxy/fine_tuning_endpoints/endpoints.py
@@ -87,7 +87,7 @@ async def create_fine_tuning_job(
     ```
     curl http://localhost:4000/v1/fine_tuning/jobs \
       -H "Content-Type: application/json" \
-      -H "Authorization: Bearer sk-1234" \
+      -H "Authorization: Bearer $LITELLM_API_KEY" \
       -d '{
         "model": "gpt-3.5-turbo",
         "training_file": "file-abc123",
diff --git a/litellm/proxy/google_endpoints/endpoints.py b/litellm/proxy/google_endpoints/endpoints.py
index 9d39430cfa9..bc18b0fb879 100644
--- a/litellm/proxy/google_endpoints/endpoints.py
+++ b/litellm/proxy/google_endpoints/endpoints.py
@@ -246,7 +246,7 @@ async def create_interaction(
     Example:
     ```bash
     curl -X POST "http://localhost:4000/v1beta/interactions" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H "Content-Type: application/json" \
         -d '{
             "model": "gemini/gemini-2.5-flash",
diff --git a/litellm/proxy/guardrails/guardrail_hooks/generic_guardrail_api/example_config.yaml b/litellm/proxy/guardrails/guardrail_hooks/generic_guardrail_api/example_config.yaml
index a4dae103626..c1e59b9f280 100644
--- a/litellm/proxy/guardrails/guardrail_hooks/generic_guardrail_api/example_config.yaml
+++ b/litellm/proxy/guardrails/guardrail_hooks/generic_guardrail_api/example_config.yaml
@@ -25,7 +25,7 @@ litellm_settings:
 
 # 1. Apply guardrail to a specific request:
 # curl --location 'http://localhost:4000/chat/completions' \
-#   --header 'Authorization: Bearer sk-1234' \
+#   --header "Authorization: Bearer $LITELLM_API_KEY" \
 #   --header 'Content-Type: application/json' \
 #   --data '{
 #     "model": "gpt-4",
@@ -35,7 +35,7 @@ litellm_settings:
 
 # 2. Apply guardrail with dynamic parameters:
 # curl --location 'http://localhost:4000/chat/completions' \
-#   --header 'Authorization: Bearer sk-1234' \
+#   --header "Authorization: Bearer $LITELLM_API_KEY" \
 #   --header 'Content-Type: application/json' \
 #   --data '{
 #     "model": "gpt-4",
diff --git a/litellm/proxy/health_endpoints/_health_endpoints.py b/litellm/proxy/health_endpoints/_health_endpoints.py
index b9964c0e342..3be35a633d1 100644
--- a/litellm/proxy/health_endpoints/_health_endpoints.py
+++ b/litellm/proxy/health_endpoints/_health_endpoints.py
@@ -271,7 +271,7 @@ async def health_services_endpoint(
     Example:
     ```
     curl -L -X GET 'http://0.0.0.0:4000/health/services?service=datadog' \
-    -H 'Authorization: Bearer sk-1234'
+    -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     try:
@@ -2038,7 +2038,7 @@ async def test_model_connection(
     ```bash
     # If model is configured in proxy_config.yaml, you only need to specify the model name:
     curl -X POST 'http://localhost:4000/health/test_connection' \\
-      -H 'Authorization: Bearer sk-1234' \\
+      -H "Authorization: Bearer $LITELLM_API_KEY" \\
       -H 'Content-Type: application/json' \\
       -d '{
         "litellm_params": {
@@ -2051,7 +2051,7 @@ async def test_model_connection(
     
     # You can also override specific params or test with custom credentials:
     curl -X POST 'http://localhost:4000/health/test_connection' \\
-      -H 'Authorization: Bearer sk-1234' \\
+      -H "Authorization: Bearer $LITELLM_API_KEY" \\
       -H 'Content-Type: application/json' \\
       -d '{
         "litellm_params": {
diff --git a/litellm/proxy/hooks/key_management_event_hooks.py b/litellm/proxy/hooks/key_management_event_hooks.py
index cdaa6d5a81c..28723f889b6 100644
--- a/litellm/proxy/hooks/key_management_event_hooks.py
+++ b/litellm/proxy/hooks/key_management_event_hooks.py
@@ -260,7 +260,7 @@ class KeyManagementEventHooks:
 
         Args:
             secret_name: Name of the virtual key
-            secret_token: Value of the virtual key (example: sk-1234)
+            secret_token: Value of the virtual key (example: sk-)
         """
         if litellm._key_management_settings is not None:
             if litellm._key_management_settings.store_virtual_keys is True:
@@ -298,7 +298,7 @@ class KeyManagementEventHooks:
         Args:
             current_secret_name: Current name of the virtual key
             new_secret_name: New name of the virtual key
-            new_secret_value: New value of the virtual key (example: sk-1234)
+            new_secret_value: New value of the virtual key (example: sk-)
             team_id: Optional team ID to get team-specific secret manager settings
         """
         if litellm._key_management_settings is not None:
diff --git a/litellm/proxy/hooks/model_max_budget_limiter.py b/litellm/proxy/hooks/model_max_budget_limiter.py
index efaaab277a9..c9e61d5686b 100644
--- a/litellm/proxy/hooks/model_max_budget_limiter.py
+++ b/litellm/proxy/hooks/model_max_budget_limiter.py
@@ -262,7 +262,7 @@ class _PROXY_VirtualKeyModelMaxBudgetLimiter(RouterBudgetLimiting):
     """
     Handles budgets for model + virtual key
 
-    Example: key=sk-1234567890, model=gpt-4o, max_budget=100, time_period=1d
+    Example: key=sk-, model=gpt-4o, max_budget=100, time_period=1d
     """
 
     def __init__(self, dual_cache: DualCache):
@@ -431,7 +431,7 @@ class _PROXY_VirtualKeyModelMaxBudgetLimiter(RouterBudgetLimiting):
         """
         Track spend for virtual key + model in DualCache
 
-        Example: key=sk-1234567890, model=gpt-4o, max_budget=100, time_period=1d
+        Example: key=sk-, model=gpt-4o, max_budget=100, time_period=1d
         """
         verbose_proxy_logger.debug("in RouterBudgetLimiting.async_log_success_event")
         standard_logging_payload: Final[StandardLoggingPayload | None] = kwargs.get("standard_logging_object", None)
diff --git a/litellm/proxy/image_endpoints/endpoints.py b/litellm/proxy/image_endpoints/endpoints.py
index 3f044855ce8..97a2d3d5da2 100644
--- a/litellm/proxy/image_endpoints/endpoints.py
+++ b/litellm/proxy/image_endpoints/endpoints.py
@@ -253,7 +253,7 @@ async def image_edit_api(
     curl -s -D >(grep -i x-request-id >&2) \
     -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) \
     -X POST "http://localhost:4000/v1/images/edits" \
-    -H "Authorization: Bearer sk-1234" \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
         -F "model=gpt-image-1" \
         -F "image[]=@soap.png" \
         -F 'prompt=Create a studio ghibli image of this'
diff --git a/litellm/proxy/management_endpoints/customer_endpoints.py b/litellm/proxy/management_endpoints/customer_endpoints.py
index d2d87331d55..8088b85fce4 100644
--- a/litellm/proxy/management_endpoints/customer_endpoints.py
+++ b/litellm/proxy/management_endpoints/customer_endpoints.py
@@ -155,7 +155,7 @@ async def block_user(data: BlockUsers):
 
         ```
         curl -X POST "http://0.0.0.0:8000/user/block"
-        -H "Authorization: Bearer sk-1234"
+        -H "Authorization: Bearer $LITELLM_API_KEY"
         -d '{
         "user_ids": [, ...]
         }'
@@ -207,7 +207,7 @@ async def unblock_user(data: BlockUsers):
     Example
     ```
     curl -X POST "http://0.0.0.0:8000/user/unblock"
-    -H "Authorization: Bearer sk-1234"
+    -H "Authorization: Bearer $LITELLM_API_KEY"
     -d '{
     "user_ids": [, ...]
     }'
@@ -358,7 +358,7 @@ async def new_end_user(
     Example curl:
     ```
     curl --location 'http://0.0.0.0:4000/customer/new' \
-        --header 'Authorization: Bearer sk-1234' \
+        --header "Authorization: Bearer $LITELLM_API_KEY" \
         --header 'Content-Type: application/json' \
         --data '{
             "user_id" : "ishaan-jaff-3",
@@ -369,7 +369,7 @@ async def new_end_user(
 
     # With object permissions
     curl -L -X POST 'http://localhost:4000/customer/new' \
-        -H 'Authorization: Bearer sk-1234' \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H 'Content-Type: application/json' \
         -d '{
             "user_id": "user_1",
@@ -513,7 +513,7 @@ async def end_user_info(
     Example curl:
     ```
     curl -X GET 'http://localhost:4000/customer/info?end_user_id=test-litellm-user-4' \
-        -H 'Authorization: Bearer sk-1234'
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     try:
@@ -592,7 +592,7 @@ async def update_end_user(
     Example curl:
     ```
     curl --location 'http://0.0.0.0:4000/customer/update' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "user_id": "test-litellm-user-4",
@@ -601,7 +601,7 @@ async def update_end_user(
 
     # Updating object permissions
     curl -L -X POST 'http://localhost:4000/customer/update' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "user_id": "user_1",
@@ -751,7 +751,7 @@ async def delete_end_user(
     Example curl:
     ```
     curl --location 'http://0.0.0.0:4000/customer/delete' \
-        --header 'Authorization: Bearer sk-1234' \
+        --header "Authorization: Bearer $LITELLM_API_KEY" \
         --header 'Content-Type: application/json' \
         --data '{
             "user_ids" :["ishaan-jaff-5"]
@@ -826,7 +826,7 @@ async def list_end_user(
     Example curl:
     ```
     curl --location --request GET 'http://0.0.0.0:4000/customer/list' \
-        --header 'Authorization: Bearer sk-1234'
+        --header "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     """
diff --git a/litellm/proxy/management_endpoints/internal_user_endpoints.py b/litellm/proxy/management_endpoints/internal_user_endpoints.py
index 10c11119006..04113f43660 100644
--- a/litellm/proxy/management_endpoints/internal_user_endpoints.py
+++ b/litellm/proxy/management_endpoints/internal_user_endpoints.py
@@ -506,7 +506,7 @@ async def new_user(
     ```shell
      curl -X POST "http://localhost:4000/user/new" \
      -H "Content-Type: application/json" \
-     -H "Authorization: Bearer sk-1234" \
+     -H "Authorization: Bearer $LITELLM_API_KEY" \
      -d '{
          "username": "new_user",
          "email": "new_user@example.com"
@@ -912,7 +912,7 @@ async def user_info(
     Example request
     ```
     curl -X GET 'http://localhost:4000/user/info?user_id=krrish7%40berri.ai' \
-    --header 'Authorization: Bearer sk-1234'
+    --header "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import model_max_budget_limiter, prisma_client
@@ -1065,7 +1065,7 @@ async def user_info_v2(
     Example request:
     ```
     curl -X GET 'http://localhost:4000/v2/user/info?user_id=user123' \\
-    --header 'Authorization: Bearer sk-1234'
+    --header "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import model_max_budget_limiter, prisma_client
@@ -1618,7 +1618,7 @@ async def user_update(
 
     ```
     curl --location 'http://0.0.0.0:4000/user/update' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "user_id": "test-litellm-user-4",
@@ -1788,7 +1788,7 @@ async def bulk_user_update(
     Example request for specific users:
     ```bash
     curl --location 'http://0.0.0.0:4000/user/bulk_update' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "users": [
@@ -1809,7 +1809,7 @@ async def bulk_user_update(
     Example request for all users:
     ```bash
     curl --location 'http://0.0.0.0:4000/user/bulk_update' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "all_users": true,
@@ -2322,7 +2322,7 @@ async def delete_user(
     ```
     curl --location 'http://0.0.0.0:4000/user/delete' \
 
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
 
     --header 'Content-Type: application/json' \
 
diff --git a/litellm/proxy/management_endpoints/key_management_endpoints.py b/litellm/proxy/management_endpoints/key_management_endpoints.py
index db4467dda5b..e81a0c5806a 100644
--- a/litellm/proxy/management_endpoints/key_management_endpoints.py
+++ b/litellm/proxy/management_endpoints/key_management_endpoints.py
@@ -1807,7 +1807,7 @@ async def generate_key_fn(
 
     ```bash
     curl --location 'http://0.0.0.0:4000/key/generate' \
-        --header 'Authorization: Bearer sk-1234' \
+        --header "Authorization: Bearer $LITELLM_API_KEY" \
         --header 'Content-Type: application/json' \
         --data '{
             "permissions": {"allow_pii_controls": true}
@@ -2003,7 +2003,7 @@ async def generate_service_account_key_fn(
 
     ```bash
     curl --location 'http://0.0.0.0:4000/key/generate' \
-        --header 'Authorization: Bearer sk-1234' \
+        --header "Authorization: Bearer $LITELLM_API_KEY" \
         --header 'Content-Type: application/json' \
         --data '{
             "permissions": {"allow_pii_controls": true}
@@ -3015,10 +3015,10 @@ async def update_key_fn(
     Example:
     ```bash
     curl --location 'http://0.0.0.0:4000/key/update' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
-        "key": "sk-1234",
+        "key": "sk-",
         "key_alias": "my-key",
         "user_id": "user-1234",
         "team_id": "team-1234",
@@ -3224,12 +3224,12 @@ async def bulk_update_keys(
     Example request:
     ```bash
     curl --location 'http://0.0.0.0:4000/key/bulk_update' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "keys": [
             {
-                "key": "sk-1234",
+                "key": "sk-",
                 "max_budget": 100.0,
                 "team_id": "team-123",
                 "tags": ["production", "api"]
@@ -3662,7 +3662,7 @@ async def delete_key_fn(
     Example:
     ```bash
     curl --location 'http://0.0.0.0:4000/key/delete' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "keys": ["sk-QWrxEynunsNpV1zT48HIrw"]
@@ -3841,7 +3841,7 @@ async def info_key_fn_v2(
     Example Curl:
     ```
     curl -X GET "http://0.0.0.0:4000/key/info" \
-    -H "Authorization: Bearer sk-1234" \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
     -d {"keys": ["sk-1", "sk-2", "sk-3"]}
     ```
     """
@@ -3967,7 +3967,7 @@ async def info_key_fn(
     Example Curl:
     ```
     curl -X GET "http://0.0.0.0:4000/key/info?key=d5345c0ecc68ae6295c69f91926b2bd379e25481a40c34b5884d157a9f65d8fa" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Example Curl - if no key is passed, it will use the Key Passed in Authorization Header
@@ -5242,8 +5242,8 @@ async def regenerate_key_fn(
 
     Example:
     ```bash
-    curl --location --request POST 'http://localhost:4000/key/sk-1234/regenerate' \
-    --header 'Authorization: Bearer sk-1234' \
+    curl --location --request POST 'http://localhost:4000/key/sk-/regenerate' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data-raw '{
         "max_budget": 100,
@@ -6739,7 +6739,7 @@ async def block_key(
      Example:
     ```bash
     curl --location 'http://0.0.0.0:4000/key/block' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "key": "sk-Fn8Ej39NxjAXrvpUGKghGw"
@@ -6853,7 +6853,7 @@ async def unblock_key(
     Example:
     ```bash
     curl --location 'http://0.0.0.0:4000/key/unblock' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "key": "sk-Fn8Ej39NxjAXrvpUGKghGw"
@@ -6970,7 +6970,7 @@ async def key_health(
 
     ```bash
     curl -X POST "http://localhost:4000/key/health" \
-     -H "Authorization: Bearer sk-1234" \
+     -H "Authorization: Bearer $LITELLM_API_KEY" \
      -H "Content-Type: application/json"
     ```
 
diff --git a/litellm/proxy/management_endpoints/management_v1/budgets.py b/litellm/proxy/management_endpoints/management_v1/budgets.py
index cc2fefc426f..b01f6f8681d 100644
--- a/litellm/proxy/management_endpoints/management_v1/budgets.py
+++ b/litellm/proxy/management_endpoints/management_v1/budgets.py
@@ -164,7 +164,7 @@ async def list_budgets(
     Example curl:
     ```
     curl --location --globoff 'http://0.0.0.0:4000/management/v1/budgets?sort=-max_budget&filter[budget_duration][in]=7d,30d&page_size=25' \
-        --header 'Authorization: Bearer sk-1234'
+        --header "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     try:
diff --git a/litellm/proxy/management_endpoints/management_v1/spend_logs.py b/litellm/proxy/management_endpoints/management_v1/spend_logs.py
index f6907a7f87a..e2f21a13413 100644
--- a/litellm/proxy/management_endpoints/management_v1/spend_logs.py
+++ b/litellm/proxy/management_endpoints/management_v1/spend_logs.py
@@ -205,7 +205,7 @@ async def list_spend_log_end_users(
     Example curl:
     ```
     curl --location --globoff 'http://0.0.0.0:4000/management/v1/spend_logs/end_users?filter[startTime][gte]=2026-07-23T00:00:00Z&filter[startTime][lte]=2026-07-24T00:00:00Z&page_size=50&q=acme' \
-        --header 'Authorization: Bearer sk-1234'
+        --header "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     return await _list_spend_log_facet(
diff --git a/litellm/proxy/management_endpoints/model_access_group_management_endpoints.py b/litellm/proxy/management_endpoints/model_access_group_management_endpoints.py
index a48130a4f22..1b776ec7f7b 100644
--- a/litellm/proxy/management_endpoints/model_access_group_management_endpoints.py
+++ b/litellm/proxy/management_endpoints/model_access_group_management_endpoints.py
@@ -589,7 +589,7 @@ async def create_model_group(
     Example:
     ```bash
     curl -X POST 'http://localhost:4000/access_group/new' \\
-      -H 'Authorization: Bearer sk-1234' \\
+      -H "Authorization: Bearer $LITELLM_API_KEY" \\
       -H 'Content-Type: application/json' \\
       -d '{
         "access_group": "production-models",
@@ -734,7 +734,7 @@ async def list_access_groups(
     Example:
     ```bash
     curl -X GET 'http://localhost:4000/access_group/list' \\
-      -H 'Authorization: Bearer sk-1234'
+      -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     
     Returns:
@@ -782,7 +782,7 @@ async def get_access_group_info(
     Example:
     ```bash
     curl -X GET 'http://localhost:4000/access_group/production-models/info' \\
-      -H 'Authorization: Bearer sk-1234'
+      -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     
     Parameters:
@@ -846,7 +846,7 @@ async def update_access_group(
     Example:
     ```bash
     curl -X PUT 'http://localhost:4000/access_group/production-models/update' \\
-      -H 'Authorization: Bearer sk-1234' \\
+      -H "Authorization: Bearer $LITELLM_API_KEY" \\
       -H 'Content-Type: application/json' \\
       -d '{
         "model_names": ["gpt-4", "claude-3-sonnet"]
@@ -998,7 +998,7 @@ async def delete_access_group(
     Example:
     ```bash
     curl -X DELETE 'http://localhost:4000/access_group/production-models/delete' \\
-      -H 'Authorization: Bearer sk-1234'
+      -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     
     Parameters:
@@ -1104,7 +1104,7 @@ async def get_access_group_budget(
     Example:
     ```bash
     curl -X GET 'http://localhost:4000/access_group/production-models/budget' \\
-      -H 'Authorization: Bearer sk-1234'
+      -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Parameters:
@@ -1144,7 +1144,7 @@ async def set_access_group_budget(
     Example:
     ```bash
     curl -X PUT 'http://localhost:4000/access_group/production-models/budget' \\
-      -H 'Authorization: Bearer sk-1234' \\
+      -H "Authorization: Bearer $LITELLM_API_KEY" \\
       -H 'Content-Type: application/json' \\
       -d '{
         "max_budget": 100.0,
@@ -1218,7 +1218,7 @@ async def delete_access_group_budget(
     Example:
     ```bash
     curl -X DELETE 'http://localhost:4000/access_group/production-models/budget' \\
-      -H 'Authorization: Bearer sk-1234'
+      -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Parameters:
diff --git a/litellm/proxy/management_endpoints/organization_endpoints.py b/litellm/proxy/management_endpoints/organization_endpoints.py
index 96e946424bd..759333e1b9c 100644
--- a/litellm/proxy/management_endpoints/organization_endpoints.py
+++ b/litellm/proxy/management_endpoints/organization_endpoints.py
@@ -380,7 +380,7 @@ async def new_organization(
     ```bash
     curl --location 'http://0.0.0.0:4000/organization/new' \
 
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
 
     --header 'Content-Type: application/json' \
 
@@ -398,7 +398,7 @@ async def new_organization(
     ```bash
     curl --location 'http://0.0.0.0:4000/organization/new' \
 
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
 
     --header 'Content-Type: application/json' \
 
@@ -1025,13 +1025,13 @@ async def list_organization(
     Example:
     ```
     curl --location --request GET 'http://0.0.0.0:4000/organization/list?org_alias=my-org' \
-        --header 'Authorization: Bearer sk-1234'
+        --header "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     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'
+        --header "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import prisma_client
@@ -1225,7 +1225,7 @@ async def organization_member_add(
     Example:
     ```
     curl -X POST 'http://0.0.0.0:4000/organization/member_add' \
-    -H 'Authorization: Bearer sk-1234' \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
     -H 'Content-Type: application/json' \
     -d '{
         "organization_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849",
diff --git a/litellm/proxy/management_endpoints/team_callback_endpoints.py b/litellm/proxy/management_endpoints/team_callback_endpoints.py
index 1932e89717b..65dd64b3a74 100644
--- a/litellm/proxy/management_endpoints/team_callback_endpoints.py
+++ b/litellm/proxy/management_endpoints/team_callback_endpoints.py
@@ -295,7 +295,7 @@ async def add_team_callbacks(
     ```
     curl -X POST 'http:/localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' \
         -H 'Content-Type: application/json' \
-        -H 'Authorization: Bearer sk-1234' \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -d '{
         "callback_name": "langfuse",
         "callback_type": "success",
@@ -467,7 +467,7 @@ async def delete_team_callback(
     Example curl:
     ```
     curl -X DELETE 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback/langsmith' \
-        -H 'Authorization: Bearer sk-1234'
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Covers callbacks registered through POST /team/{team_id}/callback and the Admin UI. Teams still
@@ -603,7 +603,7 @@ async def disable_team_logging(
     Example curl:
     ```
     curl -X POST 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/disable_logging' \
-        -H 'Authorization: Bearer sk-1234'
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
 
@@ -735,7 +735,7 @@ async def get_team_callbacks(
     Example curl:
     ```
     curl -X GET 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' \
-        -H 'Authorization: Bearer sk-1234'
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     This will return the callback settings for the team with id dbe2f686-a686-4896-864a-4c3924458709
diff --git a/litellm/proxy/management_endpoints/team_endpoints.py b/litellm/proxy/management_endpoints/team_endpoints.py
index e9e37540dd8..598f3ee296a 100644
--- a/litellm/proxy/management_endpoints/team_endpoints.py
+++ b/litellm/proxy/management_endpoints/team_endpoints.py
@@ -1256,7 +1256,7 @@ async def new_team(
     Example Request:
     ```
     curl --location 'http://0.0.0.0:4000/team/new' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
       "team_alias": "my-new-team_2",
@@ -1268,7 +1268,7 @@ async def new_team(
 
      ```
     curl --location 'http://0.0.0.0:4000/team/new' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
                 "team_alias": "QA Prod Bot",
@@ -1962,7 +1962,7 @@ async def update_team(
 
     ```
     curl --location 'http://0.0.0.0:4000/team/update' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data-raw '{
         "team_id": "8d916b1c-510d-4894-a334-1c16a93344f5",
@@ -1973,7 +1973,7 @@ async def update_team(
     Example - Update Team `max_budget` budget
     ```
     curl --location 'http://0.0.0.0:4000/team/update' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data-raw '{
         "team_id": "8d916b1c-510d-4894-a334-1c16a93344f5",
@@ -2357,7 +2357,7 @@ async def patch_team(
 
     ```
     curl --location --request PATCH 'http://0.0.0.0:4000/team/8d916b1c-510d-4894-a334-1c16a93344f5' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data-raw '{
         "metadata": {"cost_center": "1234", "deprecated_key": null}
@@ -3091,7 +3091,7 @@ async def team_member_add(
     ```
 
     curl -X POST 'http://0.0.0.0:4000/team/member_add' \
-    -H 'Authorization: Bearer sk-1234' \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
     -H 'Content-Type: application/json' \
     -d '{"team_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", "member": {"role": "user", "user_id": "krrish247652@berri.ai"}}'
 
@@ -3254,7 +3254,7 @@ async def team_member_delete(
     ```
     curl -X POST 'http://0.0.0.0:8000/team/member_delete' \
 
-    -H 'Authorization: Bearer sk-1234' \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
 
     -H 'Content-Type: application/json' \
 
@@ -3776,7 +3776,7 @@ async def bulk_team_member_add(
     Example request:
     ```bash
     curl --location 'http://0.0.0.0:4000/team/bulk_member_add' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "team_id": "team-1234",
@@ -3909,7 +3909,7 @@ async def delete_team(
 
     ```
     curl --location 'http://0.0.0.0:4000/team/delete' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data-raw '{
         "team_ids": ["8d916b1c-510d-4894-a334-1c16a93344f5"]
@@ -4630,7 +4630,7 @@ async def block_team(
     Example:
     ```
     curl --location 'http://0.0.0.0:4000/team/block' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "team_id": "team-1234"
@@ -4685,7 +4685,7 @@ async def unblock_team(
     Example:
     ```
     curl --location 'http://0.0.0.0:4000/team/unblock' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "team_id": "team-1234"
@@ -5324,7 +5324,7 @@ async def list_team(
     """
     ```
     curl --location --request GET 'http://0.0.0.0:4000/team/list' \
-        --header 'Authorization: Bearer sk-1234'
+        --header "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Parameters:
@@ -5528,7 +5528,7 @@ async def team_model_add(
     Example Request:
     ```
     curl --location 'http://0.0.0.0:4000/team/model/add' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "team_id": "team-1234",
@@ -5633,7 +5633,7 @@ async def team_model_delete(
     Example Request:
     ```
     curl --location 'http://0.0.0.0:4000/team/model/delete' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --header 'Content-Type: application/json' \
     --data '{
         "team_id": "team-1234",
diff --git a/litellm/proxy/ocr_endpoints/endpoints.py b/litellm/proxy/ocr_endpoints/endpoints.py
index ebf4d988fdd..e7f2286cbe5 100644
--- a/litellm/proxy/ocr_endpoints/endpoints.py
+++ b/litellm/proxy/ocr_endpoints/endpoints.py
@@ -274,7 +274,7 @@ async def ocr(
     **1. JSON body** (Mistral OCR API compatible):
     ```bash
     curl -X POST "http://localhost:4000/v1/ocr" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H "Content-Type: application/json" \
         -d '{
             "model": "mistral-ocr",
@@ -288,7 +288,7 @@ async def ocr(
     **2. Multipart form file upload**:
     ```bash
     curl -X POST "http://localhost:4000/v1/ocr" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -F "model=mistral-ocr" \
         -F "file=@document.pdf"
     ```
diff --git a/litellm/proxy/openai_files_endpoints/files_endpoints.py b/litellm/proxy/openai_files_endpoints/files_endpoints.py
index c315d30b8f3..2d7f1328731 100644
--- a/litellm/proxy/openai_files_endpoints/files_endpoints.py
+++ b/litellm/proxy/openai_files_endpoints/files_endpoints.py
@@ -389,7 +389,7 @@ async def create_file(
     Example Curl
     ```
     curl http://localhost:4000/v1/files \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -F purpose="batch" \
         -F file="@mydata.jsonl"
         -F expires_after[anchor]="created_at" \
@@ -766,7 +766,7 @@ async def get_file_content(
     Example Curl
     ```
     curl http://localhost:4000/v1/files/file-abc123/content \
-        -H "Authorization: Bearer sk-1234"
+        -H "Authorization: Bearer $LITELLM_API_KEY"
 
     ```
     """
@@ -1071,7 +1071,7 @@ async def get_file(
     Example Curl
     ```
     curl http://localhost:4000/v1/files/file-abc123 \
-        -H "Authorization: Bearer sk-1234"
+        -H "Authorization: Bearer $LITELLM_API_KEY"
 
     ```
     """
@@ -1480,7 +1480,7 @@ async def list_files(
     Example Curl
     ```
     curl http://localhost:4000/v1/files\
-        -H "Authorization: Bearer sk-1234"
+        -H "Authorization: Bearer $LITELLM_API_KEY"
 
     ```
     """
diff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yaml
index a094eb84bf3..50e5ae15b99 100644
--- a/litellm/proxy/proxy_config.yaml
+++ b/litellm/proxy/proxy_config.yaml
@@ -49,7 +49,7 @@ mcp_servers:
 
 # General Settings
 general_settings:
-  master_key: sk-1234
+  master_key: os.environ/LITELLM_MASTER_KEY
   store_model_in_db: false
 
 # LiteLLM Settings
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py
index 606a590c24b..f5a060152c9 100644
--- a/litellm/proxy/proxy_server.py
+++ b/litellm/proxy/proxy_server.py
@@ -10981,7 +10981,7 @@ async def chat_completion(
 
     -H "Content-Type: application/json" \
 
-    -H "Authorization: Bearer sk-1234" \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
 
     -d '{
         "model": "gpt-4o",
@@ -11145,7 +11145,7 @@ async def completion(
 
     -H "Content-Type: application/json" \
 
-    -H "Authorization: Bearer sk-1234" \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
 
     -d '{
         "model": "gpt-3.5-turbo-instruct",
@@ -11325,7 +11325,7 @@ async def embeddings(
 
     -H "Content-Type: application/json" \
 
-    -H "Authorization: Bearer sk-1234" \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
 
     -d '{
         "model": "text-embedding-ada-002",
@@ -11433,7 +11433,7 @@ async def moderations(
     ```
     curl --location 'http://0.0.0.0:4000/moderations' \
     --header 'Content-Type: application/json' \
-    --header 'Authorization: Bearer sk-1234' \
+    --header "Authorization: Bearer $LITELLM_API_KEY" \
     --data '{"input": "Sample text goes here", "model": "text-moderation-stable"}'
     ```
     """
@@ -13083,7 +13083,7 @@ async def supported_openai_params(model: str):
     Example curl:
     ```
     curl -X GET --location 'http://localhost:4000/utils/supported_openai_params?model=gpt-3.5-turbo-16k' \
-        --header 'Authorization: Bearer sk-1234'
+        --header "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.litellm_core_utils.get_llm_provider_logic import declared_authenticating_provider
@@ -14321,7 +14321,7 @@ async def model_info_v2(
     Example request:
     ```
     curl -X GET 'http://localhost:4000/v2/model/info?include_team_models=true&page=1&size=50' \\
-    --header 'Authorization: Bearer sk-1234'
+    --header "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Example response:
@@ -15289,7 +15289,7 @@ async def model_deprecations(
     Example:
     ```shell
     curl -X GET 'http://localhost:4000/model/deprecations' \\
-        -H 'Authorization: Bearer sk-1234'
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     return collect_model_deprecations(llm_router=llm_router, warn_within_days=warn_within_days)
@@ -15351,7 +15351,7 @@ async def model_group_info(
     curl -X 'GET' \
     'http://localhost:4000/model_group/info' \
     -H 'accept: application/json' \
-    -H 'x-api-key: sk-1234'
+    -H "x-api-key: $LITELLM_API_KEY"
     ```
 
     Example Request (Specific Model Group):
@@ -15359,7 +15359,7 @@ async def model_group_info(
     curl -X 'GET' \
     'http://localhost:4000/model_group/info?model_group=rerank-english-v3.0' \
     -H 'accept: application/json' \
-    -H 'Authorization: Bearer sk-1234'
+    -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Example Request (Specific Wildcard Model Group): (e.g. `model_name: openai/*` on config.yaml)
@@ -15367,7 +15367,7 @@ async def model_group_info(
     curl -X 'GET' \
     'http://localhost:4000/model_group/info?model_group=openai/tts-1'
     -H 'accept: application/json' \
-    -H 'Authorization: Bearersk-1234'
+    -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Learn how to use and set wildcard models [here](https://docs.litellm.ai/docs/wildcard_routing)
diff --git a/litellm/proxy/rag_endpoints/endpoints.py b/litellm/proxy/rag_endpoints/endpoints.py
index d6a402e1860..4e64d28b4c8 100644
--- a/litellm/proxy/rag_endpoints/endpoints.py
+++ b/litellm/proxy/rag_endpoints/endpoints.py
@@ -489,7 +489,7 @@ async def rag_ingest(
     ## Form upload (for files):
     ```bash
     curl -X POST "http://localhost:4000/v1/rag/ingest" \\
-        -H "Authorization: Bearer sk-1234" \\
+        -H "Authorization: Bearer $LITELLM_API_KEY" \\
         -F file="@document.pdf" \\
         -F 'ingest_options={"vector_store": {"custom_llm_provider": "openai"}}'
     ```
@@ -497,7 +497,7 @@ async def rag_ingest(
     ## JSON body (for URLs):
     ```bash
     curl -X POST "http://localhost:4000/v1/rag/ingest" \\
-        -H "Authorization: Bearer sk-1234" \\
+        -H "Authorization: Bearer $LITELLM_API_KEY" \\
         -H "Content-Type: application/json" \\
         -d '{
             "file_url": "https://example.com/document.pdf",
@@ -508,7 +508,7 @@ async def rag_ingest(
     ## Bedrock:
     ```bash
     curl -X POST "http://localhost:4000/v1/rag/ingest" \\
-        -H "Authorization: Bearer sk-1234" \\
+        -H "Authorization: Bearer $LITELLM_API_KEY" \\
         -F file="@document.pdf" \\
         -F 'ingest_options={"vector_store": {"custom_llm_provider": "bedrock"}}'
     ```
@@ -641,7 +641,7 @@ async def rag_query(
     ## Example Request:
     ```bash
     curl -X POST "http://localhost:4000/v1/rag/query" \\
-        -H "Authorization: Bearer sk-1234" \\
+        -H "Authorization: Bearer $LITELLM_API_KEY" \\
         -H "Content-Type: application/json" \\
         -d '{
             "model": "gpt-4o-mini",
@@ -657,7 +657,7 @@ async def rag_query(
     ## With Reranking:
     ```bash
     curl -X POST "http://localhost:4000/v1/rag/query" \\
-        -H "Authorization: Bearer sk-1234" \\
+        -H "Authorization: Bearer $LITELLM_API_KEY" \\
         -H "Content-Type: application/json" \\
         -d '{
             "model": "gpt-4o-mini",
diff --git a/litellm/proxy/response_api_endpoints/endpoints.py b/litellm/proxy/response_api_endpoints/endpoints.py
index 5907ffc64eb..048e0326a6d 100644
--- a/litellm/proxy/response_api_endpoints/endpoints.py
+++ b/litellm/proxy/response_api_endpoints/endpoints.py
@@ -207,7 +207,7 @@ async def responses_api(
     # Normal request
     curl -X POST http://localhost:4000/v1/responses \
     -H "Content-Type: application/json" \
-    -H "Authorization: Bearer sk-1234" \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
     -d '{
         "model": "gpt-4o",
         "input": "Tell me about AI"
@@ -216,7 +216,7 @@ async def responses_api(
     # Background request with polling
     curl -X POST http://localhost:4000/v1/responses \
     -H "Content-Type: application/json" \
-    -H "Authorization: Bearer sk-1234" \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
     -d '{
         "model": "gpt-4o",
         "input": "Tell me about AI",
@@ -498,7 +498,7 @@ async def cursor_chat_completions(
     ```bash
     curl -X POST http://localhost:4000/cursor/chat/completions \
     -H "Content-Type: application/json" \
-    -H "Authorization: Bearer sk-1234" \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
     -d '{
         "model": "gpt-4o",
         "input": [{"role": "user", "content": "Hello"}]
@@ -690,11 +690,11 @@ async def get_response(
     ```bash
     # Get polling response
     curl -X GET http://localhost:4000/v1/responses/litellm_poll_abc123 \
-    -H "Authorization: Bearer sk-1234"
+    -H "Authorization: Bearer $LITELLM_API_KEY"
     
     # Get provider response
     curl -X GET http://localhost:4000/v1/responses/resp_abc123 \
-    -H "Authorization: Bearer sk-1234"
+    -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import (
@@ -802,7 +802,7 @@ async def delete_response(
     
     ```bash
     curl -X DELETE http://localhost:4000/v1/responses/resp_abc123 \
-    -H "Authorization: Bearer sk-1234"
+    -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import (
@@ -974,7 +974,7 @@ async def compact_response(
     ```bash
     curl -X POST http://localhost:4000/v1/responses/compact \
     -H "Content-Type: application/json" \
-    -H "Authorization: Bearer sk-1234" \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
     -d '{
         "model": "gpt-4o",
         "input": [{"role": "user", "content": "Hello"}]
@@ -1126,7 +1126,7 @@ async def responses_input_tokens(
     ```bash
     curl -X POST http://localhost:4000/v1/responses/input_tokens \
     -H "Content-Type: application/json" \
-    -H "Authorization: Bearer sk-1234" \
+    -H "Authorization: Bearer $LITELLM_API_KEY" \
     -d '{
         "model": "gpt-4o",
         "input": "Hello, how are you?"
@@ -1205,11 +1205,11 @@ async def cancel_response(
     ```bash
     # Cancel polling response
     curl -X POST http://localhost:4000/v1/responses/litellm_poll_abc123/cancel \
-    -H "Authorization: Bearer sk-1234"
+    -H "Authorization: Bearer $LITELLM_API_KEY"
     
     # Cancel provider response
     curl -X POST http://localhost:4000/v1/responses/resp_abc123/cancel \
-    -H "Authorization: Bearer sk-1234"
+    -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import (
diff --git a/litellm/proxy/search_endpoints/endpoints.py b/litellm/proxy/search_endpoints/endpoints.py
index 2676682c59d..5d255d7765d 100644
--- a/litellm/proxy/search_endpoints/endpoints.py
+++ b/litellm/proxy/search_endpoints/endpoints.py
@@ -57,7 +57,7 @@ async def search(
     Example with search_tool_name in URL (recommended - keeps body Perplexity-compatible):
     ```bash
     curl -X POST "http://localhost:4000/v1/search/litellm-search" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H "Content-Type: application/json" \
         -d '{
             "query": "latest AI developments 2024",
@@ -70,7 +70,7 @@ async def search(
     Example with search_tool_name in body:
     ```bash
     curl -X POST "http://localhost:4000/v1/search" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H "Content-Type: application/json" \
         -d '{
             "search_tool_name": "litellm-search",
@@ -264,7 +264,7 @@ async def list_search_tools(
     Example:
     ```bash
     curl -X GET "http://localhost:4000/v1/search/tools" \
-        -H "Authorization: Bearer sk-1234"
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     
     Response:
diff --git a/litellm/proxy/spend_tracking/spend_management_endpoints.py b/litellm/proxy/spend_tracking/spend_management_endpoints.py
index 8cfb6354dd0..b907f479744 100644
--- a/litellm/proxy/spend_tracking/spend_management_endpoints.py
+++ b/litellm/proxy/spend_tracking/spend_management_endpoints.py
@@ -375,7 +375,7 @@ async def spend_key_fn(
     Example Request:
     ```
     curl -X GET "http://0.0.0.0:8000/spend/keys" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
 
@@ -443,13 +443,13 @@ async def spend_user_fn(
     Example Request:
     ```
     curl -X GET "http://0.0.0.0:8000/spend/users" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     View User Table row for user_id
     ```
     curl -X GET "http://0.0.0.0:8000/spend/users?user_id=1234" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import prisma_client
@@ -514,13 +514,13 @@ async def view_spend_tags(
     Example Request:
     ```
     curl -X GET "http://0.0.0.0:8000/spend/tags" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Spend with Start Date and End Date
     ```
     curl -X GET "http://0.0.0.0:8000/spend/tags?start_date=2022-01-01&end_date=2022-02-01" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
 
@@ -2018,13 +2018,13 @@ async def global_view_spend_tags(
     Example Request:
     ```
     curl -X GET "http://0.0.0.0:4000/spend/tags" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Spend with Start Date and End Date
     ```
     curl -X GET "http://0.0.0.0:4000/spend/tags?start_date=2022-01-01&end_date=2022-02-01" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     import traceback
@@ -2168,7 +2168,7 @@ async def calculate_spend(request: SpendCalculateRequest):
 
     ```
     curl --location 'http://localhost:4000/spend/calculate'
-    --header 'Authorization: Bearer sk-1234'
+    --header "Authorization: Bearer $LITELLM_API_KEY"
     --header 'Content-Type: application/json'
     --data '{
         "model": "anthropic.claude-v2",
@@ -2180,7 +2180,7 @@ async def calculate_spend(request: SpendCalculateRequest):
 
     ```
     curl --location 'http://localhost:4000/spend/calculate'
-    --header 'Authorization: Bearer sk-1234'
+    --header "Authorization: Bearer $LITELLM_API_KEY"
     --header 'Content-Type: application/json'
     --data '{
         "completion_response": {
@@ -2433,7 +2433,7 @@ async def ui_view_spend_logs(
     Example:
     ```
     curl -X GET "http://0.0.0.0:8000/spend/logs/v2?start_date=2025-11-25%2000:00:00&end_date=2025-11-26%2023:59:59&page=1&page_size=50" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import prisma_client
@@ -3319,31 +3319,31 @@ async def view_spend_logs(
     Example Request for all logs
     ```
     curl -X GET "http://0.0.0.0:8000/spend/logs" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Example Request for specific request_id
     ```
     curl -X GET "http://0.0.0.0:8000/spend/logs?request_id=chatcmpl-6dcb2540-d3d7-4e49-bb27-291f863f112e" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Example Request for specific api_key
     ```
     curl -X GET "http://0.0.0.0:8000/spend/logs?api_key=d5345c0ecc68ae6295c69f91926b2bd379e25481a40c34b5884d157a9f65d8fa" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Example Request for specific user_id
     ```
     curl -X GET "http://0.0.0.0:8000/spend/logs?user_id=ishaan@berri.ai" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Example Request for date range with individual logs (unsummarized)
     ```
     curl -X GET "http://0.0.0.0:8000/spend/logs?start_date=2024-01-01&end_date=2024-01-02&summarize=false" \
--H "Authorization: Bearer sk-1234"
+-H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import prisma_client
@@ -4119,7 +4119,7 @@ async def provider_budgets() -> ProviderBudgetResponse:
     ```bash
     curl -X GET http://localhost:4000/provider/budgets \
     -H "Content-Type: application/json" \
-    -H "Authorization: Bearer sk-1234"
+    -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
 
     Example Response
diff --git a/litellm/proxy/vector_store_endpoints/endpoints.py b/litellm/proxy/vector_store_endpoints/endpoints.py
index 1feda0b0bb5..d8b9154af55 100644
--- a/litellm/proxy/vector_store_endpoints/endpoints.py
+++ b/litellm/proxy/vector_store_endpoints/endpoints.py
@@ -561,7 +561,7 @@ async def index_create(
     ```bash
     curl -L -X POST 'http://0.0.0.0:4000/v1/indexes' \
         -H 'Content-Type: application/json' \
-        -H 'Authorization: Bearer sk-1234' \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -d '{
             "index_name": "dall-e-3",
             "litellm_params": {
@@ -622,7 +622,7 @@ async def index_list(
 
     ```bash
     curl -L -X GET 'http://0.0.0.0:4000/v1/indexes' \
-        -H 'Authorization: Bearer sk-1234'
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import prisma_client
diff --git a/litellm/proxy/video_endpoints/endpoints.py b/litellm/proxy/video_endpoints/endpoints.py
index 66071c05b4f..ec6ca0390a3 100644
--- a/litellm/proxy/video_endpoints/endpoints.py
+++ b/litellm/proxy/video_endpoints/endpoints.py
@@ -57,7 +57,7 @@ async def video_generation(
     Example:
     ```bash
     curl -X POST "http://localhost:4000/v1/videos" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H "Content-Type: application/json" \
         -d '{
             "model": "sora-2",
@@ -142,7 +142,7 @@ async def video_list(
     Example:
     ```bash
     curl -X GET "http://localhost:4000/v1/videos" \
-        -H "Authorization: Bearer sk-1234"
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import (
@@ -228,7 +228,7 @@ async def video_status(
     Example:
     ```bash
     curl -X GET "http://localhost:4000/v1/videos/video_123" \
-        -H "Authorization: Bearer sk-1234"
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import (
@@ -326,7 +326,7 @@ async def video_content(
     Example:
     ```bash
     curl -X GET "http://localhost:4000/v1/videos/{video_id}/content" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         --output video.mp4
     ```
     """
@@ -431,7 +431,7 @@ async def video_remix(
     Example:
     ```bash
     curl -X POST "http://localhost:4000/v1/videos/video_123/remix" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H "Content-Type: application/json" \
         -d '{
             "prompt": "A new version with different colors"
@@ -533,7 +533,7 @@ async def video_create_character(
     Example:
     ```bash
     curl -X POST "http://localhost:4000/v1/videos/characters" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -F "video=@character_video.mp4" \
         -F "name=my_character"
     ```
@@ -635,7 +635,7 @@ async def video_get_character(
     Example:
     ```bash
     curl -X GET "http://localhost:4000/v1/videos/characters/char_123" \
-        -H "Authorization: Bearer sk-1234"
+        -H "Authorization: Bearer $LITELLM_API_KEY"
     ```
     """
     from litellm.proxy.proxy_server import (
@@ -740,7 +740,7 @@ async def video_edit(
     Example:
     ```bash
     curl -X POST "http://localhost:4000/v1/videos/edits" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H "Content-Type: application/json" \
         -d '{"prompt": "Make it brighter", "video": {"id": "video_123"}}'
     ```
@@ -842,7 +842,7 @@ async def video_extension(
     Example:
     ```bash
     curl -X POST "http://localhost:4000/v1/videos/extensions" \
-        -H "Authorization: Bearer sk-1234" \
+        -H "Authorization: Bearer $LITELLM_API_KEY" \
         -H "Content-Type: application/json" \
         -d '{"prompt": "Continue the scene", "seconds": "5", "video": {"id": "video_123"}}'
     ```
diff --git a/litellm/proxy/wildcard_config.yaml b/litellm/proxy/wildcard_config.yaml
index 7c178690836..9ded21d6560 100644
--- a/litellm/proxy/wildcard_config.yaml
+++ b/litellm/proxy/wildcard_config.yaml
@@ -45,7 +45,7 @@ model_list:
       api_key: os.environ/OPENAI_API_KEY
 
 general_settings:
-  master_key: sk-1234
+  master_key: os.environ/LITELLM_MASTER_KEY
 
 litellm_settings:
   drop_params: True
diff --git a/litellm/proxy/workflows/README.md b/litellm/proxy/workflows/README.md
index f452066afb0..aec704e8869 100644
--- a/litellm/proxy/workflows/README.md
+++ b/litellm/proxy/workflows/README.md
@@ -48,7 +48,7 @@ GET    /v1/workflows/runs/{run_id}/messages  Conversation history (ordered by se
 ```bash
 # Create a run
 curl -X POST http://localhost:4000/v1/workflows/runs \
-  -H "Authorization: Bearer sk-1234" \
+  -H "Authorization: Bearer $LITELLM_API_KEY" \
   -H "Content-Type: application/json" \
   -d '{"workflow_type": "shin-builder", "metadata": {"title": "Fix login bug"}}'
 
@@ -56,19 +56,19 @@ curl -X POST http://localhost:4000/v1/workflows/runs \
 
 # Mark step started (sets status → running)
 curl -X POST http://localhost:4000/v1/workflows/runs/abc-123/events \
-  -H "Authorization: Bearer sk-1234" \
+  -H "Authorization: Bearer $LITELLM_API_KEY" \
   -H "Content-Type: application/json" \
   -d '{"event_type": "step.started", "step_name": "grill", "data": {"claude_session_id": "sess-789"}}'
 
 # Store a conversation message
 curl -X POST http://localhost:4000/v1/workflows/runs/abc-123/messages \
-  -H "Authorization: Bearer sk-1234" \
+  -H "Authorization: Bearer $LITELLM_API_KEY" \
   -H "Content-Type: application/json" \
   -d '{"role": "user", "content": "What is the expected behavior?", "session_id": "sess-789"}'
 
 # Restart recovery: fetch active runs and resume from last event's data.claude_session_id
 curl "http://localhost:4000/v1/workflows/runs?status=running,paused&workflow_type=shin-builder" \
-  -H "Authorization: Bearer sk-1234"
+  -H "Authorization: Bearer $LITELLM_API_KEY"
 ```
 
 ## Status Auto-Update Rules
diff --git a/proxy_server_config.yaml b/proxy_server_config.yaml
index 73990153227..9d039ecb97f 100644
--- a/proxy_server_config.yaml
+++ b/proxy_server_config.yaml
@@ -221,7 +221,7 @@ router_settings:
   model_group_alias: {"my-special-fake-model-alias-name": "fake-openai-endpoint-3"} 
 
 general_settings: 
-  master_key: sk-1234 # [OPTIONAL] Use to enforce auth on proxy. See - https://docs.litellm.ai/docs/proxy/virtual_keys
+  master_key: os.environ/LITELLM_MASTER_KEY # [OPTIONAL] Use to enforce auth on proxy. See - https://docs.litellm.ai/docs/proxy/virtual_keys
   store_model_in_db: True
   proxy_budget_rescheduler_min_time: 60
   proxy_budget_rescheduler_max_time: 64
diff --git a/qa_sticky_session.sh b/qa_sticky_session.sh
index 326bb8117c7..56bb8df288f 100755
--- a/qa_sticky_session.sh
+++ b/qa_sticky_session.sh
@@ -1,14 +1,14 @@
 #!/usr/bin/env bash
 # QA: code interpreter sandbox stickiness via metadata.session_id
 #   bash qa_sticky_session.sh
-#   LITELLM_BASE_URL=http://localhost:4000 LITELLM_KEY=sk-1234 bash qa_sticky_session.sh
+#   LITELLM_BASE_URL=http://localhost:4000 LITELLM_KEY=sk- bash qa_sticky_session.sh
 
 set -euo pipefail
 
 BASE="${LITELLM_BASE_URL:-http://localhost:4000}"
-KEY="${LITELLM_KEY:-sk-1234}"
+KEY="${LITELLM_KEY:-sk-}"
 MODEL="${LITELLM_MODEL:-gpt-4o-mini}"
-# proxy running at http://localhost:4000 (master key: sk-1234)
+# proxy running at http://localhost:4000 (master key: sk-)
 SESSION_A="qa-session-$(date +%s)-A"
 SESSION_B="qa-session-$(date +%s)-B"
 
diff --git a/scripts/adaptive_router_demo/README.md b/scripts/adaptive_router_demo/README.md
index 1965dbbf168..70ac6bde6b5 100644
--- a/scripts/adaptive_router_demo/README.md
+++ b/scripts/adaptive_router_demo/README.md
@@ -83,7 +83,7 @@ The dashboard is a single static HTML file. Either:
 In the connect bar, fill in:
 
 - **Proxy URL:** `http://localhost:4000`
-- **Master Key:** the `master_key` from your config (`sk-1234` in the example).
+- **Master Key:** the `master_key` from your config (`sk-` in the example).
 
 Click **Connect**. The dashboard polls `GET /adaptive_router/state` every
 500ms (admin-only endpoint, returns one snapshot per configured router).
@@ -95,7 +95,7 @@ In a second terminal:
 ```bash
 uv run python scripts/adaptive_router_demo/traffic.py \
     --proxy-url http://localhost:4000 \
-    --api-key   sk-1234 \
+    --api-key   sk- \
     --router    smart-cheap-router \
     --rounds    100 \
     --rate      0.5
diff --git a/scripts/adaptive_router_demo/chat.html b/scripts/adaptive_router_demo/chat.html
index 9e7237847c0..79a98aad37a 100644
--- a/scripts/adaptive_router_demo/chat.html
+++ b/scripts/adaptive_router_demo/chat.html
@@ -366,7 +366,7 @@
 
 
- + diff --git a/scripts/adaptive_router_demo/dashboard.html b/scripts/adaptive_router_demo/dashboard.html index 6652aa19805..aea4d09e74b 100644 --- a/scripts/adaptive_router_demo/dashboard.html +++ b/scripts/adaptive_router_demo/dashboard.html @@ -255,7 +255,7 @@
- + diff --git a/scripts/adaptive_router_demo/eval.py b/scripts/adaptive_router_demo/eval.py index b02e4a37d31..0328fbb3be1 100644 --- a/scripts/adaptive_router_demo/eval.py +++ b/scripts/adaptive_router_demo/eval.py @@ -11,7 +11,7 @@ For each test case: Run: uv run python scripts/adaptive_router_demo/eval.py \ --proxy-url http://localhost:4000 \ - --api-key sk-1234 \ + --api-key sk- \ --router smart-cheap-router \ --judge-model smart """ diff --git a/scripts/adaptive_router_demo/traffic.py b/scripts/adaptive_router_demo/traffic.py index eae5506eaee..95683c9649c 100644 --- a/scripts/adaptive_router_demo/traffic.py +++ b/scripts/adaptive_router_demo/traffic.py @@ -23,7 +23,7 @@ Why this shape: Run: uv run python scripts/adaptive_router_demo/traffic.py \\ --proxy-url http://localhost:4000 \\ - --api-key sk-1234 \\ + --api-key sk- \\ --router smart-cheap-router \\ --rounds 100 \\ --rate 0.5 diff --git a/scripts/benchmark_anthropic_messages_perf.py b/scripts/benchmark_anthropic_messages_perf.py index 3c8a22f0cc2..46ad35a74c5 100644 --- a/scripts/benchmark_anthropic_messages_perf.py +++ b/scripts/benchmark_anthropic_messages_perf.py @@ -41,7 +41,7 @@ import aiohttp from aiohttp import web DEFAULT_MODEL = "claude-perf-test" -DEFAULT_API_KEY = "sk-1234" +DEFAULT_API_KEY = "sk-" @dataclass diff --git a/scripts/benchmark_chat_completions_perf.py b/scripts/benchmark_chat_completions_perf.py index 2c211f674fe..43bca181953 100644 --- a/scripts/benchmark_chat_completions_perf.py +++ b/scripts/benchmark_chat_completions_perf.py @@ -36,7 +36,7 @@ from aiohttp import web DEFAULT_MODEL = "perf-test-model" -DEFAULT_API_KEY = "sk-1234" +DEFAULT_API_KEY = "sk-" @dataclass diff --git a/scripts/benchmark_mock.py b/scripts/benchmark_mock.py index 55dbb1d4134..39c1d8bbacc 100644 --- a/scripts/benchmark_mock.py +++ b/scripts/benchmark_mock.py @@ -17,7 +17,7 @@ REQUEST_BODY = { } HEADERS = { - "Authorization": "Bearer sk-1234", + "Authorization": "Bearer sk-", "Content-Type": "application/json", } diff --git a/scripts/benchmark_proxy_vs_provider.py b/scripts/benchmark_proxy_vs_provider.py index 6196580b230..b1c40c43ae5 100755 --- a/scripts/benchmark_proxy_vs_provider.py +++ b/scripts/benchmark_proxy_vs_provider.py @@ -9,7 +9,7 @@ USAGE EXAMPLES: # Set required environment variables export LITELLM_PROXY_URL='http://localhost:4000/chat/completions' export PROVIDER_URL='https://api.openai.com/v1/chat/completions' - export LITELLM_PROXY_API_KEY='sk-1234' + export LITELLM_PROXY_API_KEY='sk-' export PROVIDER_API_KEY='sk-openai-key' # Run from scripts directory @@ -537,7 +537,7 @@ Examples: # 1. Basic usage (recommended - sequential execution) export LITELLM_PROXY_URL='http://localhost:4000/chat/completions' export PROVIDER_URL='https://api.openai.com/v1/chat/completions' - export LITELLM_PROXY_API_KEY='sk-1234' + export LITELLM_PROXY_API_KEY='sk-' export PROVIDER_API_KEY='sk-openai-key' python scripts/benchmark_proxy_vs_provider.py diff --git a/scripts/health_check/health_check_client.py b/scripts/health_check/health_check_client.py index 9ef8b934961..980d24a0f07 100644 --- a/scripts/health_check/health_check_client.py +++ b/scripts/health_check/health_check_client.py @@ -400,7 +400,7 @@ class LiteLLMHealthCheckClient: async def main(): """Main entry point.""" base_url = os.environ.get("LITELLM_BASE_URL", "http://localhost:4000") - api_key = os.environ.get("LITELLM_API_KEY", "sk-1234") + api_key = os.environ.get("LITELLM_API_KEY", "sk-") yaml_path = os.environ.get("LITELLM_MODELS_YAML") custom_auth_header = os.environ.get( "LITELLM_CUSTOM_AUTH_HEADER" diff --git a/scripts/health_check/run_parallel_health_checks.ps1 b/scripts/health_check/run_parallel_health_checks.ps1 index 850fc6baab6..65d5e98f2ac 100644 --- a/scripts/health_check/run_parallel_health_checks.ps1 +++ b/scripts/health_check/run_parallel_health_checks.ps1 @@ -24,7 +24,7 @@ if (-not $env:LITELLM_BASE_URL) { } if (-not $env:LITELLM_API_KEY) { - $env:LITELLM_API_KEY = "sk-1234" + $env:LITELLM_API_KEY = "sk-" Write-Warning "LITELLM_API_KEY not set, using default: $env:LITELLM_API_KEY" } diff --git a/scripts/health_check/run_parallel_health_checks.sh b/scripts/health_check/run_parallel_health_checks.sh index d1913e3fdd6..d6878548917 100644 --- a/scripts/health_check/run_parallel_health_checks.sh +++ b/scripts/health_check/run_parallel_health_checks.sh @@ -27,7 +27,7 @@ if [ -z "$LITELLM_BASE_URL" ]; then fi if [ -z "$LITELLM_API_KEY" ]; then - export LITELLM_API_KEY="sk-1234" + export LITELLM_API_KEY="sk-" echo "Warning: LITELLM_API_KEY not set, using default: $LITELLM_API_KEY" >&2 fi diff --git a/ui/litellm-dashboard/src/app/(dashboard)/api-reference/_components/APIReferenceView.tsx b/ui/litellm-dashboard/src/app/(dashboard)/api-reference/_components/APIReferenceView.tsx index 847bd34da3e..9291813e051 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/api-reference/_components/APIReferenceView.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/api-reference/_components/APIReferenceView.tsx @@ -82,14 +82,14 @@ llm = AzureOpenAI( engine="azure-gpt-3.5", # model_name on litellm proxy temperature=0.0, azure_endpoint="${base_url}", # litellm proxy endpoint - api_key="sk-1234", # litellm proxy API Key + api_key="sk-", # litellm proxy API Key api_version="2023-07-01-preview", ) embed_model = AzureOpenAIEmbedding( deployment_name="azure-embedding-model", azure_endpoint="${base_url}", - api_key="sk-1234", + api_key="sk-", api_version="2023-07-01-preview", ) diff --git a/ui/litellm-dashboard/src/app/(dashboard)/cost-tracking/_components/how_it_works.tsx b/ui/litellm-dashboard/src/app/(dashboard)/cost-tracking/_components/how_it_works.tsx index 8a4a18a71fe..0d65ecd07f6 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/cost-tracking/_components/how_it_works.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/cost-tracking/_components/how_it_works.tsx @@ -59,7 +59,7 @@ const HowItWorks: React.FC = () => { language="bash" code={`curl -X POST -i http://your-proxy:4000/chat/completions \\ -H "Content-Type: application/json" \\ - -H "Authorization: Bearer sk-1234" \\ + -H "Authorization: Bearer sk-" \\ -d '{ "model": "gemini/gemini-2.5-pro", "messages": [{"role": "user", "content": "Hello"}] diff --git a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/AgentBuilderView.tsx b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/AgentBuilderView.tsx index 30feb1988b1..1c15d2ca1a7 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/AgentBuilderView.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/AgentBuilderView.tsx @@ -90,7 +90,7 @@ function ConnectTabContent({ ? createdKeyValue.startsWith("Bearer ") ? createdKeyValue : `Bearer ${createdKeyValue}` - : "Bearer sk-1234"; + : "Bearer sk-"; const curlExample = `curl -L -X POST '${baseUrl}/v1/chat/completions' \\ -H 'x-litellm-api-key: ${apiKeyForCurl}' \\ -d '{ diff --git a/ui/litellm-dashboard/src/app/(dashboard)/prompts/_components/prompt_editor_view/PromptCodeSnippets.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/_components/prompt_editor_view/PromptCodeSnippets.tsx index a6adc160674..bd1a4724dc1 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/prompts/_components/prompt_editor_view/PromptCodeSnippets.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/prompts/_components/prompt_editor_view/PromptCodeSnippets.tsx @@ -61,7 +61,7 @@ const PromptCodeSnippets: React.FC = ({ apiBase = proxySettings.PROXY_BASE_URL; } - const effectiveApiKey = accessToken || "sk-1234"; + const effectiveApiKey = accessToken || "sk-"; // Generate code based on selected language and tab const generateCode = () => { diff --git a/ui/litellm-dashboard/src/components/AIHub/ModelHubTable.tsx b/ui/litellm-dashboard/src/components/AIHub/ModelHubTable.tsx index 634adc6fba8..600a8cca1be 100644 --- a/ui/litellm-dashboard/src/components/AIHub/ModelHubTable.tsx +++ b/ui/litellm-dashboard/src/components/AIHub/ModelHubTable.tsx @@ -1084,7 +1084,7 @@ config = { "${selectedMcpServer.server_name}": { "url": "${getProxyBaseUrl()}/${selectedMcpServer.server_name}/mcp", "headers": { - "x-litellm-api-key": "Bearer sk-1234" + "x-litellm-api-key": "Bearer sk-" } } } diff --git a/ui/litellm-dashboard/src/components/public_model_hub.tsx b/ui/litellm-dashboard/src/components/public_model_hub.tsx index 29a84175d75..677638951a7 100644 --- a/ui/litellm-dashboard/src/components/public_model_hub.tsx +++ b/ui/litellm-dashboard/src/components/public_model_hub.tsx @@ -1275,7 +1275,7 @@ config = { "${selectedMcpServer.server_name}": { "url": "${getProxyBaseUrl()}/${selectedMcpServer.server_name}/mcp", "headers": { - "x-litellm-api-key": "Bearer sk-1234" + "x-litellm-api-key": "Bearer sk-" } } } @@ -1315,7 +1315,7 @@ config = { "${selectedMcpServer.server_name}": { "url": "${getProxyBaseUrl()}/${selectedMcpServer.server_name}/mcp", "headers": { - "x-litellm-api-key": "Bearer sk-1234" + "x-litellm-api-key": "Bearer sk-" } } } diff --git a/ui/litellm-dashboard/src/components/routing_groups/RoutingGroupUsagePanel.tsx b/ui/litellm-dashboard/src/components/routing_groups/RoutingGroupUsagePanel.tsx index fafea569012..27f72e90328 100644 --- a/ui/litellm-dashboard/src/components/routing_groups/RoutingGroupUsagePanel.tsx +++ b/ui/litellm-dashboard/src/components/routing_groups/RoutingGroupUsagePanel.tsx @@ -19,7 +19,7 @@ const exampleModel = (group: RoutingGroup): string => group.models[0] ?? " `curl -X POST '${baseUrl}/v1/chat/completions' \\ -H 'Content-Type: application/json' \\ - -H 'Authorization: Bearer $LITELLM_API_KEY' \\ + -H "Authorization: Bearer $LITELLM_API_KEY" \\ -d '{ "model": "${exampleModel(group)}", "messages": [{"role": "user", "content": "Hello!"}] @@ -29,7 +29,7 @@ const buildPythonSnippet = (group: RoutingGroup, baseUrl: string): string => `from openai import OpenAI client = OpenAI( - api_key="$LITELLM_API_KEY", + api_key="sk-", base_url="${baseUrl}", ) diff --git a/ui/litellm-dashboard/src/lib/http/schema.d.ts b/ui/litellm-dashboard/src/lib/http/schema.d.ts index 7ed8df6815d..d539479a91d 100644 --- a/ui/litellm-dashboard/src/lib/http/schema.d.ts +++ b/ui/litellm-dashboard/src/lib/http/schema.d.ts @@ -429,7 +429,7 @@ export interface paths { * Example: * ```bash * curl -X GET 'http://localhost:4000/access_group/list' \ - * -H 'Authorization: Bearer sk-1234' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Returns: @@ -463,7 +463,7 @@ export interface paths { * Example: * ```bash * curl -X POST 'http://localhost:4000/access_group/new' \ - * -H 'Authorization: Bearer sk-1234' \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H 'Content-Type: application/json' \ * -d '{ * "access_group": "production-models", @@ -503,7 +503,7 @@ export interface paths { * Example: * ```bash * curl -X GET 'http://localhost:4000/access_group/production-models/budget' \ - * -H 'Authorization: Bearer sk-1234' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Parameters: @@ -525,7 +525,7 @@ export interface paths { * Example: * ```bash * curl -X PUT 'http://localhost:4000/access_group/production-models/budget' \ - * -H 'Authorization: Bearer sk-1234' \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H 'Content-Type: application/json' \ * -d '{ * "max_budget": 100.0, @@ -556,7 +556,7 @@ export interface paths { * Example: * ```bash * curl -X DELETE 'http://localhost:4000/access_group/production-models/budget' \ - * -H 'Authorization: Bearer sk-1234' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Parameters: @@ -593,7 +593,7 @@ export interface paths { * Example: * ```bash * curl -X DELETE 'http://localhost:4000/access_group/production-models/delete' \ - * -H 'Authorization: Bearer sk-1234' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Parameters: @@ -625,7 +625,7 @@ export interface paths { * Example: * ```bash * curl -X GET 'http://localhost:4000/access_group/production-models/info' \ - * -H 'Authorization: Bearer sk-1234' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Parameters: @@ -665,7 +665,7 @@ export interface paths { * Example: * ```bash * curl -X PUT 'http://localhost:4000/access_group/production-models/update' \ - * -H 'Authorization: Bearer sk-1234' \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H 'Content-Type: application/json' \ * -d '{ * "model_names": ["gpt-4", "claude-3-sonnet"] @@ -1587,7 +1587,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/batches?limit=2 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" + * curl http://localhost:4000/v1/batches?limit=2 -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" * ``` */ get: operations["list_batches_batches_get"]; @@ -1600,7 +1600,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/batches -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl http://localhost:4000/v1/batches -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "input_file_id": "file-abc123", * "endpoint": "/v1/chat/completions", * "completion_window": "24h" @@ -1629,7 +1629,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/batches/batch_abc123 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" + * curl http://localhost:4000/v1/batches/batch_abc123 -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" * ``` */ get: operations["retrieve_batch_batches__batch_id__get"]; @@ -1659,7 +1659,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/batches/batch_abc123/cancel -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -X POST + * curl http://localhost:4000/v1/batches/batch_abc123/cancel -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -X POST * * ``` */ @@ -1886,7 +1886,7 @@ export interface paths { * - **keys**: *Optional[List[str]]* - A list of keys to delete from the cache. Example {"keys": ["key1", "key2"]} * * ```shell - * curl -X POST "http://0.0.0.0:4000/cache/delete" -H "Authorization: Bearer sk-1234" -d '{"keys": ["key1", "key2"]}' + * curl -X POST "http://0.0.0.0:4000/cache/delete" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{"keys": ["key1", "key2"]}' * ``` */ post: operations["cache_delete_cache_delete_post"]; @@ -1913,7 +1913,7 @@ export interface paths { * * Usage: * ``` - * curl -X POST http://0.0.0.0:4000/cache/flushall -H "Authorization: Bearer sk-1234" + * curl -X POST http://0.0.0.0:4000/cache/flushall -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ post: operations["cache_flushall_cache_flushall_post"]; @@ -2109,7 +2109,7 @@ export interface paths { * ```bash * curl -X POST http://localhost:4000/v1/chat/completions * -H "Content-Type: application/json" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "model": "gpt-4o", * "messages": [ @@ -2566,7 +2566,7 @@ export interface paths { * ```bash * curl -X POST http://localhost:4000/v1/completions * -H "Content-Type: application/json" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "model": "gpt-3.5-turbo-instruct", * "prompt": "Once upon a time", @@ -3130,12 +3130,12 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/containers?limit=20&order=desc" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/containers?limit=20&order=desc" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Or specify provider via header or query param: * ```bash - * curl -X GET "http://localhost:4000/v1/containers?custom_llm_provider=azure" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/containers?custom_llm_provider=azure" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["list_containers_containers_get"]; @@ -3149,7 +3149,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1/containers" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/containers" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "name": "My Container", * "expires_after": { * "anchor": "last_active_at", @@ -3160,7 +3160,7 @@ export interface paths { * * Or specify provider via header: * ```bash - * curl -X POST "http://localhost:4000/v1/containers" -H "Authorization: Bearer sk-1234" -H "custom-llm-provider: azure" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/containers" -H "Authorization: Bearer $LITELLM_API_KEY" -H "custom-llm-provider: azure" -H "Content-Type: application/json" -d '{ * "name": "My Container" * }' * ``` @@ -3188,12 +3188,12 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Or specify provider via header: * ```bash - * curl -X GET "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer sk-1234" -H "custom-llm-provider: azure" + * curl -X GET "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer $LITELLM_API_KEY" -H "custom-llm-provider: azure" * ``` */ get: operations["retrieve_container_containers__container_id__get"]; @@ -3208,12 +3208,12 @@ export interface paths { * * Example: * ```bash - * curl -X DELETE "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer sk-1234" + * curl -X DELETE "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Or specify provider via header: * ```bash - * curl -X DELETE "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer sk-1234" -H "custom-llm-provider: azure" + * curl -X DELETE "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer $LITELLM_API_KEY" -H "custom-llm-provider: azure" * ``` */ delete: operations["delete_container_containers__container_id__delete"]; @@ -3550,7 +3550,7 @@ export interface paths { * Cursor already sent pre-nested. * * ```bash - * curl -X POST http://localhost:4000/cursor/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/cursor/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": [{"role": "user", "content": "Hello"}] * }' @@ -3767,7 +3767,7 @@ export interface paths { * * ``` * curl -X POST "http://0.0.0.0:8000/user/block" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "user_ids": [, ...] * }' @@ -3818,7 +3818,7 @@ export interface paths { * * Example curl: * ``` - * curl --location 'http://0.0.0.0:4000/customer/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/customer/delete' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "user_ids" :["ishaan-jaff-5"] * }' * @@ -3848,7 +3848,7 @@ export interface paths { * * Example curl: * ``` - * curl -X GET 'http://localhost:4000/customer/info?end_user_id=test-litellm-user-4' -H 'Authorization: Bearer sk-1234' + * curl -X GET 'http://localhost:4000/customer/info?end_user_id=test-litellm-user-4' -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["end_user_info_customer_info_get"]; @@ -3873,7 +3873,7 @@ export interface paths { * * Example curl: * ``` - * curl --location --request GET 'http://0.0.0.0:4000/customer/list' --header 'Authorization: Bearer sk-1234' + * curl --location --request GET 'http://0.0.0.0:4000/customer/list' --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["list_end_user_customer_list_get"]; @@ -3933,7 +3933,7 @@ export interface paths { * * Example curl: * ``` - * curl --location 'http://0.0.0.0:4000/customer/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/customer/new' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "user_id" : "ishaan-jaff-3", * "allowed_region": "eu", * "budget_id": "free_tier", @@ -3941,7 +3941,7 @@ export interface paths { * }' * * # With object permissions - * curl -L -X POST 'http://localhost:4000/customer/new' -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{ + * curl -L -X POST 'http://localhost:4000/customer/new' -H "Authorization: Bearer $LITELLM_API_KEY" -H 'Content-Type: application/json' -d '{ * "user_id": "user_1", * "object_permission": { * "mcp_servers": ["server_1"], @@ -3978,7 +3978,7 @@ export interface paths { * Example * ``` * curl -X POST "http://0.0.0.0:8000/user/unblock" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "user_ids": [, ...] * }' @@ -4029,13 +4029,13 @@ export interface paths { * * Example curl: * ``` - * curl --location 'http://0.0.0.0:4000/customer/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/customer/update' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "user_id": "test-litellm-user-4", * "budget_id": "paid_tier" * }' * * # Updating object permissions - * curl -L -X POST 'http://localhost:4000/customer/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl -L -X POST 'http://localhost:4000/customer/update' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "user_id": "user_1", * "object_permission": { * "mcp_servers": ["server_3"], @@ -4100,7 +4100,7 @@ export interface paths { * - include_process_info: Include process-level memory info using psutil (default: true) * * Example usage: - * curl "http://localhost:4000/debug/memory/details?top_n=30" -H "Authorization: Bearer sk-1234" + * curl "http://localhost:4000/debug/memory/details?top_n=30" -H "Authorization: Bearer $LITELLM_API_KEY" * * All memory sizes are reported in both bytes and MB. */ @@ -4142,10 +4142,10 @@ export interface paths { * - generation_2: Number of gen-1 collections before gen-2 collection (default: 10) * * Example for more aggressive collection: - * curl -X POST "http://localhost:4000/debug/memory/gc/configure?generation_0=500" -H "Authorization: Bearer sk-1234" + * curl -X POST "http://localhost:4000/debug/memory/gc/configure?generation_0=500" -H "Authorization: Bearer $LITELLM_API_KEY" * * Example for less aggressive collection: - * curl -X POST "http://localhost:4000/debug/memory/gc/configure?generation_0=1000" -H "Authorization: Bearer sk-1234" + * curl -X POST "http://localhost:4000/debug/memory/gc/configure?generation_0=1000" -H "Authorization: Bearer $LITELLM_API_KEY" * * Monitor memory usage with GET /debug/memory/summary after changes. */ @@ -4176,7 +4176,7 @@ export interface paths { * - garbage_collector: GC status and pending object counts * * Example usage: - * curl http://localhost:4000/debug/memory/summary -H "Authorization: Bearer sk-1234" + * curl http://localhost:4000/debug/memory/summary -H "Authorization: Bearer $LITELLM_API_KEY" * * For detailed analysis, call GET /debug/memory/details * For cache management, use the cache management endpoints @@ -4267,7 +4267,7 @@ export interface paths { * ```bash * curl -X POST http://localhost:4000/v1/embeddings * -H "Content-Type: application/json" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "model": "text-embedding-ada-002", * "input": "The quick brown fox jumps over the lazy dog" @@ -4301,7 +4301,7 @@ export interface paths { * * ``` * curl -X POST "http://0.0.0.0:8000/user/block" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "user_ids": [, ...] * }' @@ -4352,7 +4352,7 @@ export interface paths { * * Example curl: * ``` - * curl --location 'http://0.0.0.0:4000/customer/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/customer/delete' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "user_ids" :["ishaan-jaff-5"] * }' * @@ -4382,7 +4382,7 @@ export interface paths { * * Example curl: * ``` - * curl -X GET 'http://localhost:4000/customer/info?end_user_id=test-litellm-user-4' -H 'Authorization: Bearer sk-1234' + * curl -X GET 'http://localhost:4000/customer/info?end_user_id=test-litellm-user-4' -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["end_user_info_end_user_info_get"]; @@ -4407,7 +4407,7 @@ export interface paths { * * Example curl: * ``` - * curl --location --request GET 'http://0.0.0.0:4000/customer/list' --header 'Authorization: Bearer sk-1234' + * curl --location --request GET 'http://0.0.0.0:4000/customer/list' --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["list_end_user_end_user_list_get"]; @@ -4467,7 +4467,7 @@ export interface paths { * * Example curl: * ``` - * curl --location 'http://0.0.0.0:4000/customer/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/customer/new' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "user_id" : "ishaan-jaff-3", * "allowed_region": "eu", * "budget_id": "free_tier", @@ -4475,7 +4475,7 @@ export interface paths { * }' * * # With object permissions - * curl -L -X POST 'http://localhost:4000/customer/new' -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{ + * curl -L -X POST 'http://localhost:4000/customer/new' -H "Authorization: Bearer $LITELLM_API_KEY" -H 'Content-Type: application/json' -d '{ * "user_id": "user_1", * "object_permission": { * "mcp_servers": ["server_1"], @@ -4512,7 +4512,7 @@ export interface paths { * Example * ``` * curl -X POST "http://0.0.0.0:8000/user/unblock" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "user_ids": [, ...] * }' @@ -4563,13 +4563,13 @@ export interface paths { * * Example curl: * ``` - * curl --location 'http://0.0.0.0:4000/customer/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/customer/update' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "user_id": "test-litellm-user-4", * "budget_id": "paid_tier" * }' * * # Updating object permissions - * curl -L -X POST 'http://localhost:4000/customer/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl -L -X POST 'http://localhost:4000/customer/update' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "user_id": "user_1", * "object_permission": { * "mcp_servers": ["server_3"], @@ -4603,7 +4603,7 @@ export interface paths { * ```bash * curl -X POST http://localhost:4000/v1/chat/completions * -H "Content-Type: application/json" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "model": "gpt-4o", * "messages": [ @@ -4638,7 +4638,7 @@ export interface paths { * ```bash * curl -X POST http://localhost:4000/v1/completions * -H "Content-Type: application/json" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "model": "gpt-3.5-turbo-instruct", * "prompt": "Once upon a time", @@ -4670,7 +4670,7 @@ export interface paths { * ```bash * curl -X POST http://localhost:4000/v1/embeddings * -H "Content-Type: application/json" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "model": "text-embedding-ada-002", * "input": "The quick brown fox jumps over the lazy dog" @@ -4822,7 +4822,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/files -H "Authorization: Bearer sk-1234" + * curl http://localhost:4000/v1/files -H "Authorization: Bearer $LITELLM_API_KEY" * * ``` */ @@ -4837,7 +4837,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/files -H "Authorization: Bearer sk-1234" -F purpose="batch" -F file="@mydata.jsonl" + * curl http://localhost:4000/v1/files -H "Authorization: Bearer $LITELLM_API_KEY" -F purpose="batch" -F file="@mydata.jsonl" * -F expires_after[anchor]="created_at" -F expires_after[seconds]=2592000 * ``` */ @@ -4864,7 +4864,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/files/file-abc123 -H "Authorization: Bearer sk-1234" + * curl http://localhost:4000/v1/files/file-abc123 -H "Authorization: Bearer $LITELLM_API_KEY" * * ``` */ @@ -4906,7 +4906,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/files/file-abc123/content -H "Authorization: Bearer sk-1234" + * curl http://localhost:4000/v1/files/file-abc123/content -H "Authorization: Bearer $LITELLM_API_KEY" * * ``` */ @@ -4947,7 +4947,7 @@ export interface paths { * * Example Curl: * ``` - * curl http://localhost:4000/v1/fine_tuning/jobs -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl http://localhost:4000/v1/fine_tuning/jobs -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-3.5-turbo", * "training_file": "file-abc123", * "hyperparameters": { @@ -5888,12 +5888,12 @@ export interface paths { * * Example Request: * ``` - * curl -X GET "http://0.0.0.0:4000/spend/tags" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:4000/spend/tags" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Spend with Start Date and End Date * ``` - * curl -X GET "http://0.0.0.0:4000/spend/tags?start_date=2022-01-01&end_date=2022-02-01" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:4000/spend/tags?start_date=2022-01-01&end_date=2022-02-01" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["global_view_spend_tags_global_spend_tags_get"]; @@ -7018,7 +7018,7 @@ export interface paths { * * Example: * ``` - * curl -L -X GET 'http://0.0.0.0:4000/health/services?service=datadog' -H 'Authorization: Bearer sk-1234' + * curl -L -X GET 'http://0.0.0.0:4000/health/services?service=datadog' -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["health_services_endpoint_health_services_get"]; @@ -7072,7 +7072,7 @@ export interface paths { * ```bash * # If model is configured in proxy_config.yaml, you only need to specify the model name: * curl -X POST 'http://localhost:4000/health/test_connection' \ - * -H 'Authorization: Bearer sk-1234' \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H 'Content-Type: application/json' \ * -d '{ * "litellm_params": { @@ -7085,7 +7085,7 @@ export interface paths { * * # You can also override specific params or test with custom credentials: * curl -X POST 'http://localhost:4000/health/test_connection' \ - * -H 'Authorization: Bearer sk-1234' \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H 'Content-Type: application/json' \ * -d '{ * "litellm_params": { @@ -7132,7 +7132,7 @@ export interface paths { * @description Follows the OpenAI Images API spec: https://platform.openai.com/docs/api-reference/images/create * * ```bash - * curl -s -D >(grep -i x-request-id >&2) -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) -X POST "http://localhost:4000/v1/images/edits" -H "Authorization: Bearer sk-1234" -F "model=gpt-image-1" -F "image[]=@soap.png" -F 'prompt=Create a studio ghibli image of this' + * curl -s -D >(grep -i x-request-id >&2) -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) -X POST "http://localhost:4000/v1/images/edits" -H "Authorization: Bearer $LITELLM_API_KEY" -F "model=gpt-image-1" -F "image[]=@soap.png" -F 'prompt=Create a studio ghibli image of this' * ``` */ post: operations["image_edit_api_images_edits_post"]; @@ -7180,7 +7180,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1beta/interactions" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1beta/interactions" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "model": "gemini/gemini-2.5-flash", * "input": "Hello, how are you?" * }' @@ -7507,7 +7507,7 @@ export interface paths { * * Example: * ```bash - * curl --location 'http://0.0.0.0:4000/key/block' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/key/block' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "key": "sk-Fn8Ej39NxjAXrvpUGKghGw" * }' * ``` @@ -7552,10 +7552,10 @@ export interface paths { * * Example request: * ```bash - * curl --location 'http://0.0.0.0:4000/key/bulk_update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/key/bulk_update' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "keys": [ * { - * "key": "sk-1234", + * "key": "sk-", * "max_budget": 100.0, * "team_id": "team-123", * "tags": ["production", "api"] @@ -7598,7 +7598,7 @@ export interface paths { * * Example: * ```bash - * curl --location 'http://0.0.0.0:4000/key/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/key/delete' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "keys": ["sk-QWrxEynunsNpV1zT48HIrw"] * }' * ``` @@ -7689,7 +7689,7 @@ export interface paths { * 1. Allow users to turn on/off pii masking * * ```bash - * curl --location 'http://0.0.0.0:4000/key/generate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/key/generate' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "permissions": {"allow_pii_controls": true} * }' * ``` @@ -7727,7 +7727,7 @@ export interface paths { * Pass the key in the request header * * ```bash - * curl -X POST "http://localhost:4000/key/health" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" + * curl -X POST "http://localhost:4000/key/health" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" * ``` * * Response when logging callbacks are setup correctly: @@ -7813,7 +7813,7 @@ export interface paths { * * Example Curl: * ``` - * curl -X GET "http://0.0.0.0:4000/key/info?key=d5345c0ecc68ae6295c69f91926b2bd379e25481a40c34b5884d157a9f65d8fa" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:4000/key/info?key=d5345c0ecc68ae6295c69f91926b2bd379e25481a40c34b5884d157a9f65d8fa" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Example Curl - if no key is passed, it will use the Key Passed in Authorization Header @@ -7914,7 +7914,7 @@ export interface paths { * * Example: * ```bash - * curl --location --request POST 'http://localhost:4000/key/sk-1234/regenerate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{ + * curl --location --request POST 'http://localhost:4000/key/sk-/regenerate' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data-raw '{ * "max_budget": 100, * "metadata": {"team": "core-infra"}, * "models": ["gpt-4", "gpt-3.5-turbo"] @@ -7992,7 +7992,7 @@ export interface paths { * 1. Allow users to turn on/off pii masking * * ```bash - * curl --location 'http://0.0.0.0:4000/key/generate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/key/generate' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "permissions": {"allow_pii_controls": true} * }' * ``` @@ -8051,7 +8051,7 @@ export interface paths { * * Example: * ```bash - * curl --location 'http://0.0.0.0:4000/key/unblock' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/key/unblock' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "key": "sk-Fn8Ej39NxjAXrvpUGKghGw" * }' * ``` @@ -8141,8 +8141,8 @@ export interface paths { * * Example: * ```bash - * curl --location 'http://0.0.0.0:4000/key/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ - * "key": "sk-1234", + * curl --location 'http://0.0.0.0:4000/key/update' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ + * "key": "sk-", * "key_alias": "my-key", * "user_id": "user-1234", * "team_id": "team-1234", @@ -8207,7 +8207,7 @@ export interface paths { * * Example: * ```bash - * curl --location --request POST 'http://localhost:4000/key/sk-1234/regenerate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{ + * curl --location --request POST 'http://localhost:4000/key/sk-/regenerate' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data-raw '{ * "max_budget": 100, * "metadata": {"team": "core-infra"}, * "models": ["gpt-4", "gpt-3.5-turbo"] @@ -8363,7 +8363,7 @@ export interface paths { * * Example curl: * ``` - * curl --location --globoff 'http://0.0.0.0:4000/management/v1/budgets?sort=-max_budget&filter[budget_duration][in]=7d,30d&page_size=25' --header 'Authorization: Bearer sk-1234' + * curl --location --globoff 'http://0.0.0.0:4000/management/v1/budgets?sort=-max_budget&filter[budget_duration][in]=7d,30d&page_size=25' --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["list_budgets_management_v1_budgets_get"]; @@ -8397,7 +8397,7 @@ export interface paths { * * Example curl: * ``` - * curl --location --globoff 'http://0.0.0.0:4000/management/v1/spend_logs/end_users?filter[startTime][gte]=2026-07-23T00:00:00Z&filter[startTime][lte]=2026-07-24T00:00:00Z&page_size=50&q=acme' --header 'Authorization: Bearer sk-1234' + * curl --location --globoff 'http://0.0.0.0:4000/management/v1/spend_logs/end_users?filter[startTime][gte]=2026-07-23T00:00:00Z&filter[startTime][lte]=2026-07-24T00:00:00Z&page_size=50&q=acme' --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["list_spend_log_end_users_management_v1_spend_logs_end_users_get"]; @@ -8853,7 +8853,7 @@ export interface paths { * Example: * ```shell * curl -X GET 'http://localhost:4000/model/deprecations' \ - * -H 'Authorization: Bearer sk-1234' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["model_deprecations_model_deprecations_get"]; @@ -9143,18 +9143,18 @@ export interface paths { * * Example Request (All Models): * ```shell - * curl -X 'GET' 'http://localhost:4000/model_group/info' -H 'accept: application/json' -H 'x-api-key: sk-1234' + * curl -X 'GET' 'http://localhost:4000/model_group/info' -H 'accept: application/json' -H "x-api-key: $LITELLM_API_KEY" * ``` * * Example Request (Specific Model Group): * ```shell - * curl -X 'GET' 'http://localhost:4000/model_group/info?model_group=rerank-english-v3.0' -H 'accept: application/json' -H 'Authorization: Bearer sk-1234' + * curl -X 'GET' 'http://localhost:4000/model_group/info?model_group=rerank-english-v3.0' -H 'accept: application/json' -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Example Request (Specific Wildcard Model Group): (e.g. `model_name: openai/*` on config.yaml) * ```shell * curl -X 'GET' 'http://localhost:4000/model_group/info?model_group=openai/tts-1' - * -H 'accept: application/json' -H 'Authorization: Bearersk-1234' + * -H 'accept: application/json' -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Learn how to use and set wildcard models [here](https://docs.litellm.ai/docs/wildcard_routing) @@ -9476,7 +9476,7 @@ export interface paths { * @description The moderations endpoint is a tool you can use to check whether content complies with an LLM Providers policies. * Quick Start * ``` - * curl --location 'http://0.0.0.0:4000/moderations' --header 'Content-Type: application/json' --header 'Authorization: Bearer sk-1234' --data '{"input": "Sample text goes here", "model": "text-moderation-stable"}' + * curl --location 'http://0.0.0.0:4000/moderations' --header 'Content-Type: application/json' --header "Authorization: Bearer $LITELLM_API_KEY" --data '{"input": "Sample text goes here", "model": "text-moderation-stable"}' * ``` */ post: operations["moderations_moderations_post"]; @@ -9503,7 +9503,7 @@ export interface paths { * * **1. JSON body** (Mistral OCR API compatible): * ```bash - * curl -X POST "http://localhost:4000/v1/ocr" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/ocr" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "model": "mistral-ocr", * "document": { * "type": "document_url", @@ -9514,7 +9514,7 @@ export interface paths { * * **2. Multipart form file upload**: * ```bash - * curl -X POST "http://localhost:4000/v1/ocr" -H "Authorization: Bearer sk-1234" -F "model=mistral-ocr" -F "file=@document.pdf" + * curl -X POST "http://localhost:4000/v1/ocr" -H "Authorization: Bearer $LITELLM_API_KEY" -F "model=mistral-ocr" -F "file=@document.pdf" * ``` * * Response format is normalized to the LiteLLM OCR schema by default. Providers @@ -9597,7 +9597,7 @@ export interface paths { * ```bash * curl -X POST http://localhost:4000/v1/chat/completions * -H "Content-Type: application/json" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "model": "gpt-4o", * "messages": [ @@ -9632,7 +9632,7 @@ export interface paths { * ```bash * curl -X POST http://localhost:4000/v1/completions * -H "Content-Type: application/json" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "model": "gpt-3.5-turbo-instruct", * "prompt": "Once upon a time", @@ -9664,7 +9664,7 @@ export interface paths { * ```bash * curl -X POST http://localhost:4000/v1/embeddings * -H "Content-Type: application/json" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "model": "text-embedding-ada-002", * "input": "The quick brown fox jumps over the lazy dog" @@ -9692,7 +9692,7 @@ export interface paths { * @description Follows the OpenAI Images API spec: https://platform.openai.com/docs/api-reference/images/create * * ```bash - * curl -s -D >(grep -i x-request-id >&2) -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) -X POST "http://localhost:4000/v1/images/edits" -H "Authorization: Bearer sk-1234" -F "model=gpt-image-1" -F "image[]=@soap.png" -F 'prompt=Create a studio ghibli image of this' + * curl -s -D >(grep -i x-request-id >&2) -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) -X POST "http://localhost:4000/v1/images/edits" -H "Authorization: Bearer $LITELLM_API_KEY" -F "model=gpt-image-1" -F "image[]=@soap.png" -F 'prompt=Create a studio ghibli image of this' * ``` */ post: operations["image_edit_api_openai_deployments__model__images_edits_post"]; @@ -9816,13 +9816,13 @@ export interface paths { * * ```bash * # Normal request - * curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": "Tell me about AI" * }' * * # Background request with polling - * curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": "Tell me about AI", * "background": true @@ -9854,7 +9854,7 @@ export interface paths { * Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/compact * * ```bash - * curl -X POST http://localhost:4000/v1/responses/compact -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/v1/responses/compact -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": [{"role": "user", "content": "Hello"}] * }' @@ -9883,7 +9883,7 @@ export interface paths { * Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/input-tokens * * ```bash - * curl -X POST http://localhost:4000/v1/responses/input_tokens -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/v1/responses/input_tokens -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": "Hello, how are you?" * }' @@ -9917,10 +9917,10 @@ export interface paths { * * ```bash * # Get polling response - * curl -X GET http://localhost:4000/v1/responses/litellm_poll_abc123 -H "Authorization: Bearer sk-1234" + * curl -X GET http://localhost:4000/v1/responses/litellm_poll_abc123 -H "Authorization: Bearer $LITELLM_API_KEY" * * # Get provider response - * curl -X GET http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer sk-1234" + * curl -X GET http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["get_response_openai_v1_responses__response_id__get"]; @@ -9937,7 +9937,7 @@ export interface paths { * Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/delete * * ```bash - * curl -X DELETE http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer sk-1234" + * curl -X DELETE http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ delete: operations["delete_response_openai_v1_responses__response_id__delete"]; @@ -9967,10 +9967,10 @@ export interface paths { * * ```bash * # Cancel polling response - * curl -X POST http://localhost:4000/v1/responses/litellm_poll_abc123/cancel -H "Authorization: Bearer sk-1234" + * curl -X POST http://localhost:4000/v1/responses/litellm_poll_abc123/cancel -H "Authorization: Bearer $LITELLM_API_KEY" * * # Cancel provider response - * curl -X POST http://localhost:4000/v1/responses/resp_abc123/cancel -H "Authorization: Bearer sk-1234" + * curl -X POST http://localhost:4000/v1/responses/resp_abc123/cancel -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ post: operations["cancel_response_openai_v1_responses__response_id__cancel_post"]; @@ -10299,12 +10299,12 @@ export interface paths { * * Example: * ``` - * curl --location --request GET 'http://0.0.0.0:4000/organization/list?org_alias=my-org' --header 'Authorization: Bearer sk-1234' + * curl --location --request GET 'http://0.0.0.0:4000/organization/list?org_alias=my-org' --header "Authorization: Bearer $LITELLM_API_KEY" * ``` * * 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' + * curl --location --request GET 'http://0.0.0.0:4000/organization/list?org_id=123e4567-e89b-12d3-a456-426614174000' --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["list_organization_organization_list_get"]; @@ -10347,7 +10347,7 @@ export interface paths { * * Example: * ``` - * curl -X POST 'http://0.0.0.0:4000/organization/member_add' -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{ + * curl -X POST 'http://0.0.0.0:4000/organization/member_add' -H "Authorization: Bearer $LITELLM_API_KEY" -H 'Content-Type: application/json' -d '{ * "organization_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", * "member": { * "role": "internal_user", @@ -10453,7 +10453,7 @@ export interface paths { * * ```bash * curl --location 'http://0.0.0.0:4000/organization/new' - * --header 'Authorization: Bearer sk-1234' + * --header "Authorization: Bearer $LITELLM_API_KEY" * --header 'Content-Type: application/json' * --data '{ * "organization_alias": "my-secret-org", @@ -10468,7 +10468,7 @@ export interface paths { * * ```bash * curl --location 'http://0.0.0.0:4000/organization/new' - * --header 'Authorization: Bearer sk-1234' + * --header "Authorization: Bearer $LITELLM_API_KEY" * --header 'Content-Type: application/json' * --data '{ * "organization_alias": "my-secret-org", @@ -11494,7 +11494,7 @@ export interface paths { * Example: * ```bash * curl --location --request DELETE 'http://0.0.0.0:4000/project/delete' \ - * --header 'Authorization: Bearer sk-1234' \ + * --header "Authorization: Bearer $LITELLM_API_KEY" \ * --header 'Content-Type: application/json' \ * --data '{ * "project_ids": ["project-123", "project-456"] @@ -11524,7 +11524,7 @@ export interface paths { * Example: * ```bash * curl --location 'http://0.0.0.0:4000/project/info?project_id=project-123' \ - * --header 'Authorization: Bearer sk-1234' + * --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["project_info_project_info_get"]; @@ -11550,7 +11550,7 @@ export interface paths { * Example: * ```bash * curl --location 'http://0.0.0.0:4000/project/list' \ - * --header 'Authorization: Bearer sk-1234' + * --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["list_projects_project_list_get"]; @@ -11603,7 +11603,7 @@ export interface paths { * * ```bash * curl --location 'http://0.0.0.0:4000/project/new' \ - * --header 'Authorization: Bearer sk-1234' \ + * --header "Authorization: Bearer $LITELLM_API_KEY" \ * --header 'Content-Type: application/json' \ * --data '{ * "project_alias": "flight-search-assistant", @@ -11630,7 +11630,7 @@ export interface paths { * * ```bash * curl --location 'http://0.0.0.0:4000/project/new' \ - * --header 'Authorization: Bearer sk-1234' \ + * --header "Authorization: Bearer $LITELLM_API_KEY" \ * --header 'Content-Type: application/json' \ * --data '{ * "project_alias": "hotel-recommendations", @@ -11684,7 +11684,7 @@ export interface paths { * Example: * ```bash * curl --location 'http://0.0.0.0:4000/project/update' \ - * --header 'Authorization: Bearer sk-1234' \ + * --header "Authorization: Bearer $LITELLM_API_KEY" \ * --header 'Content-Type: application/json' \ * --data '{ * "project_id": "project-123", @@ -12063,7 +12063,7 @@ export interface paths { * Example Request * * ```bash - * curl -X GET http://localhost:4000/provider/budgets -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" + * curl -X GET http://localhost:4000/provider/budgets -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Example Response @@ -12466,7 +12466,7 @@ export interface paths { * ## Form upload (for files): * ```bash * curl -X POST "http://localhost:4000/v1/rag/ingest" \ - * -H "Authorization: Bearer sk-1234" \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -F file="@document.pdf" \ * -F 'ingest_options={"vector_store": {"custom_llm_provider": "openai"}}' * ``` @@ -12474,7 +12474,7 @@ export interface paths { * ## JSON body (for URLs): * ```bash * curl -X POST "http://localhost:4000/v1/rag/ingest" \ - * -H "Authorization: Bearer sk-1234" \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H "Content-Type: application/json" \ * -d '{ * "file_url": "https://example.com/document.pdf", @@ -12485,7 +12485,7 @@ export interface paths { * ## Bedrock: * ```bash * curl -X POST "http://localhost:4000/v1/rag/ingest" \ - * -H "Authorization: Bearer sk-1234" \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -F file="@document.pdf" \ * -F 'ingest_options={"vector_store": {"custom_llm_provider": "bedrock"}}' * ``` @@ -12519,7 +12519,7 @@ export interface paths { * ## Example Request: * ```bash * curl -X POST "http://localhost:4000/v1/rag/query" \ - * -H "Authorization: Bearer sk-1234" \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H "Content-Type: application/json" \ * -d '{ * "model": "gpt-4o-mini", @@ -12535,7 +12535,7 @@ export interface paths { * ## With Reranking: * ```bash * curl -X POST "http://localhost:4000/v1/rag/query" \ - * -H "Authorization: Bearer sk-1234" \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H "Content-Type: application/json" \ * -d '{ * "model": "gpt-4o-mini", @@ -12741,13 +12741,13 @@ export interface paths { * * ```bash * # Normal request - * curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": "Tell me about AI" * }' * * # Background request with polling - * curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": "Tell me about AI", * "background": true @@ -12779,7 +12779,7 @@ export interface paths { * Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/compact * * ```bash - * curl -X POST http://localhost:4000/v1/responses/compact -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/v1/responses/compact -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": [{"role": "user", "content": "Hello"}] * }' @@ -12808,7 +12808,7 @@ export interface paths { * Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/input-tokens * * ```bash - * curl -X POST http://localhost:4000/v1/responses/input_tokens -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/v1/responses/input_tokens -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": "Hello, how are you?" * }' @@ -12842,10 +12842,10 @@ export interface paths { * * ```bash * # Get polling response - * curl -X GET http://localhost:4000/v1/responses/litellm_poll_abc123 -H "Authorization: Bearer sk-1234" + * curl -X GET http://localhost:4000/v1/responses/litellm_poll_abc123 -H "Authorization: Bearer $LITELLM_API_KEY" * * # Get provider response - * curl -X GET http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer sk-1234" + * curl -X GET http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["get_response_responses__response_id__get"]; @@ -12862,7 +12862,7 @@ export interface paths { * Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/delete * * ```bash - * curl -X DELETE http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer sk-1234" + * curl -X DELETE http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ delete: operations["delete_response_responses__response_id__delete"]; @@ -12892,10 +12892,10 @@ export interface paths { * * ```bash * # Cancel polling response - * curl -X POST http://localhost:4000/v1/responses/litellm_poll_abc123/cancel -H "Authorization: Bearer sk-1234" + * curl -X POST http://localhost:4000/v1/responses/litellm_poll_abc123/cancel -H "Authorization: Bearer $LITELLM_API_KEY" * * # Cancel provider response - * curl -X POST http://localhost:4000/v1/responses/resp_abc123/cancel -H "Authorization: Bearer sk-1234" + * curl -X POST http://localhost:4000/v1/responses/resp_abc123/cancel -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ post: operations["cancel_response_responses__response_id__cancel_post"]; @@ -13458,7 +13458,7 @@ export interface paths { * * Example with search_tool_name in URL (recommended - keeps body Perplexity-compatible): * ```bash - * curl -X POST "http://localhost:4000/v1/search/litellm-search" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/search/litellm-search" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "query": "latest AI developments 2024", * "max_results": 5, * "search_domain_filter": ["arxiv.org", "nature.com"], @@ -13468,7 +13468,7 @@ export interface paths { * * Example with search_tool_name in body: * ```bash - * curl -X POST "http://localhost:4000/v1/search" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/search" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "search_tool_name": "litellm-search", * "query": "latest AI developments 2024", * "max_results": 5, @@ -13531,7 +13531,7 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/search/tools" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/search/tools" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Response: @@ -13579,7 +13579,7 @@ export interface paths { * * Example with search_tool_name in URL (recommended - keeps body Perplexity-compatible): * ```bash - * curl -X POST "http://localhost:4000/v1/search/litellm-search" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/search/litellm-search" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "query": "latest AI developments 2024", * "max_results": 5, * "search_domain_filter": ["arxiv.org", "nature.com"], @@ -13589,7 +13589,7 @@ export interface paths { * * Example with search_tool_name in body: * ```bash - * curl -X POST "http://localhost:4000/v1/search" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/search" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "search_tool_name": "litellm-search", * "query": "latest AI developments 2024", * "max_results": 5, @@ -14006,7 +14006,7 @@ export interface paths { * * ``` * curl --location 'http://localhost:4000/spend/calculate' - * --header 'Authorization: Bearer sk-1234' + * --header "Authorization: Bearer $LITELLM_API_KEY" * --header 'Content-Type: application/json' * --data '{ * "model": "anthropic.claude-v2", @@ -14018,7 +14018,7 @@ export interface paths { * * ``` * curl --location 'http://localhost:4000/spend/calculate' - * --header 'Authorization: Bearer sk-1234' + * --header "Authorization: Bearer $LITELLM_API_KEY" * --header 'Content-Type: application/json' * --data '{ * "completion_response": { @@ -14072,7 +14072,7 @@ export interface paths { * * Example Request: * ``` - * curl -X GET "http://0.0.0.0:8000/spend/keys" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:8000/spend/keys" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["spend_key_fn_spend_keys_get"]; @@ -14106,27 +14106,27 @@ export interface paths { * * Example Request for all logs * ``` - * curl -X GET "http://0.0.0.0:8000/spend/logs" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:8000/spend/logs" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Example Request for specific request_id * ``` - * curl -X GET "http://0.0.0.0:8000/spend/logs?request_id=chatcmpl-6dcb2540-d3d7-4e49-bb27-291f863f112e" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:8000/spend/logs?request_id=chatcmpl-6dcb2540-d3d7-4e49-bb27-291f863f112e" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Example Request for specific api_key * ``` - * curl -X GET "http://0.0.0.0:8000/spend/logs?api_key=d5345c0ecc68ae6295c69f91926b2bd379e25481a40c34b5884d157a9f65d8fa" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:8000/spend/logs?api_key=d5345c0ecc68ae6295c69f91926b2bd379e25481a40c34b5884d157a9f65d8fa" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Example Request for specific user_id * ``` - * curl -X GET "http://0.0.0.0:8000/spend/logs?user_id=ishaan@berri.ai" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:8000/spend/logs?user_id=ishaan@berri.ai" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Example Request for date range with individual logs (unsummarized) * ``` - * curl -X GET "http://0.0.0.0:8000/spend/logs?start_date=2024-01-01&end_date=2024-01-02&summarize=false" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:8000/spend/logs?start_date=2024-01-01&end_date=2024-01-02&summarize=false" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["view_spend_logs_spend_logs_get"]; @@ -14183,7 +14183,7 @@ export interface paths { * * Example: * ``` - * curl -X GET "http://0.0.0.0:8000/spend/logs/v2?start_date=2025-11-25%2000:00:00&end_date=2025-11-26%2023:59:59&page=1&page_size=50" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:8000/spend/logs/v2?start_date=2025-11-25%2000:00:00&end_date=2025-11-26%2023:59:59&page=1&page_size=50" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["ui_view_spend_logs_spend_logs_ui_get"]; @@ -14234,7 +14234,7 @@ export interface paths { * * Example: * ``` - * curl -X GET "http://0.0.0.0:8000/spend/logs/v2?start_date=2025-11-25%2000:00:00&end_date=2025-11-26%2023:59:59&page=1&page_size=50" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:8000/spend/logs/v2?start_date=2025-11-25%2000:00:00&end_date=2025-11-26%2023:59:59&page=1&page_size=50" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["ui_view_spend_logs_spend_logs_v2_get"]; @@ -14259,12 +14259,12 @@ export interface paths { * * Example Request: * ``` - * curl -X GET "http://0.0.0.0:8000/spend/tags" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:8000/spend/tags" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Spend with Start Date and End Date * ``` - * curl -X GET "http://0.0.0.0:8000/spend/tags?start_date=2022-01-01&end_date=2022-02-01" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:8000/spend/tags?start_date=2022-01-01&end_date=2022-02-01" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["view_spend_tags_spend_tags_get"]; @@ -14298,12 +14298,12 @@ export interface paths { * * Example Request: * ``` - * curl -X GET "http://0.0.0.0:8000/spend/users" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:8000/spend/users" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * View User Table row for user_id * ``` - * curl -X GET "http://0.0.0.0:8000/spend/users?user_id=1234" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://0.0.0.0:8000/spend/users?user_id=1234" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["spend_user_fn_spend_users_get"]; @@ -14947,7 +14947,7 @@ export interface paths { * * Example: * ``` - * curl --location 'http://0.0.0.0:4000/team/block' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/team/block' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "team_id": "team-1234" * }' * ``` @@ -14992,7 +14992,7 @@ export interface paths { * * Example request: * ```bash - * curl --location 'http://0.0.0.0:4000/team/bulk_member_add' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/team/bulk_member_add' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "team_id": "team-1234", * "members": [ * { @@ -15099,7 +15099,7 @@ export interface paths { * - team_ids: List[str] - Required. List of team IDs to delete. Example: ["team-1234", "team-5678"] * * ``` - * curl --location 'http://0.0.0.0:4000/team/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{ + * curl --location 'http://0.0.0.0:4000/team/delete' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data-raw '{ * "team_ids": ["8d916b1c-510d-4894-a334-1c16a93344f5"] * }' * ``` @@ -15204,7 +15204,7 @@ export interface paths { /** * List Team * @description ``` - * curl --location --request GET 'http://0.0.0.0:4000/team/list' --header 'Authorization: Bearer sk-1234' + * curl --location --request GET 'http://0.0.0.0:4000/team/list' --header "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Parameters: @@ -15238,7 +15238,7 @@ export interface paths { * Only proxy_admin or admin of team, allowed to access this endpoint. * ``` * - * curl -X POST 'http://0.0.0.0:4000/team/member_add' -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{"team_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", "member": {"role": "user", "user_id": "krrish247652@berri.ai"}}' + * curl -X POST 'http://0.0.0.0:4000/team/member_add' -H "Authorization: Bearer $LITELLM_API_KEY" -H 'Content-Type: application/json' -d '{"team_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", "member": {"role": "user", "user_id": "krrish247652@berri.ai"}}' * * ``` */ @@ -15267,7 +15267,7 @@ export interface paths { * If user doesn't exist, an exception will be raised * ``` * curl -X POST 'http://0.0.0.0:8000/team/member_delete' - * -H 'Authorization: Bearer sk-1234' + * -H "Authorization: Bearer $LITELLM_API_KEY" * -H 'Content-Type: application/json' * -d '{ * "team_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", @@ -15348,7 +15348,7 @@ export interface paths { * * Example Request: * ``` - * curl --location 'http://0.0.0.0:4000/team/model/add' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/team/model/add' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "team_id": "team-1234", * "models": ["gpt-4", "claude-2"] * }' @@ -15380,7 +15380,7 @@ export interface paths { * * Example Request: * ``` - * curl --location 'http://0.0.0.0:4000/team/model/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/team/model/delete' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "team_id": "team-1234", * "models": ["gpt-4"] * }' @@ -15462,7 +15462,7 @@ export interface paths { * * Example Request: * ``` - * curl --location 'http://0.0.0.0:4000/team/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/team/new' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "team_alias": "my-new-team_2", * "members_with_roles": [{"role": "admin", "user_id": "user-1234"}, * {"role": "user", "user_id": "user-2434"}] @@ -15471,7 +15471,7 @@ export interface paths { * ``` * * ``` - * curl --location 'http://0.0.0.0:4000/team/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/team/new' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "team_alias": "QA Prod Bot", * "max_budget": 0.000000001, * "budget_duration": "1d" @@ -15616,7 +15616,7 @@ export interface paths { * * Example: * ``` - * curl --location 'http://0.0.0.0:4000/team/unblock' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/team/unblock' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "team_id": "team-1234" * }' * ``` @@ -15685,7 +15685,7 @@ export interface paths { * - default_team_member_models: Optional[List[str]] - Default models assigned to new team members when they join this team. Must be a subset of the team's models. * * ``` - * curl --location 'http://0.0.0.0:4000/team/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{ + * curl --location 'http://0.0.0.0:4000/team/update' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data-raw '{ * "team_id": "8d916b1c-510d-4894-a334-1c16a93344f5", * "tpm_limit": 100 * }' @@ -15693,7 +15693,7 @@ export interface paths { * * Example - Update Team `max_budget` budget * ``` - * curl --location 'http://0.0.0.0:4000/team/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{ + * curl --location 'http://0.0.0.0:4000/team/update' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data-raw '{ * "team_id": "8d916b1c-510d-4894-a334-1c16a93344f5", * "max_budget": 10 * }' @@ -15731,7 +15731,7 @@ export interface paths { * updated team. * * ``` - * curl --location --request PATCH 'http://0.0.0.0:4000/team/8d916b1c-510d-4894-a334-1c16a93344f5' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{ + * curl --location --request PATCH 'http://0.0.0.0:4000/team/8d916b1c-510d-4894-a334-1c16a93344f5' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data-raw '{ * "metadata": {"cost_center": "1234", "deprecated_key": null} * }' * ``` @@ -15755,7 +15755,7 @@ export interface paths { * * Example curl: * ``` - * curl -X GET 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' -H 'Authorization: Bearer sk-1234' + * curl -X GET 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * This will return the callback settings for the team with id dbe2f686-a686-4896-864a-4c3924458709 @@ -15806,7 +15806,7 @@ export interface paths { * * Example curl: * ``` - * curl -X POST 'http:/localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' -H 'Content-Type: application/json' -H 'Authorization: Bearer sk-1234' -d '{ + * curl -X POST 'http:/localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' -H 'Content-Type: application/json' -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "callback_name": "langfuse", * "callback_type": "success", * "callback_vars": {"langfuse_public_key": "pk-lf-xxxx1", "langfuse_secret_key": "sk-xxxxx"} @@ -15850,7 +15850,7 @@ export interface paths { * * Example curl: * ``` - * curl -X DELETE 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback/langsmith' -H 'Authorization: Bearer sk-1234' + * curl -X DELETE 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback/langsmith' -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Covers callbacks registered through POST /team/{team_id}/callback and the Admin UI. Teams still @@ -15886,7 +15886,7 @@ export interface paths { * * Example curl: * ``` - * curl -X POST 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/disable_logging' -H 'Authorization: Bearer sk-1234' + * curl -X POST 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/disable_logging' -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ post: operations["disable_team_logging_team__team_id__disable_logging_post"]; @@ -16466,7 +16466,7 @@ export interface paths { * * Example request for specific users: * ```bash - * curl --location 'http://0.0.0.0:4000/user/bulk_update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/user/bulk_update' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "users": [ * { * "user_id": "user1", @@ -16484,7 +16484,7 @@ export interface paths { * * Example request for all users: * ```bash - * curl --location 'http://0.0.0.0:4000/user/bulk_update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/user/bulk_update' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "all_users": true, * "user_updates": { * "user_role": "internal_user", @@ -16579,7 +16579,7 @@ export interface paths { * * ``` * curl --location 'http://0.0.0.0:4000/user/delete' - * --header 'Authorization: Bearer sk-1234' + * --header "Authorization: Bearer $LITELLM_API_KEY" * --header 'Content-Type: application/json' * --data-raw '{ * "user_ids": ["45e3e396-ee08-4a61-a88e-16b3ce7e0849"] @@ -16643,7 +16643,7 @@ export interface paths { * * Example request * ``` - * curl -X GET 'http://localhost:4000/user/info?user_id=krrish7%40berri.ai' --header 'Authorization: Bearer sk-1234' + * curl -X GET 'http://localhost:4000/user/info?user_id=krrish7%40berri.ai' --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["user_info_user_info_get"]; @@ -16766,7 +16766,7 @@ export interface paths { * Usage Example * * ```shell - * curl -X POST "http://localhost:4000/user/new" -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST "http://localhost:4000/user/new" -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "username": "new_user", * "email": "new_user@example.com" * }' @@ -16817,7 +16817,7 @@ export interface paths { * @description Example curl * * ``` - * curl --location 'http://0.0.0.0:4000/user/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{ + * curl --location 'http://0.0.0.0:4000/user/update' --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ * "user_id": "test-litellm-user-4", * "user_role": "proxy_admin_viewer" * }' @@ -16909,7 +16909,7 @@ export interface paths { * * Example curl: * ``` - * curl -X GET --location 'http://localhost:4000/utils/supported_openai_params?model=gpt-3.5-turbo-16k' --header 'Authorization: Bearer sk-1234' + * curl -X GET --location 'http://localhost:4000/utils/supported_openai_params?model=gpt-3.5-turbo-16k' --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["supported_openai_params_utils_supported_openai_params_get"]; @@ -17452,7 +17452,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/batches?limit=2 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" + * curl http://localhost:4000/v1/batches?limit=2 -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" * ``` */ get: operations["list_batches_v1_batches_get"]; @@ -17465,7 +17465,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/batches -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl http://localhost:4000/v1/batches -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "input_file_id": "file-abc123", * "endpoint": "/v1/chat/completions", * "completion_window": "24h" @@ -17494,7 +17494,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/batches/batch_abc123 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" + * curl http://localhost:4000/v1/batches/batch_abc123 -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" * ``` */ get: operations["retrieve_batch_v1_batches__batch_id__get"]; @@ -17524,7 +17524,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/batches/batch_abc123/cancel -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -X POST + * curl http://localhost:4000/v1/batches/batch_abc123/cancel -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -X POST * * ``` */ @@ -17551,7 +17551,7 @@ export interface paths { * ```bash * curl -X POST http://localhost:4000/v1/chat/completions * -H "Content-Type: application/json" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "model": "gpt-4o", * "messages": [ @@ -17586,7 +17586,7 @@ export interface paths { * ```bash * curl -X POST http://localhost:4000/v1/completions * -H "Content-Type: application/json" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "model": "gpt-3.5-turbo-instruct", * "prompt": "Once upon a time", @@ -17618,12 +17618,12 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/containers?limit=20&order=desc" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/containers?limit=20&order=desc" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Or specify provider via header or query param: * ```bash - * curl -X GET "http://localhost:4000/v1/containers?custom_llm_provider=azure" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/containers?custom_llm_provider=azure" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["list_containers_v1_containers_get"]; @@ -17637,7 +17637,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1/containers" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/containers" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "name": "My Container", * "expires_after": { * "anchor": "last_active_at", @@ -17648,7 +17648,7 @@ export interface paths { * * Or specify provider via header: * ```bash - * curl -X POST "http://localhost:4000/v1/containers" -H "Authorization: Bearer sk-1234" -H "custom-llm-provider: azure" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/containers" -H "Authorization: Bearer $LITELLM_API_KEY" -H "custom-llm-provider: azure" -H "Content-Type: application/json" -d '{ * "name": "My Container" * }' * ``` @@ -17676,12 +17676,12 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Or specify provider via header: * ```bash - * curl -X GET "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer sk-1234" -H "custom-llm-provider: azure" + * curl -X GET "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer $LITELLM_API_KEY" -H "custom-llm-provider: azure" * ``` */ get: operations["retrieve_container_v1_containers__container_id__get"]; @@ -17696,12 +17696,12 @@ export interface paths { * * Example: * ```bash - * curl -X DELETE "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer sk-1234" + * curl -X DELETE "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Or specify provider via header: * ```bash - * curl -X DELETE "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer sk-1234" -H "custom-llm-provider: azure" + * curl -X DELETE "http://localhost:4000/v1/containers/cntr_123" -H "Authorization: Bearer $LITELLM_API_KEY" -H "custom-llm-provider: azure" * ``` */ delete: operations["delete_container_v1_containers__container_id__delete"]; @@ -17779,7 +17779,7 @@ export interface paths { * ```bash * curl -X POST http://localhost:4000/v1/embeddings * -H "Content-Type: application/json" - * -H "Authorization: Bearer sk-1234" + * -H "Authorization: Bearer $LITELLM_API_KEY" * -d '{ * "model": "text-embedding-ada-002", * "input": "The quick brown fox jumps over the lazy dog" @@ -18069,7 +18069,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/files -H "Authorization: Bearer sk-1234" + * curl http://localhost:4000/v1/files -H "Authorization: Bearer $LITELLM_API_KEY" * * ``` */ @@ -18084,7 +18084,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/files -H "Authorization: Bearer sk-1234" -F purpose="batch" -F file="@mydata.jsonl" + * curl http://localhost:4000/v1/files -H "Authorization: Bearer $LITELLM_API_KEY" -F purpose="batch" -F file="@mydata.jsonl" * -F expires_after[anchor]="created_at" -F expires_after[seconds]=2592000 * ``` */ @@ -18111,7 +18111,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/files/file-abc123 -H "Authorization: Bearer sk-1234" + * curl http://localhost:4000/v1/files/file-abc123 -H "Authorization: Bearer $LITELLM_API_KEY" * * ``` */ @@ -18153,7 +18153,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/files/file-abc123/content -H "Authorization: Bearer sk-1234" + * curl http://localhost:4000/v1/files/file-abc123/content -H "Authorization: Bearer $LITELLM_API_KEY" * * ``` */ @@ -18194,7 +18194,7 @@ export interface paths { * * Example Curl: * ``` - * curl http://localhost:4000/v1/fine_tuning/jobs -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl http://localhost:4000/v1/fine_tuning/jobs -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-3.5-turbo", * "training_file": "file-abc123", * "hyperparameters": { @@ -18275,7 +18275,7 @@ export interface paths { * @description Follows the OpenAI Images API spec: https://platform.openai.com/docs/api-reference/images/create * * ```bash - * curl -s -D >(grep -i x-request-id >&2) -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) -X POST "http://localhost:4000/v1/images/edits" -H "Authorization: Bearer sk-1234" -F "model=gpt-image-1" -F "image[]=@soap.png" -F 'prompt=Create a studio ghibli image of this' + * curl -s -D >(grep -i x-request-id >&2) -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) -X POST "http://localhost:4000/v1/images/edits" -H "Authorization: Bearer $LITELLM_API_KEY" -F "model=gpt-image-1" -F "image[]=@soap.png" -F 'prompt=Create a studio ghibli image of this' * ``` */ post: operations["image_edit_api_v1_images_edits_post"]; @@ -18314,7 +18314,7 @@ export interface paths { * @description List all vector store indexes. Proxy admin only. * * ```bash - * curl -L -X GET 'http://0.0.0.0:4000/v1/indexes' -H 'Authorization: Bearer sk-1234' + * curl -L -X GET 'http://0.0.0.0:4000/v1/indexes' -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["index_list_v1_indexes_get"]; @@ -18324,7 +18324,7 @@ export interface paths { * @description Create an index. Just writes the index to the database. * * ```bash - * curl -L -X POST 'http://0.0.0.0:4000/v1/indexes' -H 'Content-Type: application/json' -H 'Authorization: Bearer sk-1234' -d '{ + * curl -L -X POST 'http://0.0.0.0:4000/v1/indexes' -H 'Content-Type: application/json' -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "index_name": "dall-e-3", * "litellm_params": { * "vector_store_index": "real-index-name", @@ -19001,7 +19001,7 @@ export interface paths { * Example: * ```shell * curl -X GET 'http://localhost:4000/model/deprecations' \ - * -H 'Authorization: Bearer sk-1234' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["model_deprecations_v1_model_deprecations_get"]; @@ -19163,7 +19163,7 @@ export interface paths { * @description The moderations endpoint is a tool you can use to check whether content complies with an LLM Providers policies. * Quick Start * ``` - * curl --location 'http://0.0.0.0:4000/moderations' --header 'Content-Type: application/json' --header 'Authorization: Bearer sk-1234' --data '{"input": "Sample text goes here", "model": "text-moderation-stable"}' + * curl --location 'http://0.0.0.0:4000/moderations' --header 'Content-Type: application/json' --header "Authorization: Bearer $LITELLM_API_KEY" --data '{"input": "Sample text goes here", "model": "text-moderation-stable"}' * ``` */ post: operations["moderations_v1_moderations_post"]; @@ -19190,7 +19190,7 @@ export interface paths { * * **1. JSON body** (Mistral OCR API compatible): * ```bash - * curl -X POST "http://localhost:4000/v1/ocr" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/ocr" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "model": "mistral-ocr", * "document": { * "type": "document_url", @@ -19201,7 +19201,7 @@ export interface paths { * * **2. Multipart form file upload**: * ```bash - * curl -X POST "http://localhost:4000/v1/ocr" -H "Authorization: Bearer sk-1234" -F "model=mistral-ocr" -F "file=@document.pdf" + * curl -X POST "http://localhost:4000/v1/ocr" -H "Authorization: Bearer $LITELLM_API_KEY" -F "model=mistral-ocr" -F "file=@document.pdf" * ``` * * Response format is normalized to the LiteLLM OCR schema by default. Providers @@ -19234,7 +19234,7 @@ export interface paths { * ## Form upload (for files): * ```bash * curl -X POST "http://localhost:4000/v1/rag/ingest" \ - * -H "Authorization: Bearer sk-1234" \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -F file="@document.pdf" \ * -F 'ingest_options={"vector_store": {"custom_llm_provider": "openai"}}' * ``` @@ -19242,7 +19242,7 @@ export interface paths { * ## JSON body (for URLs): * ```bash * curl -X POST "http://localhost:4000/v1/rag/ingest" \ - * -H "Authorization: Bearer sk-1234" \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H "Content-Type: application/json" \ * -d '{ * "file_url": "https://example.com/document.pdf", @@ -19253,7 +19253,7 @@ export interface paths { * ## Bedrock: * ```bash * curl -X POST "http://localhost:4000/v1/rag/ingest" \ - * -H "Authorization: Bearer sk-1234" \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -F file="@document.pdf" \ * -F 'ingest_options={"vector_store": {"custom_llm_provider": "bedrock"}}' * ``` @@ -19287,7 +19287,7 @@ export interface paths { * ## Example Request: * ```bash * curl -X POST "http://localhost:4000/v1/rag/query" \ - * -H "Authorization: Bearer sk-1234" \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H "Content-Type: application/json" \ * -d '{ * "model": "gpt-4o-mini", @@ -19303,7 +19303,7 @@ export interface paths { * ## With Reranking: * ```bash * curl -X POST "http://localhost:4000/v1/rag/query" \ - * -H "Authorization: Bearer sk-1234" \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H "Content-Type: application/json" \ * -d '{ * "model": "gpt-4o-mini", @@ -19446,13 +19446,13 @@ export interface paths { * * ```bash * # Normal request - * curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": "Tell me about AI" * }' * * # Background request with polling - * curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": "Tell me about AI", * "background": true @@ -19484,7 +19484,7 @@ export interface paths { * Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/compact * * ```bash - * curl -X POST http://localhost:4000/v1/responses/compact -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/v1/responses/compact -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": [{"role": "user", "content": "Hello"}] * }' @@ -19513,7 +19513,7 @@ export interface paths { * Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/input-tokens * * ```bash - * curl -X POST http://localhost:4000/v1/responses/input_tokens -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{ + * curl -X POST http://localhost:4000/v1/responses/input_tokens -H "Content-Type: application/json" -H "Authorization: Bearer $LITELLM_API_KEY" -d '{ * "model": "gpt-4o", * "input": "Hello, how are you?" * }' @@ -19547,10 +19547,10 @@ export interface paths { * * ```bash * # Get polling response - * curl -X GET http://localhost:4000/v1/responses/litellm_poll_abc123 -H "Authorization: Bearer sk-1234" + * curl -X GET http://localhost:4000/v1/responses/litellm_poll_abc123 -H "Authorization: Bearer $LITELLM_API_KEY" * * # Get provider response - * curl -X GET http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer sk-1234" + * curl -X GET http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["get_response_v1_responses__response_id__get"]; @@ -19567,7 +19567,7 @@ export interface paths { * Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/delete * * ```bash - * curl -X DELETE http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer sk-1234" + * curl -X DELETE http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ delete: operations["delete_response_v1_responses__response_id__delete"]; @@ -19597,10 +19597,10 @@ export interface paths { * * ```bash * # Cancel polling response - * curl -X POST http://localhost:4000/v1/responses/litellm_poll_abc123/cancel -H "Authorization: Bearer sk-1234" + * curl -X POST http://localhost:4000/v1/responses/litellm_poll_abc123/cancel -H "Authorization: Bearer $LITELLM_API_KEY" * * # Cancel provider response - * curl -X POST http://localhost:4000/v1/responses/resp_abc123/cancel -H "Authorization: Bearer sk-1234" + * curl -X POST http://localhost:4000/v1/responses/resp_abc123/cancel -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ post: operations["cancel_response_v1_responses__response_id__cancel_post"]; @@ -19675,7 +19675,7 @@ export interface paths { * * Example with search_tool_name in URL (recommended - keeps body Perplexity-compatible): * ```bash - * curl -X POST "http://localhost:4000/v1/search/litellm-search" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/search/litellm-search" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "query": "latest AI developments 2024", * "max_results": 5, * "search_domain_filter": ["arxiv.org", "nature.com"], @@ -19685,7 +19685,7 @@ export interface paths { * * Example with search_tool_name in body: * ```bash - * curl -X POST "http://localhost:4000/v1/search" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/search" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "search_tool_name": "litellm-search", * "query": "latest AI developments 2024", * "max_results": 5, @@ -19748,7 +19748,7 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/search/tools" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/search/tools" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Response: @@ -19796,7 +19796,7 @@ export interface paths { * * Example with search_tool_name in URL (recommended - keeps body Perplexity-compatible): * ```bash - * curl -X POST "http://localhost:4000/v1/search/litellm-search" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/search/litellm-search" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "query": "latest AI developments 2024", * "max_results": 5, * "search_domain_filter": ["arxiv.org", "nature.com"], @@ -19806,7 +19806,7 @@ export interface paths { * * Example with search_tool_name in body: * ```bash - * curl -X POST "http://localhost:4000/v1/search" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/search" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "search_tool_name": "litellm-search", * "query": "latest AI developments 2024", * "max_results": 5, @@ -20490,7 +20490,7 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/videos" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/videos" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["video_list_v1_videos_get"]; @@ -20504,7 +20504,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1/videos" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/videos" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "model": "sora-2", * "prompt": "A beautiful sunset over the ocean" * }' @@ -20535,7 +20535,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1/videos/characters" -H "Authorization: Bearer sk-1234" -F "video=@character_video.mp4" -F "name=my_character" + * curl -X POST "http://localhost:4000/v1/videos/characters" -H "Authorization: Bearer $LITELLM_API_KEY" -F "video=@character_video.mp4" -F "name=my_character" * ``` */ post: operations["video_create_character_v1_videos_characters_post"]; @@ -20561,7 +20561,7 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/videos/characters/char_123" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/videos/characters/char_123" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["video_get_character_v1_videos_characters__character_id__get"]; @@ -20591,7 +20591,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1/videos/edits" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{"prompt": "Make it brighter", "video": {"id": "video_123"}}' + * curl -X POST "http://localhost:4000/v1/videos/edits" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{"prompt": "Make it brighter", "video": {"id": "video_123"}}' * ``` */ post: operations["video_edit_v1_videos_edits_post"]; @@ -20619,7 +20619,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1/videos/extensions" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{"prompt": "Continue the scene", "seconds": "5", "video": {"id": "video_123"}}' + * curl -X POST "http://localhost:4000/v1/videos/extensions" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{"prompt": "Continue the scene", "seconds": "5", "video": {"id": "video_123"}}' * ``` */ post: operations["video_extension_v1_videos_extensions_post"]; @@ -20645,7 +20645,7 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/videos/video_123" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/videos/video_123" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["video_status_v1_videos__video_id__get"]; @@ -20673,7 +20673,7 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/videos/{video_id}/content" -H "Authorization: Bearer sk-1234" --output video.mp4 + * curl -X GET "http://localhost:4000/v1/videos/{video_id}/content" -H "Authorization: Bearer $LITELLM_API_KEY" --output video.mp4 * ``` */ get: operations["video_content_v1_videos__video_id__content_get"]; @@ -20703,7 +20703,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1/videos/video_123/remix" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/videos/video_123/remix" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "prompt": "A new version with different colors" * }' * ``` @@ -20970,7 +20970,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1beta/interactions" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1beta/interactions" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "model": "gemini/gemini-2.5-flash", * "input": "Hello, how are you?" * }' @@ -21169,7 +21169,7 @@ export interface paths { * * Example Curl: * ``` - * curl -X GET "http://0.0.0.0:4000/key/info" -H "Authorization: Bearer sk-1234" -d {"keys": ["sk-1", "sk-2", "sk-3"]} + * curl -X GET "http://0.0.0.0:4000/key/info" -H "Authorization: Bearer $LITELLM_API_KEY" -d {"keys": ["sk-1", "sk-2", "sk-3"]} * ``` */ post: operations["info_key_fn_v2_v2_key_info_post"]; @@ -21226,7 +21226,7 @@ export interface paths { * Example request: * ``` * curl -X GET 'http://localhost:4000/v2/model/info?include_team_models=true&page=1&size=50' \ - * --header 'Authorization: Bearer sk-1234' + * --header "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Example response: @@ -21375,7 +21375,7 @@ export interface paths { * Example request: * ``` * curl -X GET 'http://localhost:4000/v2/user/info?user_id=user123' \ - * --header 'Authorization: Bearer sk-1234' + * --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["user_info_v2_v2_user_info_get"]; @@ -21963,7 +21963,7 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/videos" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/videos" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["video_list_videos_get"]; @@ -21977,7 +21977,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1/videos" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/videos" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "model": "sora-2", * "prompt": "A beautiful sunset over the ocean" * }' @@ -22008,7 +22008,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1/videos/characters" -H "Authorization: Bearer sk-1234" -F "video=@character_video.mp4" -F "name=my_character" + * curl -X POST "http://localhost:4000/v1/videos/characters" -H "Authorization: Bearer $LITELLM_API_KEY" -F "video=@character_video.mp4" -F "name=my_character" * ``` */ post: operations["video_create_character_videos_characters_post"]; @@ -22034,7 +22034,7 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/videos/characters/char_123" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/videos/characters/char_123" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["video_get_character_videos_characters__character_id__get"]; @@ -22064,7 +22064,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1/videos/edits" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{"prompt": "Make it brighter", "video": {"id": "video_123"}}' + * curl -X POST "http://localhost:4000/v1/videos/edits" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{"prompt": "Make it brighter", "video": {"id": "video_123"}}' * ``` */ post: operations["video_edit_videos_edits_post"]; @@ -22092,7 +22092,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1/videos/extensions" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{"prompt": "Continue the scene", "seconds": "5", "video": {"id": "video_123"}}' + * curl -X POST "http://localhost:4000/v1/videos/extensions" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{"prompt": "Continue the scene", "seconds": "5", "video": {"id": "video_123"}}' * ``` */ post: operations["video_extension_videos_extensions_post"]; @@ -22118,7 +22118,7 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/videos/video_123" -H "Authorization: Bearer sk-1234" + * curl -X GET "http://localhost:4000/v1/videos/video_123" -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["video_status_videos__video_id__get"]; @@ -22146,7 +22146,7 @@ export interface paths { * * Example: * ```bash - * curl -X GET "http://localhost:4000/v1/videos/{video_id}/content" -H "Authorization: Bearer sk-1234" --output video.mp4 + * curl -X GET "http://localhost:4000/v1/videos/{video_id}/content" -H "Authorization: Bearer $LITELLM_API_KEY" --output video.mp4 * ``` */ get: operations["video_content_videos__video_id__content_get"]; @@ -22176,7 +22176,7 @@ export interface paths { * * Example: * ```bash - * curl -X POST "http://localhost:4000/v1/videos/video_123/remix" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl -X POST "http://localhost:4000/v1/videos/video_123/remix" -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "prompt": "A new version with different colors" * }' * ``` @@ -22446,7 +22446,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/batches?limit=2 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" + * curl http://localhost:4000/v1/batches?limit=2 -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" * ``` */ get: operations["list_batches__provider__v1_batches_get"]; @@ -22459,7 +22459,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/batches -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{ + * curl http://localhost:4000/v1/batches -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -d '{ * "input_file_id": "file-abc123", * "endpoint": "/v1/chat/completions", * "completion_window": "24h" @@ -22488,7 +22488,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/batches/batch_abc123 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" + * curl http://localhost:4000/v1/batches/batch_abc123 -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" * ``` */ get: operations["retrieve_batch__provider__v1_batches__batch_id__get"]; @@ -22518,7 +22518,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/batches/batch_abc123/cancel -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -X POST + * curl http://localhost:4000/v1/batches/batch_abc123/cancel -H "Authorization: Bearer $LITELLM_API_KEY" -H "Content-Type: application/json" -X POST * * ``` */ @@ -22545,7 +22545,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/files -H "Authorization: Bearer sk-1234" + * curl http://localhost:4000/v1/files -H "Authorization: Bearer $LITELLM_API_KEY" * * ``` */ @@ -22560,7 +22560,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/files -H "Authorization: Bearer sk-1234" -F purpose="batch" -F file="@mydata.jsonl" + * curl http://localhost:4000/v1/files -H "Authorization: Bearer $LITELLM_API_KEY" -F purpose="batch" -F file="@mydata.jsonl" * -F expires_after[anchor]="created_at" -F expires_after[seconds]=2592000 * ``` */ @@ -22587,7 +22587,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/files/file-abc123 -H "Authorization: Bearer sk-1234" + * curl http://localhost:4000/v1/files/file-abc123 -H "Authorization: Bearer $LITELLM_API_KEY" * * ``` */ @@ -22629,7 +22629,7 @@ export interface paths { * * Example Curl * ``` - * curl http://localhost:4000/v1/files/file-abc123/content -H "Authorization: Bearer sk-1234" + * curl http://localhost:4000/v1/files/file-abc123/content -H "Authorization: Bearer $LITELLM_API_KEY" * * ``` */