For AI agents: a documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Retrieve, update, and delete individual custom LLM providers
Supports both internal (JWT) and public (API key) authentication.
- Internal API: Returns all fields
- Public API: Hides internal fields (litellm_provider_id, is_managed, moderation)
Access control (layered):
1. SuperAdminMixin: Routes queryset (superadmins see all, users see own org)
+ auto-registers ObjectOwnershipPermission for object-level ownership checks
2. Server-side org assignment: Prevents cross-org writes via request body
Endpoints:
Platform (JWT auth, uses numeric pk):
GET /llm_models/custom_providers/{pk}/ - Retrieve a specific custom provider
PATCH /llm_models/custom_providers/{pk}/ - Update a specific custom provider
DELETE /llm_models/custom_providers/{pk}/ - Delete a specific custom provider
Public API (API key auth, uses provider_id string):
GET /api/providers/{provider_id}/ - Retrieve a specific custom provider
PATCH /api/providers/{provider_id}/ - Update a specific custom provider
DELETE /api/providers/{provider_id}/ - Delete a specific custom provider
Args (PATCH):
- provider_name (Optional): Updated provider name
- litellm_provider_id (Optional): Updated base provider ID
- moderation (Optional): Updated moderation setting
- extra_kwargs (Optional): Updated additional configuration (all credentials live here)
* api_key: Updated provider API key
* base_url: Updated custom base URL for the provider's API
* temperature: Updated default temperature setting
* max_tokens: Updated default max tokens setting
* timeout: Updated request timeout in seconds
Returns (GET):
{
"id": 123,
"provider_id": "my-custom-openai",
"provider_name": "My Custom OpenAI Provider",
"litellm_provider_id": "openai",
"moderation": "filtered",
"extra_kwargs": {
"api_key": "sk-custom-key-123",
"base_url": "https://api.my-custom-provider.com/v1",
"temperature": 0.7,
"max_tokens": 4096
},
"organization": 456,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T11:00:00Z"
}
Returns (PATCH):
{
"id": 123,
"provider_id": "my-custom-openai",
"provider_name": "My Updated Custom OpenAI Provider",
"extra_kwargs": {
"api_key": "sk-updated-key-456",
"base_url": "https://api.my-updated-provider.com/v1",
"temperature": 0.8,
"max_tokens": 8192
},
...
}
Authentication
AuthorizationBearer
Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, OpenAI or Azure OpenAI provider credentials go in Settings -> Providers or the request body credential_override field, not in this auth field.
OR
AuthorizationBearer
Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.
Path parameters
provider_idstringRequired
Retrieve, update, and delete individual custom LLM providers
Supports both internal (JWT) and public (API key) authentication.
Internal API: Returns all fields
Public API: Hides internal fields (litellm_provider_id, is_managed, moderation)
Access control (layered):
SuperAdminMixin: Routes queryset (superadmins see all, users see own org)
auto-registers ObjectOwnershipPermission for object-level ownership checks
Server-side org assignment: Prevents cross-org writes via request body
Endpoints:
Platform (JWT auth, uses numeric pk):
GET /llm_models/custom_providers/{pk}/ - Retrieve a specific custom provider
PATCH /llm_models/custom_providers/{pk}/ - Update a specific custom provider
DELETE /llm_models/custom_providers/{pk}/ - Delete a specific custom provider
Public API (API key auth, uses provider_id string):
GET /api/providers/{provider_id}/ - Retrieve a specific custom provider
PATCH /api/providers/{provider_id}/ - Update a specific custom provider
DELETE /api/providers/{provider_id}/ - Delete a specific custom provider
Args (PATCH):
provider_name (Optional): Updated provider name
litellm_provider_id (Optional): Updated base provider ID
moderation (Optional): Updated moderation setting
extra_kwargs (Optional): Updated additional configuration (all credentials live here)
api_key: Updated provider API key
base_url: Updated custom base URL for the provider’s API