Control Public & Private Routes
info
Requires a LiteLLM Enterprise License. Get a free trial.
Control which routes require authentication and which routes are publicly accessible.
Route Types​
| Route Type | Requires Auth | Description |
|---|---|---|
public_routes | No | Routes accessible without any authentication |
admin_only_routes | Yes (Admin only) | Routes only accessible by Proxy Admin |
allowed_routes | Yes | Routes exposed on the proxy. If not set, all routes are exposed |
Quick Start​
Make Routes Public​
Allow specific routes to be accessed without authentication:
general_settings:
master_key: sk-1234
public_routes: ["LiteLLMRoutes.public_routes", "/spend/calculate"]
Restrict Routes to Admin Only​
Restrict certain routes to only be accessible by Proxy Admin:
general_settings:
master_key: sk-1234
admin_only_routes: ["/key/generate", "/key/delete"]
Limit Available Routes​
Only expose specific routes on the proxy:
general_settings:
master_key: sk-1234
allowed_routes: ["/chat/completions", "/embeddings", "LiteLLMRoutes.public_routes"]