Ana içeriğe geç

Delete LLM Provider

Endpoint

DELETE /apiops/projects/{projectName}/llm-providers/{providerName}/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
providerNamestringYesLLM provider name to delete

Query Parameters

None

Response

Success Response (200 OK)

{
"status": "SUCCESS",
"deploymentResult": {
"success": true
}
}

Response Fields

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
deploymentResultobjectDeployment outcome for the undeploy operation
deploymentResult.successbooleantrue when the provider was removed and undeployed

EnumStatus

  • SUCCESS - Operation successful
  • FAILURE - 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 + MANAGE permission in the project

Notes and Warnings

  • Name-based Deletion:
    • The provider is located by name (case-insensitive); a non-existent name returns a 400 Bad Request with a "was not found" message
  • 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 Request and 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.
    • usedByRefs from 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 empty usedByRefs as "no proxy uses it", not as "the delete will succeed".
  • Irreversible:
    • There is no soft-delete; deletion is permanent