From 0c2344614f340382654c80b076335e7e19a4c26d Mon Sep 17 00:00:00 2001 From: mateo Date: Fri, 11 Sep 2026 21:03:49 +0000 Subject: [PATCH 1/5] docs: replace the example master key sk-1234 with placeholders Shell and curl examples now reference $LITELLM_API_KEY, config examples use os.environ/LITELLM_MASTER_KEY, env files point at a generated placeholder, and code/docstring literals use sk- or sk- for managed virtual keys. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .env.example | 3 +- CONTRIBUTING.md | 2 +- README.md | 6 +- ...teLLM_Proxy_from_OpenAI_Azure_OpenAI.ipynb | 10 +- cookbook/Proxy_Batch_Users.ipynb | 2 +- cookbook/anthropic_agent_sdk/README.md | 4 +- cookbook/anthropic_agent_sdk/common.py | 2 +- .../batch_api/bedrock/bedrock.py | 2 +- .../mcp/mcp_with_litellm_proxy.py | 2 +- cookbook/livekit_agent_sdk/README.md | 6 +- .../livekit_agent_sdk/config.example.yaml | 2 +- cookbook/livekit_agent_sdk/main.py | 2 +- cookbook/misc/config.yaml | 2 +- cookbook/misc/migrate_proxy_config.py | 2 +- ...flow_langchain_tracing_litellm_proxy.ipynb | 2 +- .../mock_prompt_management_server/README.md | 2 +- cookbook/veo_video_generation.py | 6 +- .../management_endpoints/project_endpoints.py | 12 +- litellm/anthropic_interface/readme.md | 2 +- litellm/containers/README.md | 6 +- litellm/integrations/bitbucket/README.md | 2 +- litellm/integrations/gitlab/README.md | 2 +- .../logging_callback_manager.py | 2 +- litellm/proxy/_lazy_openapi_snapshot.json | 42 +- litellm/proxy/_new_secret_config.yaml | 2 +- litellm/proxy/auth/auth_utils.py | 2 +- litellm/proxy/auth/user_api_key_auth.py | 2 +- litellm/proxy/batches_endpoints/endpoints.py | 8 +- litellm/proxy/caching_routes.py | 4 +- litellm/proxy/common_utils/admin_ui_utils.py | 2 +- litellm/proxy/common_utils/debug_utils.py | 8 +- .../proxy/container_endpoints/endpoints.py | 16 +- litellm/proxy/dev_config.yaml | 2 +- .../adaptive_router_example.yaml | 2 +- .../example_config_yaml/oai_misc_config.yaml | 2 +- .../pass_through_config.yaml | 2 +- ...eject_clientside_metadata_tags_config.yaml | 2 +- .../tool_permission_example.yaml | 2 +- .../proxy/fine_tuning_endpoints/endpoints.py | 2 +- litellm/proxy/google_endpoints/endpoints.py | 2 +- .../generic_guardrail_api/example_config.yaml | 4 +- .../health_endpoints/_health_endpoints.py | 6 +- .../proxy/hooks/key_management_event_hooks.py | 4 +- litellm/proxy/image_endpoints/endpoints.py | 2 +- .../customer_endpoints.py | 18 +- .../internal_user_endpoints.py | 14 +- .../key_management_endpoints.py | 28 +- .../management_v1/budgets.py | 2 +- .../management_v1/spend_logs.py | 2 +- ...model_access_group_management_endpoints.py | 16 +- .../organization_endpoints.py | 10 +- .../team_callback_endpoints.py | 8 +- .../management_endpoints/team_endpoints.py | 28 +- litellm/proxy/ocr_endpoints/endpoints.py | 4 +- .../openai_files_endpoints/files_endpoints.py | 8 +- litellm/proxy/proxy_config.yaml | 2 +- litellm/proxy/proxy_server.py | 20 +- litellm/proxy/rag_endpoints/endpoints.py | 10 +- .../proxy/response_api_endpoints/endpoints.py | 20 +- litellm/proxy/search_endpoints/endpoints.py | 6 +- .../spend_management_endpoints.py | 32 +- .../proxy/vector_store_endpoints/endpoints.py | 4 +- litellm/proxy/video_endpoints/endpoints.py | 18 +- litellm/proxy/wildcard_config.yaml | 2 +- litellm/proxy/workflows/README.md | 8 +- proxy_server_config.yaml | 2 +- qa_sticky_session.sh | 6 +- scripts/adaptive_router_demo/README.md | 4 +- scripts/adaptive_router_demo/chat.html | 2 +- scripts/adaptive_router_demo/dashboard.html | 2 +- scripts/adaptive_router_demo/eval.py | 2 +- scripts/adaptive_router_demo/traffic.py | 2 +- scripts/benchmark_anthropic_messages_perf.py | 2 +- scripts/benchmark_chat_completions_perf.py | 2 +- scripts/benchmark_mock.py | 2 +- scripts/benchmark_proxy_vs_provider.py | 4 +- scripts/health_check/health_check_client.py | 2 +- .../run_parallel_health_checks.ps1 | 2 +- .../run_parallel_health_checks.sh | 2 +- .../_components/APIReferenceView.tsx | 4 +- .../_components/how_it_works.tsx | 2 +- .../components/chat_ui/AgentBuilderView.tsx | 2 +- .../prompt_editor_view/PromptCodeSnippets.tsx | 2 +- .../src/components/AIHub/ModelHubTable.tsx | 2 +- .../src/components/public_model_hub.tsx | 4 +- ui/litellm-dashboard/src/lib/http/schema.d.ts | 488 +++++++++--------- 86 files changed, 501 insertions(+), 500 deletions(-) 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..8aac812dbee 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 $LITELLM_API_KEY"} # 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 $LITELLM_API_KEY" } } } 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/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/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..9b0d175f715 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..d9615f200d9 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( 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..103473ac548 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..da06a1f26df 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..4b2710b7242 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 $LITELLM_API_KEY """ 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 53af85baac6..ae8aa736904 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": [ { @@ -44430,7 +44430,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": { @@ -44455,7 +44455,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 20ab9904f46..f84ef57df59 100644 --- a/litellm/proxy/auth/user_api_key_auth.py +++ b/litellm/proxy/auth/user_api_key_auth.py @@ -1300,7 +1300,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 $LITELLM_API_KEY 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 1d4024bb84e..899279ad671 100644
--- a/litellm/proxy/common_utils/debug_utils.py
+++ b/litellm/proxy/common_utils/debug_utils.py
@@ -252,7 +252,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
@@ -640,7 +640,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.
     """
@@ -702,10 +702,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..797a83a9460 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 bf527e1e868..268211d1694 100644
--- a/litellm/proxy/health_endpoints/_health_endpoints.py
+++ b/litellm/proxy/health_endpoints/_health_endpoints.py
@@ -265,7 +265,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:
@@ -2007,7 +2007,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": {
@@ -2020,7 +2020,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/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..6478b422213 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 d066f1e9138..afce31b06b2 100644
--- a/litellm/proxy/management_endpoints/internal_user_endpoints.py
+++ b/litellm/proxy/management_endpoints/internal_user_endpoints.py
@@ -501,7 +501,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"
@@ -907,7 +907,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
@@ -1060,7 +1060,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
@@ -1600,7 +1600,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",
@@ -1770,7 +1770,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": [
@@ -1791,7 +1791,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,
@@ -2291,7 +2291,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..5cfbe59181e 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..18691aabf37 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..202590d6457 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..5eaed74741b 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..b6424e4598f 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..ac1237b4b33 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 c050368b3fe..1910020323d 100644
--- a/litellm/proxy/management_endpoints/team_endpoints.py
+++ b/litellm/proxy/management_endpoints/team_endpoints.py
@@ -1255,7 +1255,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",
@@ -1267,7 +1267,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",
@@ -1961,7 +1961,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",
@@ -1972,7 +1972,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",
@@ -2356,7 +2356,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}
@@ -3090,7 +3090,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"}}'
 
