Delete LLM Provider
Endpoint
DELETE /apiops/projects/{projectName}/llm-providers/{providerName}/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| providerName | string | Yes | LLM provider name to delete |
Query Parameters
None
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"deploymentResult": {
"success": true
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Response status: SUCCESS or FAILURE |
| deploymentResult | object | Deployment outcome for the undeploy operation |
| deploymentResult.success | boolean | true when the provider was removed and undeployed |
EnumStatus
SUCCESS- Operation successfulFAILURE- Operation failed
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "LLM provider (name: deepseek-primary) was not found!"
}
or
{
"status": "FAILURE",
"resultMessage": "LLM provider name can not be empty!"
}
or, when the provider is still referenced somewhere:
{
"status": "FAILURE",
"resultMessage": "This LLM provider is in use and cannot be deleted. Remove the references first: API Proxy: chat-gateway, Global Policy: shared-semantic-cache"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X DELETE \
"https://demo.apinizer.com/apiops/projects/MyProject/llm-providers/deepseek-primary/" \
-H "Authorization: Bearer YOUR_TOKEN"
Permissions
- User must have
AI_DEVELOPMENT+MANAGEpermission in the project
Notes and Warnings
- Name-based Deletion:
- The provider is located by
name(case-insensitive); a non-existent name returns a400 Bad Requestwith a "was not found" message
- The provider is located by
- Undeploy on Delete:
- Deletion removes the provider from the database and undeploys it from the AI Gateway workers
- Providers in Use Are Blocked:
- A provider that is still referenced anywhere cannot be deleted: the request is rejected with
400 Bad Requestand the message names each reference. Remove or repoint those references first. - The check covers four containers — API Proxy, Proxy Group, Policy Group and standalone (global) policies — across an API Proxy's AI routing (primary provider, failover chain, conditional routes, primary pool, semantic embedding provider), the embedding provider of Semantic Cache and RAG Injection policies, and the external guardrail provider of Prompt Guard and Topic Guard policies.
usedByRefsfrom Get LLM Provider lists the referencing API proxies; it is a narrower view than the delete guard, which also inspects proxy groups, policy groups and global policies. Treat an emptyusedByRefsas "no proxy uses it", not as "the delete will succeed".
- A provider that is still referenced anywhere cannot be deleted: the request is rejected with
- Irreversible:
- There is no soft-delete; deletion is permanent
Related Documentation
- Get LLM Provider - Check
usedByRefsbefore deleting (proxies only; see the warning above) - List LLM Providers - List all providers in a project
- Create LLM Provider - Create or upsert a provider
- LLM Providers API - Resource overview and permissions