All Products
Search
Document Center

AI Guardrails:Delete a text library

Last Updated:Mar 31, 2026

Deletes a custom text library used for text anti-spam. Deleted libraries cannot be restored.

Warning

This action is irreversible. Deleting a text library permanently removes it. Proceed with caution.

Operation: DeleteKeywordLib

Managing text libraries via API has the same effect as managing them in the Alibaba Cloud AI Guardrails console.

For details on constructing HTTP requests, see Request structure. To use an SDK instead, see SDK overview.

Billing: Free of charge.

QPS limits

Up to 10 calls per second per account. Exceeding this limit triggers throttling.

Request parameters

In addition to the common parameters required by all API requests, include the following parameter in the request body.

ParameterTypeRequiredExampleDescription
IdIntegerYes2147The primary key ID of the text library.

Response parameters

This operation returns only common response parameters. No operation-specific response parameters are returned.

Examples

Request example

http(s)://green.cn-shanghai.aliyuncs.com/?Action=DeleteKeywordLib&ServiceModule=open_api
&<Common request parameters>
{
  "Id": 2147
}

Response example

{
  "requestId": "795D8871-4889-4C0F-A8B1-C7D2B990FF61",
  "code": 200
}