@@ -3253,7 +3253,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' \
 
@@ -3775,7 +3775,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",
@@ -3908,7 +3908,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"]
@@ -4636,7 +4636,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"
@@ -4691,7 +4691,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"
@@ -5330,7 +5330,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:
@@ -5534,7 +5534,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",
@@ -5639,7 +5639,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 c8fd7edfed6..df884cf5e13 100644
--- a/litellm/proxy/proxy_server.py
+++ b/litellm/proxy/proxy_server.py
@@ -10919,7 +10919,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",
@@ -11083,7 +11083,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",
@@ -11263,7 +11263,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",
@@ -11371,7 +11371,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"}'
     ```
     """
@@ -13021,7 +13021,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
@@ -14259,7 +14259,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:
@@ -15227,7 +15227,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)
@@ -15289,7 +15289,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):
@@ -15297,7 +15297,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)
@@ -15305,7 +15305,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 da79328fa59..66e1d1fa4f6 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
@@ -3288,31 +3288,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
@@ -4088,7 +4088,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..03bb8ac3ef7 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/lib/http/schema.d.ts b/ui/litellm-dashboard/src/lib/http/schema.d.ts index dd455cba44a..a4d757633cf 100644 --- a/ui/litellm-dashboard/src/lib/http/schema.d.ts +++ b/ui/litellm-dashboard/src/lib/http/schema.d.ts @@ -438,7 +438,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: @@ -472,7 +472,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", @@ -512,7 +512,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: @@ -534,7 +534,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, @@ -565,7 +565,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: @@ -602,7 +602,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: @@ -634,7 +634,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: @@ -674,7 +674,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"] @@ -1579,7 +1579,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"]; @@ -1592,7 +1592,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" @@ -1621,7 +1621,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"]; @@ -1651,7 +1651,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 * * ``` */ @@ -1878,7 +1878,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"]; @@ -1905,7 +1905,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"]; @@ -2101,7 +2101,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": [ @@ -2558,7 +2558,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", @@ -3122,12 +3122,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"]; @@ -3141,7 +3141,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", @@ -3152,7 +3152,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" * }' * ``` @@ -3180,12 +3180,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"]; @@ -3200,12 +3200,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"]; @@ -3542,7 +3542,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"}] * }' @@ -3759,7 +3759,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": [, ...] * }' @@ -3810,7 +3810,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"] * }' * @@ -3840,7 +3840,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"]; @@ -3865,7 +3865,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"]; @@ -3925,7 +3925,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", @@ -3933,7 +3933,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"], @@ -3970,7 +3970,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": [, ...] * }' @@ -4021,13 +4021,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"], @@ -4092,7 +4092,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. */ @@ -4134,10 +4134,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. */ @@ -4167,7 +4167,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 @@ -4258,7 +4258,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" @@ -4292,7 +4292,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": [, ...] * }' @@ -4343,7 +4343,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"] * }' * @@ -4373,7 +4373,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"]; @@ -4398,7 +4398,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"]; @@ -4458,7 +4458,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", @@ -4466,7 +4466,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"], @@ -4503,7 +4503,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": [, ...] * }' @@ -4554,13 +4554,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"], @@ -4594,7 +4594,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": [ @@ -4629,7 +4629,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", @@ -4661,7 +4661,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" @@ -4813,7 +4813,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" * * ``` */ @@ -4828,7 +4828,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 * ``` */ @@ -4855,7 +4855,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" * * ``` */ @@ -4897,7 +4897,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" * * ``` */ @@ -4938,7 +4938,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": { @@ -5879,12 +5879,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"]; @@ -7009,7 +7009,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"]; @@ -7063,7 +7063,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": { @@ -7076,7 +7076,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": { @@ -7123,7 +7123,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"]; @@ -7171,7 +7171,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?" * }' @@ -7498,7 +7498,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" * }' * ``` @@ -7543,10 +7543,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"] @@ -7589,7 +7589,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"] * }' * ``` @@ -7680,7 +7680,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} * }' * ``` @@ -7718,7 +7718,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: @@ -7804,7 +7804,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 @@ -7905,7 +7905,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"] @@ -7983,7 +7983,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} * }' * ``` @@ -8042,7 +8042,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" * }' * ``` @@ -8132,8 +8132,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", @@ -8198,7 +8198,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"] @@ -8354,7 +8354,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"]; @@ -8388,7 +8388,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"]; @@ -8844,7 +8844,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"]; @@ -9134,18 +9134,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) @@ -9467,7 +9467,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"]; @@ -9494,7 +9494,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", @@ -9505,7 +9505,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 @@ -9588,7 +9588,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": [ @@ -9623,7 +9623,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", @@ -9655,7 +9655,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" @@ -9683,7 +9683,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"]; @@ -9807,13 +9807,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 @@ -9845,7 +9845,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"}] * }' @@ -9874,7 +9874,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?" * }' @@ -9908,10 +9908,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"]; @@ -9928,7 +9928,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"]; @@ -9958,10 +9958,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"]; @@ -10290,12 +10290,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"]; @@ -10338,7 +10338,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", @@ -10444,7 +10444,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", @@ -10459,7 +10459,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", @@ -11485,7 +11485,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"] @@ -11515,7 +11515,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"]; @@ -11541,7 +11541,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"]; @@ -11594,7 +11594,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", @@ -11621,7 +11621,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", @@ -11675,7 +11675,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", @@ -12054,7 +12054,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 @@ -12457,7 +12457,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"}}' * ``` @@ -12465,7 +12465,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", @@ -12476,7 +12476,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"}}' * ``` @@ -12510,7 +12510,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", @@ -12526,7 +12526,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", @@ -12732,13 +12732,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 @@ -12770,7 +12770,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"}] * }' @@ -12799,7 +12799,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?" * }' @@ -12833,10 +12833,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"]; @@ -12853,7 +12853,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"]; @@ -12883,10 +12883,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"]; @@ -13449,7 +13449,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"], @@ -13459,7 +13459,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, @@ -13522,7 +13522,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: @@ -13570,7 +13570,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"], @@ -13580,7 +13580,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, @@ -13997,7 +13997,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", @@ -14009,7 +14009,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": { @@ -14063,7 +14063,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"]; @@ -14097,27 +14097,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"]; @@ -14174,7 +14174,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"]; @@ -14225,7 +14225,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"]; @@ -14250,12 +14250,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"]; @@ -14289,12 +14289,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"]; @@ -14938,7 +14938,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" * }' * ``` @@ -14983,7 +14983,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": [ * { @@ -15090,7 +15090,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"] * }' * ``` @@ -15195,7 +15195,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: @@ -15229,7 +15229,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"}}' * * ``` */ @@ -15258,7 +15258,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", @@ -15339,7 +15339,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"] * }' @@ -15371,7 +15371,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"] * }' @@ -15453,7 +15453,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"}] @@ -15462,7 +15462,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" @@ -15607,7 +15607,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" * }' * ``` @@ -15676,7 +15676,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 * }' @@ -15684,7 +15684,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 * }' @@ -15722,7 +15722,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} * }' * ``` @@ -15746,7 +15746,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 @@ -15797,7 +15797,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"} @@ -15841,7 +15841,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 @@ -15877,7 +15877,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"]; @@ -16457,7 +16457,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", @@ -16475,7 +16475,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", @@ -16570,7 +16570,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"] @@ -16634,7 +16634,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"]; @@ -16757,7 +16757,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" * }' @@ -16808,7 +16808,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" * }' @@ -16900,7 +16900,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"]; @@ -17443,7 +17443,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"]; @@ -17456,7 +17456,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" @@ -17485,7 +17485,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"]; @@ -17515,7 +17515,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 * * ``` */ @@ -17542,7 +17542,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": [ @@ -17577,7 +17577,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", @@ -17609,12 +17609,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"]; @@ -17628,7 +17628,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", @@ -17639,7 +17639,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" * }' * ``` @@ -17667,12 +17667,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"]; @@ -17687,12 +17687,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"]; @@ -17770,7 +17770,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" @@ -18060,7 +18060,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" * * ``` */ @@ -18075,7 +18075,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 * ``` */ @@ -18102,7 +18102,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" * * ``` */ @@ -18144,7 +18144,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" * * ``` */ @@ -18185,7 +18185,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": { @@ -18266,7 +18266,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"]; @@ -18305,7 +18305,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"]; @@ -18315,7 +18315,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", @@ -18992,7 +18992,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"]; @@ -19154,7 +19154,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"]; @@ -19181,7 +19181,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", @@ -19192,7 +19192,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 @@ -19225,7 +19225,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"}}' * ``` @@ -19233,7 +19233,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", @@ -19244,7 +19244,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"}}' * ``` @@ -19278,7 +19278,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", @@ -19294,7 +19294,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", @@ -19437,13 +19437,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 @@ -19475,7 +19475,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"}] * }' @@ -19504,7 +19504,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?" * }' @@ -19538,10 +19538,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"]; @@ -19558,7 +19558,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"]; @@ -19588,10 +19588,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"]; @@ -19666,7 +19666,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"], @@ -19676,7 +19676,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, @@ -19739,7 +19739,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: @@ -19787,7 +19787,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"], @@ -19797,7 +19797,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, @@ -20481,7 +20481,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"]; @@ -20495,7 +20495,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" * }' @@ -20526,7 +20526,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"]; @@ -20552,7 +20552,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"]; @@ -20582,7 +20582,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"]; @@ -20610,7 +20610,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"]; @@ -20636,7 +20636,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"]; @@ -20664,7 +20664,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"]; @@ -20694,7 +20694,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" * }' * ``` @@ -20961,7 +20961,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?" * }' @@ -21160,7 +21160,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"]; @@ -21217,7 +21217,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: @@ -21366,7 +21366,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"]; @@ -21954,7 +21954,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"]; @@ -21968,7 +21968,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" * }' @@ -21999,7 +21999,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"]; @@ -22025,7 +22025,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"]; @@ -22055,7 +22055,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"]; @@ -22083,7 +22083,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"]; @@ -22109,7 +22109,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"]; @@ -22137,7 +22137,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"]; @@ -22167,7 +22167,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" * }' * ``` @@ -22437,7 +22437,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"]; @@ -22450,7 +22450,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" @@ -22479,7 +22479,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"]; @@ -22509,7 +22509,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 * * ``` */ @@ -22536,7 +22536,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" * * ``` */ @@ -22551,7 +22551,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 * ``` */ @@ -22578,7 +22578,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" * * ``` */ @@ -22620,7 +22620,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" * * ``` */ From ac801bcdc7b57c4dfe4fbd1f9eb89770635e3669 Mon Sep 17 00:00:00 2001 From: mateo Date: Fri, 11 Sep 2026 21:16:49 +0000 Subject: [PATCH 2/5] docs: use a literal placeholder key in non-shell examples Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- README.md | 4 ++-- litellm/litellm_core_utils/logging_callback_manager.py | 2 +- litellm/proxy/auth/user_api_key_auth.py | 2 +- .../src/components/routing_groups/RoutingGroupUsagePanel.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8aac812dbee..334b6824117 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 $LITELLM_API_KEY"} # 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) @@ -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 $LITELLM_API_KEY" + "x-litellm-api-key": "Bearer sk-" } } } diff --git a/litellm/litellm_core_utils/logging_callback_manager.py b/litellm/litellm_core_utils/logging_callback_manager.py index 4b2710b7242..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 $LITELLM_API_KEY + Authorization: Bearer sk- """ callback_config: Final = litellm.callback_settings.get(callback) diff --git a/litellm/proxy/auth/user_api_key_auth.py b/litellm/proxy/auth/user_api_key_auth.py index f84ef57df59..57a6abda8c0 100644 --- a/litellm/proxy/auth/user_api_key_auth.py +++ b/litellm/proxy/auth/user_api_key_auth.py @@ -1300,7 +1300,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 $LITELLM_API_KEY + # 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/ui/litellm-dashboard/src/components/routing_groups/RoutingGroupUsagePanel.tsx b/ui/litellm-dashboard/src/components/routing_groups/RoutingGroupUsagePanel.tsx index fafea569012..206ef8d1174 100644 --- a/ui/litellm-dashboard/src/components/routing_groups/RoutingGroupUsagePanel.tsx +++ b/ui/litellm-dashboard/src/components/routing_groups/RoutingGroupUsagePanel.tsx @@ -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}", ) From 94a4982feee6424d93b62bacd2e4b236ead5c675 Mon Sep 17 00:00:00 2001 From: mateo Date: Fri, 11 Sep 2026 21:21:53 +0000 Subject: [PATCH 3/5] docs: scrub the remaining low-entropy example keys Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../ai_coding_tool_guides/claude_code_quickstart/guide.md | 2 +- cookbook/nova_sonic_realtime.py | 2 +- litellm/proxy/auth/user_api_key_auth.py | 4 ++-- litellm/proxy/hooks/model_max_budget_limiter.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) 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/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/litellm/proxy/auth/user_api_key_auth.py b/litellm/proxy/auth/user_api_key_auth.py index 57a6abda8c0..4362ef3a87b 100644 --- a/litellm/proxy/auth/user_api_key_auth.py +++ b/litellm/proxy/auth/user_api_key_auth.py @@ -386,7 +386,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: @@ -482,7 +482,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: 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) From 237a66a615cb3988344832bb040a697bf080971c Mon Sep 17 00:00:00 2001 From: mateo Date: Fri, 11 Sep 2026 21:38:12 +0000 Subject: [PATCH 4/5] docs: double-quote shell variables in curl header examples Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- README.md | 2 +- .../management_endpoints/project_endpoints.py | 12 +- litellm/anthropic_interface/readme.md | 2 +- litellm/integrations/bitbucket/README.md | 2 +- litellm/integrations/gitlab/README.md | 2 +- litellm/proxy/_lazy_openapi_snapshot.json | 20 +-- .../generic_guardrail_api/example_config.yaml | 4 +- .../health_endpoints/_health_endpoints.py | 6 +- .../customer_endpoints.py | 14 +- .../internal_user_endpoints.py | 12 +- .../key_management_endpoints.py | 16 +- .../management_v1/budgets.py | 2 +- .../management_v1/spend_logs.py | 2 +- ...model_access_group_management_endpoints.py | 16 +- .../organization_endpoints.py | 10 +- .../team_callback_endpoints.py | 8 +- .../management_endpoints/team_endpoints.py | 28 +-- litellm/proxy/proxy_server.py | 14 +- .../spend_management_endpoints.py | 4 +- .../proxy/vector_store_endpoints/endpoints.py | 4 +- .../routing_groups/RoutingGroupUsagePanel.tsx | 2 +- ui/litellm-dashboard/src/lib/http/schema.d.ts | 168 +++++++++--------- 22 files changed, 175 insertions(+), 175 deletions(-) diff --git a/README.md b/README.md index 334b6824117..e23ef223b54 100644 --- a/README.md +++ b/README.md @@ -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 $LITELLM_API_KEY' \ + -H "Authorization: Bearer $LITELLM_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "model": "gpt-4o", diff --git a/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py b/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py index 9b0d175f715..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 $LITELLM_API_KEY' \\ + --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 $LITELLM_API_KEY' \\ + --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 $LITELLM_API_KEY' \\ + --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 $LITELLM_API_KEY' \\ + --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 $LITELLM_API_KEY' + --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 $LITELLM_API_KEY' + --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 d9615f200d9..40dc3a6213e 100644 --- a/litellm/anthropic_interface/readme.md +++ b/litellm/anthropic_interface/readme.md @@ -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/integrations/bitbucket/README.md b/litellm/integrations/bitbucket/README.md index 103473ac548..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 $LITELLM_API_KEY' \ +-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 da06a1f26df..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 $LITELLM_API_KEY' \ +-H "Authorization: Bearer $LITELLM_API_KEY" \ -d '{ "model": "my-gitlab-model", "messages": [{"role": "user", "content": "IGNORED"}], diff --git a/litellm/proxy/_lazy_openapi_snapshot.json b/litellm/proxy/_lazy_openapi_snapshot.json index ae8aa736904..7ec13a91565 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 $LITELLM_API_KEY'\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 $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", + "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 $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", + "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 $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", + "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 $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", + "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 $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", + "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 $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", + "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 $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", + "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": [ { @@ -44430,7 +44430,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 $LITELLM_API_KEY'\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": { @@ -44455,7 +44455,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 $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```", + "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/guardrails/guardrail_hooks/generic_guardrail_api/example_config.yaml b/litellm/proxy/guardrails/guardrail_hooks/generic_guardrail_api/example_config.yaml index 797a83a9460..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 $LITELLM_API_KEY' \ +# --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 $LITELLM_API_KEY' \ +# --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 268211d1694..811be48fb28 100644 --- a/litellm/proxy/health_endpoints/_health_endpoints.py +++ b/litellm/proxy/health_endpoints/_health_endpoints.py @@ -265,7 +265,7 @@ async def health_services_endpoint( Example: ``` curl -L -X GET 'http://0.0.0.0:4000/health/services?service=datadog' \ - -H 'Authorization: Bearer $LITELLM_API_KEY' + -H "Authorization: Bearer $LITELLM_API_KEY" ``` """ try: @@ -2007,7 +2007,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 $LITELLM_API_KEY' \\ + -H "Authorization: Bearer $LITELLM_API_KEY" \\ -H 'Content-Type: application/json' \\ -d '{ "litellm_params": { @@ -2020,7 +2020,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 $LITELLM_API_KEY' \\ + -H "Authorization: Bearer $LITELLM_API_KEY" \\ -H 'Content-Type: application/json' \\ -d '{ "litellm_params": { diff --git a/litellm/proxy/management_endpoints/customer_endpoints.py b/litellm/proxy/management_endpoints/customer_endpoints.py index 6478b422213..8088b85fce4 100644 --- a/litellm/proxy/management_endpoints/customer_endpoints.py +++ b/litellm/proxy/management_endpoints/customer_endpoints.py @@ -358,7 +358,7 @@ async def new_end_user( Example curl: ``` curl --location 'http://0.0.0.0:4000/customer/new' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --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 $LITELLM_API_KEY' \ + -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 $LITELLM_API_KEY' + -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 $LITELLM_API_KEY' \ + --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 $LITELLM_API_KEY' \ + --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 $LITELLM_API_KEY' \ + --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 $LITELLM_API_KEY' + --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 afce31b06b2..8817515d7ab 100644 --- a/litellm/proxy/management_endpoints/internal_user_endpoints.py +++ b/litellm/proxy/management_endpoints/internal_user_endpoints.py @@ -907,7 +907,7 @@ async def user_info( Example request ``` curl -X GET 'http://localhost:4000/user/info?user_id=krrish7%40berri.ai' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' + --header "Authorization: Bearer $LITELLM_API_KEY" ``` """ from litellm.proxy.proxy_server import model_max_budget_limiter, prisma_client @@ -1060,7 +1060,7 @@ async def user_info_v2( Example request: ``` curl -X GET 'http://localhost:4000/v2/user/info?user_id=user123' \\ - --header 'Authorization: Bearer $LITELLM_API_KEY' + --header "Authorization: Bearer $LITELLM_API_KEY" ``` """ from litellm.proxy.proxy_server import model_max_budget_limiter, prisma_client @@ -1600,7 +1600,7 @@ async def user_update( ``` curl --location 'http://0.0.0.0:4000/user/update' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "user_id": "test-litellm-user-4", @@ -1770,7 +1770,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 $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "users": [ @@ -1791,7 +1791,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 $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "all_users": true, @@ -2291,7 +2291,7 @@ async def delete_user( ``` curl --location 'http://0.0.0.0:4000/user/delete' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --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 5cfbe59181e..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 $LITELLM_API_KEY' \ + --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 $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "permissions": {"allow_pii_controls": true} @@ -3015,7 +3015,7 @@ async def update_key_fn( Example: ```bash curl --location 'http://0.0.0.0:4000/key/update' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "key": "sk-", @@ -3224,7 +3224,7 @@ async def bulk_update_keys( Example request: ```bash curl --location 'http://0.0.0.0:4000/key/bulk_update' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "keys": [ @@ -3662,7 +3662,7 @@ async def delete_key_fn( Example: ```bash curl --location 'http://0.0.0.0:4000/key/delete' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "keys": ["sk-QWrxEynunsNpV1zT48HIrw"] @@ -5243,7 +5243,7 @@ async def regenerate_key_fn( Example: ```bash curl --location --request POST 'http://localhost:4000/key/sk-/regenerate' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --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 $LITELLM_API_KEY' \ + --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 $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "key": "sk-Fn8Ej39NxjAXrvpUGKghGw" diff --git a/litellm/proxy/management_endpoints/management_v1/budgets.py b/litellm/proxy/management_endpoints/management_v1/budgets.py index 18691aabf37..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 $LITELLM_API_KEY' + --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 202590d6457..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 $LITELLM_API_KEY' + --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 5eaed74741b..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 $LITELLM_API_KEY' \\ + -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 $LITELLM_API_KEY' + -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 $LITELLM_API_KEY' + -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 $LITELLM_API_KEY' \\ + -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 $LITELLM_API_KEY' + -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 $LITELLM_API_KEY' + -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 $LITELLM_API_KEY' \\ + -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 $LITELLM_API_KEY' + -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 b6424e4598f..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 $LITELLM_API_KEY' \ + --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 $LITELLM_API_KEY' \ + --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 $LITELLM_API_KEY' + --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 $LITELLM_API_KEY' + --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 $LITELLM_API_KEY' \ + -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 ac1237b4b33..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 $LITELLM_API_KEY' \ + -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 $LITELLM_API_KEY' + -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 $LITELLM_API_KEY' + -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 $LITELLM_API_KEY' + -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 1910020323d..799eeaa649e 100644 --- a/litellm/proxy/management_endpoints/team_endpoints.py +++ b/litellm/proxy/management_endpoints/team_endpoints.py @@ -1255,7 +1255,7 @@ async def new_team( Example Request: ``` curl --location 'http://0.0.0.0:4000/team/new' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "team_alias": "my-new-team_2", @@ -1267,7 +1267,7 @@ async def new_team( ``` curl --location 'http://0.0.0.0:4000/team/new' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "team_alias": "QA Prod Bot", @@ -1961,7 +1961,7 @@ async def update_team( ``` curl --location 'http://0.0.0.0:4000/team/update' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data-raw '{ "team_id": "8d916b1c-510d-4894-a334-1c16a93344f5", @@ -1972,7 +1972,7 @@ async def update_team( Example - Update Team `max_budget` budget ``` curl --location 'http://0.0.0.0:4000/team/update' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data-raw '{ "team_id": "8d916b1c-510d-4894-a334-1c16a93344f5", @@ -2356,7 +2356,7 @@ async def patch_team( ``` curl --location --request PATCH 'http://0.0.0.0:4000/team/8d916b1c-510d-4894-a334-1c16a93344f5' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data-raw '{ "metadata": {"cost_center": "1234", "deprecated_key": null} @@ -3090,7 +3090,7 @@ async def team_member_add( ``` curl -X POST 'http://0.0.0.0:4000/team/member_add' \ - -H 'Authorization: Bearer $LITELLM_API_KEY' \ + -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"}}' @@ -3253,7 +3253,7 @@ async def team_member_delete( ``` curl -X POST 'http://0.0.0.0:8000/team/member_delete' \ - -H 'Authorization: Bearer $LITELLM_API_KEY' \ + -H "Authorization: Bearer $LITELLM_API_KEY" \ -H 'Content-Type: application/json' \ @@ -3775,7 +3775,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 $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "team_id": "team-1234", @@ -3908,7 +3908,7 @@ async def delete_team( ``` curl --location 'http://0.0.0.0:4000/team/delete' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data-raw '{ "team_ids": ["8d916b1c-510d-4894-a334-1c16a93344f5"] @@ -4636,7 +4636,7 @@ async def block_team( Example: ``` curl --location 'http://0.0.0.0:4000/team/block' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "team_id": "team-1234" @@ -4691,7 +4691,7 @@ async def unblock_team( Example: ``` curl --location 'http://0.0.0.0:4000/team/unblock' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "team_id": "team-1234" @@ -5330,7 +5330,7 @@ async def list_team( """ ``` curl --location --request GET 'http://0.0.0.0:4000/team/list' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' + --header "Authorization: Bearer $LITELLM_API_KEY" ``` Parameters: @@ -5534,7 +5534,7 @@ async def team_model_add( Example Request: ``` curl --location 'http://0.0.0.0:4000/team/model/add' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "team_id": "team-1234", @@ -5639,7 +5639,7 @@ async def team_model_delete( Example Request: ``` curl --location 'http://0.0.0.0:4000/team/model/delete' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ "team_id": "team-1234", diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index df884cf5e13..473da5f9d16 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -11371,7 +11371,7 @@ async def moderations( ``` curl --location 'http://0.0.0.0:4000/moderations' \ --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer $LITELLM_API_KEY' \ + --header "Authorization: Bearer $LITELLM_API_KEY" \ --data '{"input": "Sample text goes here", "model": "text-moderation-stable"}' ``` """ @@ -13021,7 +13021,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 $LITELLM_API_KEY' + --header "Authorization: Bearer $LITELLM_API_KEY" ``` """ from litellm.litellm_core_utils.get_llm_provider_logic import declared_authenticating_provider @@ -14259,7 +14259,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 $LITELLM_API_KEY' + --header "Authorization: Bearer $LITELLM_API_KEY" ``` Example response: @@ -15227,7 +15227,7 @@ async def model_deprecations( Example: ```shell curl -X GET 'http://localhost:4000/model/deprecations' \\ - -H 'Authorization: Bearer $LITELLM_API_KEY' + -H "Authorization: Bearer $LITELLM_API_KEY" ``` """ return collect_model_deprecations(llm_router=llm_router, warn_within_days=warn_within_days) @@ -15289,7 +15289,7 @@ async def model_group_info( curl -X 'GET' \ 'http://localhost:4000/model_group/info' \ -H 'accept: application/json' \ - -H 'x-api-key: $LITELLM_API_KEY' + -H "x-api-key: $LITELLM_API_KEY" ``` Example Request (Specific Model Group): @@ -15297,7 +15297,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 $LITELLM_API_KEY' + -H "Authorization: Bearer $LITELLM_API_KEY" ``` Example Request (Specific Wildcard Model Group): (e.g. `model_name: openai/*` on config.yaml) @@ -15305,7 +15305,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: Bearer $LITELLM_API_KEY' + -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/spend_tracking/spend_management_endpoints.py b/litellm/proxy/spend_tracking/spend_management_endpoints.py index 66e1d1fa4f6..ecc3b5d66ec 100644 --- a/litellm/proxy/spend_tracking/spend_management_endpoints.py +++ b/litellm/proxy/spend_tracking/spend_management_endpoints.py @@ -2168,7 +2168,7 @@ async def calculate_spend(request: SpendCalculateRequest): ``` curl --location 'http://localhost:4000/spend/calculate' - --header 'Authorization: Bearer $LITELLM_API_KEY' + --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 $LITELLM_API_KEY' + --header "Authorization: Bearer $LITELLM_API_KEY" --header 'Content-Type: application/json' --data '{ "completion_response": { diff --git a/litellm/proxy/vector_store_endpoints/endpoints.py b/litellm/proxy/vector_store_endpoints/endpoints.py index 03bb8ac3ef7..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 $LITELLM_API_KEY' \ + -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 $LITELLM_API_KEY' + -H "Authorization: Bearer $LITELLM_API_KEY" ``` """ from litellm.proxy.proxy_server import prisma_client diff --git a/ui/litellm-dashboard/src/components/routing_groups/RoutingGroupUsagePanel.tsx b/ui/litellm-dashboard/src/components/routing_groups/RoutingGroupUsagePanel.tsx index 206ef8d1174..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!"}] diff --git a/ui/litellm-dashboard/src/lib/http/schema.d.ts b/ui/litellm-dashboard/src/lib/http/schema.d.ts index a4d757633cf..29e27c1d5f6 100644 --- a/ui/litellm-dashboard/src/lib/http/schema.d.ts +++ b/ui/litellm-dashboard/src/lib/http/schema.d.ts @@ -438,7 +438,7 @@ export interface paths { * Example: * ```bash * curl -X GET 'http://localhost:4000/access_group/list' \ - * -H 'Authorization: Bearer $LITELLM_API_KEY' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Returns: @@ -472,7 +472,7 @@ export interface paths { * Example: * ```bash * curl -X POST 'http://localhost:4000/access_group/new' \ - * -H 'Authorization: Bearer $LITELLM_API_KEY' \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H 'Content-Type: application/json' \ * -d '{ * "access_group": "production-models", @@ -512,7 +512,7 @@ export interface paths { * Example: * ```bash * curl -X GET 'http://localhost:4000/access_group/production-models/budget' \ - * -H 'Authorization: Bearer $LITELLM_API_KEY' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Parameters: @@ -534,7 +534,7 @@ export interface paths { * Example: * ```bash * curl -X PUT 'http://localhost:4000/access_group/production-models/budget' \ - * -H 'Authorization: Bearer $LITELLM_API_KEY' \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H 'Content-Type: application/json' \ * -d '{ * "max_budget": 100.0, @@ -565,7 +565,7 @@ export interface paths { * Example: * ```bash * curl -X DELETE 'http://localhost:4000/access_group/production-models/budget' \ - * -H 'Authorization: Bearer $LITELLM_API_KEY' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Parameters: @@ -602,7 +602,7 @@ export interface paths { * Example: * ```bash * curl -X DELETE 'http://localhost:4000/access_group/production-models/delete' \ - * -H 'Authorization: Bearer $LITELLM_API_KEY' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Parameters: @@ -634,7 +634,7 @@ export interface paths { * Example: * ```bash * curl -X GET 'http://localhost:4000/access_group/production-models/info' \ - * -H 'Authorization: Bearer $LITELLM_API_KEY' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Parameters: @@ -674,7 +674,7 @@ export interface paths { * Example: * ```bash * curl -X PUT 'http://localhost:4000/access_group/production-models/update' \ - * -H 'Authorization: Bearer $LITELLM_API_KEY' \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H 'Content-Type: application/json' \ * -d '{ * "model_names": ["gpt-4", "claude-3-sonnet"] @@ -3810,7 +3810,7 @@ export interface paths { * * Example curl: * ``` - * curl --location 'http://0.0.0.0:4000/customer/delete' --header 'Authorization: Bearer $LITELLM_API_KEY' --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"] * }' * @@ -3840,7 +3840,7 @@ export interface paths { * * Example curl: * ``` - * curl -X GET 'http://localhost:4000/customer/info?end_user_id=test-litellm-user-4' -H 'Authorization: Bearer $LITELLM_API_KEY' + * 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"]; @@ -3865,7 +3865,7 @@ export interface paths { * * Example curl: * ``` - * curl --location --request GET 'http://0.0.0.0:4000/customer/list' --header 'Authorization: Bearer $LITELLM_API_KEY' + * 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"]; @@ -3925,7 +3925,7 @@ export interface paths { * * Example curl: * ``` - * curl --location 'http://0.0.0.0:4000/customer/new' --header 'Authorization: Bearer $LITELLM_API_KEY' --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", @@ -3933,7 +3933,7 @@ export interface paths { * }' * * # With object permissions - * curl -L -X POST 'http://localhost:4000/customer/new' -H 'Authorization: Bearer $LITELLM_API_KEY' -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"], @@ -4021,13 +4021,13 @@ export interface paths { * * Example curl: * ``` - * curl --location 'http://0.0.0.0:4000/customer/update' --header 'Authorization: Bearer $LITELLM_API_KEY' --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 $LITELLM_API_KEY' --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"], @@ -4343,7 +4343,7 @@ export interface paths { * * Example curl: * ``` - * curl --location 'http://0.0.0.0:4000/customer/delete' --header 'Authorization: Bearer $LITELLM_API_KEY' --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"] * }' * @@ -4373,7 +4373,7 @@ export interface paths { * * Example curl: * ``` - * curl -X GET 'http://localhost:4000/customer/info?end_user_id=test-litellm-user-4' -H 'Authorization: Bearer $LITELLM_API_KEY' + * 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"]; @@ -4398,7 +4398,7 @@ export interface paths { * * Example curl: * ``` - * curl --location --request GET 'http://0.0.0.0:4000/customer/list' --header 'Authorization: Bearer $LITELLM_API_KEY' + * 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"]; @@ -4458,7 +4458,7 @@ export interface paths { * * Example curl: * ``` - * curl --location 'http://0.0.0.0:4000/customer/new' --header 'Authorization: Bearer $LITELLM_API_KEY' --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", @@ -4466,7 +4466,7 @@ export interface paths { * }' * * # With object permissions - * curl -L -X POST 'http://localhost:4000/customer/new' -H 'Authorization: Bearer $LITELLM_API_KEY' -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"], @@ -4554,13 +4554,13 @@ export interface paths { * * Example curl: * ``` - * curl --location 'http://0.0.0.0:4000/customer/update' --header 'Authorization: Bearer $LITELLM_API_KEY' --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 $LITELLM_API_KEY' --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"], @@ -7009,7 +7009,7 @@ export interface paths { * * Example: * ``` - * curl -L -X GET 'http://0.0.0.0:4000/health/services?service=datadog' -H 'Authorization: Bearer $LITELLM_API_KEY' + * 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"]; @@ -7063,7 +7063,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 $LITELLM_API_KEY' \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H 'Content-Type: application/json' \ * -d '{ * "litellm_params": { @@ -7076,7 +7076,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 $LITELLM_API_KEY' \ + * -H "Authorization: Bearer $LITELLM_API_KEY" \ * -H 'Content-Type: application/json' \ * -d '{ * "litellm_params": { @@ -7498,7 +7498,7 @@ export interface paths { * * Example: * ```bash - * curl --location 'http://0.0.0.0:4000/key/block' --header 'Authorization: Bearer $LITELLM_API_KEY' --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" * }' * ``` @@ -7543,7 +7543,7 @@ export interface paths { * * Example request: * ```bash - * curl --location 'http://0.0.0.0:4000/key/bulk_update' --header 'Authorization: Bearer $LITELLM_API_KEY' --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-", @@ -7589,7 +7589,7 @@ export interface paths { * * Example: * ```bash - * curl --location 'http://0.0.0.0:4000/key/delete' --header 'Authorization: Bearer $LITELLM_API_KEY' --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"] * }' * ``` @@ -7680,7 +7680,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 $LITELLM_API_KEY' --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} * }' * ``` @@ -7905,7 +7905,7 @@ export interface paths { * * Example: * ```bash - * curl --location --request POST 'http://localhost:4000/key/sk-/regenerate' --header 'Authorization: Bearer $LITELLM_API_KEY' --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"] @@ -7983,7 +7983,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 $LITELLM_API_KEY' --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} * }' * ``` @@ -8042,7 +8042,7 @@ export interface paths { * * Example: * ```bash - * curl --location 'http://0.0.0.0:4000/key/unblock' --header 'Authorization: Bearer $LITELLM_API_KEY' --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" * }' * ``` @@ -8132,7 +8132,7 @@ export interface paths { * * Example: * ```bash - * curl --location 'http://0.0.0.0:4000/key/update' --header 'Authorization: Bearer $LITELLM_API_KEY' --header 'Content-Type: application/json' --data '{ + * 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", @@ -8198,7 +8198,7 @@ export interface paths { * * Example: * ```bash - * curl --location --request POST 'http://localhost:4000/key/sk-/regenerate' --header 'Authorization: Bearer $LITELLM_API_KEY' --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"] @@ -8354,7 +8354,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 $LITELLM_API_KEY' + * 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"]; @@ -8388,7 +8388,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 $LITELLM_API_KEY' + * 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"]; @@ -8844,7 +8844,7 @@ export interface paths { * Example: * ```shell * curl -X GET 'http://localhost:4000/model/deprecations' \ - * -H 'Authorization: Bearer $LITELLM_API_KEY' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["model_deprecations_model_deprecations_get"]; @@ -9134,18 +9134,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: $LITELLM_API_KEY' + * 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 $LITELLM_API_KEY' + * 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: Bearer $LITELLM_API_KEY' + * -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) @@ -9467,7 +9467,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 $LITELLM_API_KEY' --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"]; @@ -10290,12 +10290,12 @@ export interface paths { * * Example: * ``` - * curl --location --request GET 'http://0.0.0.0:4000/organization/list?org_alias=my-org' --header 'Authorization: Bearer $LITELLM_API_KEY' + * 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 $LITELLM_API_KEY' + * 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"]; @@ -10338,7 +10338,7 @@ export interface paths { * * Example: * ``` - * curl -X POST 'http://0.0.0.0:4000/organization/member_add' -H 'Authorization: Bearer $LITELLM_API_KEY' -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", @@ -10444,7 +10444,7 @@ export interface paths { * * ```bash * curl --location 'http://0.0.0.0:4000/organization/new' - * --header 'Authorization: Bearer $LITELLM_API_KEY' + * --header "Authorization: Bearer $LITELLM_API_KEY" * --header 'Content-Type: application/json' * --data '{ * "organization_alias": "my-secret-org", @@ -10459,7 +10459,7 @@ export interface paths { * * ```bash * curl --location 'http://0.0.0.0:4000/organization/new' - * --header 'Authorization: Bearer $LITELLM_API_KEY' + * --header "Authorization: Bearer $LITELLM_API_KEY" * --header 'Content-Type: application/json' * --data '{ * "organization_alias": "my-secret-org", @@ -11485,7 +11485,7 @@ export interface paths { * Example: * ```bash * curl --location --request DELETE 'http://0.0.0.0:4000/project/delete' \ - * --header 'Authorization: Bearer $LITELLM_API_KEY' \ + * --header "Authorization: Bearer $LITELLM_API_KEY" \ * --header 'Content-Type: application/json' \ * --data '{ * "project_ids": ["project-123", "project-456"] @@ -11515,7 +11515,7 @@ export interface paths { * Example: * ```bash * curl --location 'http://0.0.0.0:4000/project/info?project_id=project-123' \ - * --header 'Authorization: Bearer $LITELLM_API_KEY' + * --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["project_info_project_info_get"]; @@ -11541,7 +11541,7 @@ export interface paths { * Example: * ```bash * curl --location 'http://0.0.0.0:4000/project/list' \ - * --header 'Authorization: Bearer $LITELLM_API_KEY' + * --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["list_projects_project_list_get"]; @@ -11594,7 +11594,7 @@ export interface paths { * * ```bash * curl --location 'http://0.0.0.0:4000/project/new' \ - * --header 'Authorization: Bearer $LITELLM_API_KEY' \ + * --header "Authorization: Bearer $LITELLM_API_KEY" \ * --header 'Content-Type: application/json' \ * --data '{ * "project_alias": "flight-search-assistant", @@ -11621,7 +11621,7 @@ export interface paths { * * ```bash * curl --location 'http://0.0.0.0:4000/project/new' \ - * --header 'Authorization: Bearer $LITELLM_API_KEY' \ + * --header "Authorization: Bearer $LITELLM_API_KEY" \ * --header 'Content-Type: application/json' \ * --data '{ * "project_alias": "hotel-recommendations", @@ -11675,7 +11675,7 @@ export interface paths { * Example: * ```bash * curl --location 'http://0.0.0.0:4000/project/update' \ - * --header 'Authorization: Bearer $LITELLM_API_KEY' \ + * --header "Authorization: Bearer $LITELLM_API_KEY" \ * --header 'Content-Type: application/json' \ * --data '{ * "project_id": "project-123", @@ -13997,7 +13997,7 @@ export interface paths { * * ``` * curl --location 'http://localhost:4000/spend/calculate' - * --header 'Authorization: Bearer $LITELLM_API_KEY' + * --header "Authorization: Bearer $LITELLM_API_KEY" * --header 'Content-Type: application/json' * --data '{ * "model": "anthropic.claude-v2", @@ -14009,7 +14009,7 @@ export interface paths { * * ``` * curl --location 'http://localhost:4000/spend/calculate' - * --header 'Authorization: Bearer $LITELLM_API_KEY' + * --header "Authorization: Bearer $LITELLM_API_KEY" * --header 'Content-Type: application/json' * --data '{ * "completion_response": { @@ -14938,7 +14938,7 @@ export interface paths { * * Example: * ``` - * curl --location 'http://0.0.0.0:4000/team/block' --header 'Authorization: Bearer $LITELLM_API_KEY' --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" * }' * ``` @@ -14983,7 +14983,7 @@ export interface paths { * * Example request: * ```bash - * curl --location 'http://0.0.0.0:4000/team/bulk_member_add' --header 'Authorization: Bearer $LITELLM_API_KEY' --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": [ * { @@ -15090,7 +15090,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 $LITELLM_API_KEY' --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"] * }' * ``` @@ -15195,7 +15195,7 @@ export interface paths { /** * List Team * @description ``` - * curl --location --request GET 'http://0.0.0.0:4000/team/list' --header 'Authorization: Bearer $LITELLM_API_KEY' + * curl --location --request GET 'http://0.0.0.0:4000/team/list' --header "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Parameters: @@ -15229,7 +15229,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 $LITELLM_API_KEY' -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"}}' * * ``` */ @@ -15258,7 +15258,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 $LITELLM_API_KEY' + * -H "Authorization: Bearer $LITELLM_API_KEY" * -H 'Content-Type: application/json' * -d '{ * "team_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", @@ -15339,7 +15339,7 @@ export interface paths { * * Example Request: * ``` - * curl --location 'http://0.0.0.0:4000/team/model/add' --header 'Authorization: Bearer $LITELLM_API_KEY' --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"] * }' @@ -15371,7 +15371,7 @@ export interface paths { * * Example Request: * ``` - * curl --location 'http://0.0.0.0:4000/team/model/delete' --header 'Authorization: Bearer $LITELLM_API_KEY' --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"] * }' @@ -15453,7 +15453,7 @@ export interface paths { * * Example Request: * ``` - * curl --location 'http://0.0.0.0:4000/team/new' --header 'Authorization: Bearer $LITELLM_API_KEY' --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"}] @@ -15462,7 +15462,7 @@ export interface paths { * ``` * * ``` - * curl --location 'http://0.0.0.0:4000/team/new' --header 'Authorization: Bearer $LITELLM_API_KEY' --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" @@ -15607,7 +15607,7 @@ export interface paths { * * Example: * ``` - * curl --location 'http://0.0.0.0:4000/team/unblock' --header 'Authorization: Bearer $LITELLM_API_KEY' --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" * }' * ``` @@ -15676,7 +15676,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 $LITELLM_API_KEY' --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 * }' @@ -15684,7 +15684,7 @@ export interface paths { * * Example - Update Team `max_budget` budget * ``` - * curl --location 'http://0.0.0.0:4000/team/update' --header 'Authorization: Bearer $LITELLM_API_KEY' --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 * }' @@ -15722,7 +15722,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 $LITELLM_API_KEY' --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} * }' * ``` @@ -15746,7 +15746,7 @@ export interface paths { * * Example curl: * ``` - * curl -X GET 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' -H 'Authorization: Bearer $LITELLM_API_KEY' + * 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 @@ -15797,7 +15797,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 $LITELLM_API_KEY' -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"} @@ -15841,7 +15841,7 @@ export interface paths { * * Example curl: * ``` - * curl -X DELETE 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback/langsmith' -H 'Authorization: Bearer $LITELLM_API_KEY' + * 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 @@ -15877,7 +15877,7 @@ export interface paths { * * Example curl: * ``` - * curl -X POST 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/disable_logging' -H 'Authorization: Bearer $LITELLM_API_KEY' + * 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"]; @@ -16457,7 +16457,7 @@ export interface paths { * * Example request for specific users: * ```bash - * curl --location 'http://0.0.0.0:4000/user/bulk_update' --header 'Authorization: Bearer $LITELLM_API_KEY' --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", @@ -16475,7 +16475,7 @@ export interface paths { * * Example request for all users: * ```bash - * curl --location 'http://0.0.0.0:4000/user/bulk_update' --header 'Authorization: Bearer $LITELLM_API_KEY' --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", @@ -16570,7 +16570,7 @@ export interface paths { * * ``` * curl --location 'http://0.0.0.0:4000/user/delete' - * --header 'Authorization: Bearer $LITELLM_API_KEY' + * --header "Authorization: Bearer $LITELLM_API_KEY" * --header 'Content-Type: application/json' * --data-raw '{ * "user_ids": ["45e3e396-ee08-4a61-a88e-16b3ce7e0849"] @@ -16634,7 +16634,7 @@ export interface paths { * * Example request * ``` - * curl -X GET 'http://localhost:4000/user/info?user_id=krrish7%40berri.ai' --header 'Authorization: Bearer $LITELLM_API_KEY' + * 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"]; @@ -16808,7 +16808,7 @@ export interface paths { * @description Example curl * * ``` - * curl --location 'http://0.0.0.0:4000/user/update' --header 'Authorization: Bearer $LITELLM_API_KEY' --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" * }' @@ -16900,7 +16900,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 $LITELLM_API_KEY' + * 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"]; @@ -18305,7 +18305,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 $LITELLM_API_KEY' + * 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"]; @@ -18315,7 +18315,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 $LITELLM_API_KEY' -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", @@ -18992,7 +18992,7 @@ export interface paths { * Example: * ```shell * curl -X GET 'http://localhost:4000/model/deprecations' \ - * -H 'Authorization: Bearer $LITELLM_API_KEY' + * -H "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["model_deprecations_v1_model_deprecations_get"]; @@ -19154,7 +19154,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 $LITELLM_API_KEY' --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"]; @@ -21217,7 +21217,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 $LITELLM_API_KEY' + * --header "Authorization: Bearer $LITELLM_API_KEY" * ``` * * Example response: @@ -21366,7 +21366,7 @@ export interface paths { * Example request: * ``` * curl -X GET 'http://localhost:4000/v2/user/info?user_id=user123' \ - * --header 'Authorization: Bearer $LITELLM_API_KEY' + * --header "Authorization: Bearer $LITELLM_API_KEY" * ``` */ get: operations["user_info_v2_v2_user_info_get"]; From b9e92fbd5edce9c424bfffc7f0cf3bd950545b38 Mon Sep 17 00:00:00 2001 From: mateo Date: Fri, 11 Sep 2026 21:55:11 +0000 Subject: [PATCH 5/5] ci: pass LITELLM_MASTER_KEY to the build_and_test proxy container Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) 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 \