The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
docs(virtual_keys.md): add enable/disable virtual keys to docs + refactor sidebar
Krrish Dholakia16c8549b773d
diff --git a/docs/my-website/docs/proxy/cost_tracking.md b/docs/my-website/docs/proxy/cost_tracking.mdindex 5e755e26c1f..03341309932 100644--- a/docs/my-website/docs/proxy/cost_tracking.md+++ b/docs/my-website/docs/proxy/cost_tracking.md@@ -10,7 +10,7 @@ Track spend for keys, users, and teams across 100+ LLMs.**Step 1**-👉 [Setup LiteLLM with a Database](https://docs.litellm.ai/docs/proxy/deploy)+👉 [Setup LiteLLM with a Database](https://docs.litellm.ai/docs/proxy/virtual_keys#setup)**Step2** Send `/chat/completions` request@@ -151,7 +151,7 @@ Navigate to the Usage Tab on the LiteLLM UI (found on https://your-proxy-endpoin</Tabs>## ✨ (Enterprise) API Endpoints to get Spend-#### Getting Spend Reports - To Charge Other Teams, Customers, Users+### Getting Spend Reports - To Charge Other Teams, Customers, UsersUse the `/global/spend/report` endpoint to get spend reports@@ -159,7 +159,7 @@ Use the `/global/spend/report` endpoint to get spend reports<TabItem value="per team" label="Spend Per Team">-##### Example Request+#### Example Request👉 Key Change: Specify `group_by=team`@@ -168,7 +168,7 @@ curl -X GET 'http://localhost:4000/global/spend/report?start_date=2024-04-01&end-H 'Authorization: Bearer sk-1234'```-##### Example Response+#### Example Response<Tabs><TabItem value="response" label="Expected Response">@@ -292,7 +292,7 @@ Customer This is the value of `user_id` passed when calling [`/key/generate`](ht:::-##### Example Request+#### Example Request👉 Key Change: Specify `group_by=customer`@@ -302,7 +302,7 @@ curl -X GET 'http://localhost:4000/global/spend/report?start_date=2024-04-01&end-H 'Authorization: Bearer sk-1234'```-##### Example Response+#### Example Response```shell@@ -359,7 +359,7 @@ curl -X GET 'http://localhost:4000/global/spend/report?start_date=2024-04-01&end-H 'Authorization: Bearer sk-1234'```-##### Example Response+#### Example Response```shell@@ -406,7 +406,7 @@ curl -X GET 'http://localhost:4000/global/spend/report?start_date=2024-04-01&end-H 'Authorization: Bearer sk-1234'```-##### Example Response+#### Example Response```shell@@ -472,7 +472,7 @@ curl -X GET 'http://localhost:4000/global/spend/report?start_date=2024-04-01&end</Tabs>-#### Allowing Non-Proxy Admins to access `/spend` endpoints+### Allowing Non-Proxy Admins to access `/spend` endpointsUse this when you want non-proxy admins to access `/spend` endpoints@@ -572,7 +572,7 @@ model_list:👉 Head to [Custom Input/Output Pricing](https://docs.litellm.ai/docs/proxy/custom_pricing) to setup custom pricing or your models-## ✨ Custom k,v pairs+## ✨ Custom Spend Log metadataLog specific key,value pairs as part of the metadata for a spend logdiff --git a/docs/my-website/docs/proxy/demo.md b/docs/my-website/docs/proxy/demo.mdindex d4bcf81a2ce..c4b8671aab9 100644--- a/docs/my-website/docs/proxy/demo.md+++ b/docs/my-website/docs/proxy/demo.md@@ -1,4 +1,4 @@-# 🎉 Demo App+# Demo AppHere is a demo of the proxy. To log in pass in:diff --git a/docs/my-website/docs/proxy/user_keys.md b/docs/my-website/docs/proxy/user_keys.mdindex 18b6a360523..e0227d390c9 100644--- a/docs/my-website/docs/proxy/user_keys.md+++ b/docs/my-website/docs/proxy/user_keys.md@@ -1,7 +1,7 @@import Tabs from '@theme/Tabs';import TabItem from '@theme/TabItem';-# 💡 Migrating from OpenAI (Langchain, OpenAI SDK, LlamaIndex, Instructor, Curl)+# Langchain, OpenAI SDK, LlamaIndex, Instructor, Curl examplesLiteLLM Proxy is **OpenAI-Compatible**, and supports:* /chat/completionsdiff --git a/docs/my-website/docs/proxy/virtual_keys.md b/docs/my-website/docs/proxy/virtual_keys.mdindex 692d153fc27..6d889045757 100644--- a/docs/my-website/docs/proxy/virtual_keys.md+++ b/docs/my-website/docs/proxy/virtual_keys.md@@ -598,6 +598,44 @@ client = openai.OpenAI(</TabItem></Tabs>+### Enable/Disable Virtual Keys++**Disable Keys**++```bash+curl -L -X POST 'http://0.0.0.0:4000/key/block' \+-H 'Authorization: Bearer LITELLM_MASTER_KEY' \+-H 'Content-Type: application/json' \+-d '{"key": "KEY-TO-BLOCK"}'+```++Expected Response:++```bash+{+ ...+ "blocked": true+}+```++**Enable Keys**++```bash+curl -L -X POST 'http://0.0.0.0:4000/key/unblock' \+-H 'Authorization: Bearer LITELLM_MASTER_KEY' \+-H 'Content-Type: application/json' \+-d '{"key": "KEY-TO-UNBLOCK"}'+```+++```bash+{+ ...+ "blocked": false+}+```++### Custom AuthYou can now override the default api key auth.diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.jsindex b6ac55bb939..f1549da0a69 100644--- a/docs/my-website/sidebars.js+++ b/docs/my-website/sidebars.js@@ -31,6 +31,7 @@ const sidebars = {"proxy/quick_start","proxy/docker_quick_start","proxy/deploy",+ "proxy/demo","proxy/prod",{type: "category",@@ -44,9 +45,23 @@ const sidebars = {},"proxy/enterprise","proxy/user_keys",- "proxy/demo","proxy/configs","proxy/reliability",+ {+ type: "category",+ label: "🔑 Authentication",+ items: ["proxy/virtual_keys", "proxy/token_auth", "proxy/oauth2"],+ },+ {+ type: "category",+ label: "💸 Spend Tracking + Budgets",+ items: ["proxy/cost_tracking", "proxy/users", "proxy/custom_pricing", "proxy/team_budgets", "proxy/billing", "proxy/customers"],+ },+ {+ type: "category",+ label: "Routing",+ items: ["proxy/load_balancing", "proxy/tag_routing", "proxy/team_based_routing", "proxy/customer_routing",],+ },{type: "category",label: "Use with Provider SDKs",@@ -59,9 +74,6 @@ const sidebars = {"pass_through/langfuse"],},- "proxy/cost_tracking",- "proxy/custom_pricing",- "proxy/virtual_keys",{type: "category",label: "Admin UI",@@ -94,24 +106,10 @@ const sidebars = {"oidc"]},- "proxy/tag_routing",- "proxy/users",- "proxy/team_budgets",- "proxy/customers",- "proxy/billing",- "proxy/token_auth",- "proxy/oauth2","proxy/caching","proxy/pass_through","proxy/email","proxy/multiple_admins",- "proxy/team_based_routing",- "proxy/customer_routing",- {- type: "category",- label: "Extra Load Balancing",- items: ["proxy/load_balancing"],- },"proxy/model_management","proxy/health","proxy/debugging",