All Products
Search
Document Center

AI Guardrails:UpdateImageLib

Last Updated:Mar 31, 2026

Modifies the name, category, moderation scenario, business scenarios, or enabled status of an image library.

Operation description

Call this operation to update the basic information of an image library. For information about constructing an HTTP request, see Request structure. To use an existing HTTP client, see SDK overview.

Billing: This operation is free of charge.

QPS limits

This operation is limited to 10 calls per second per account. Throttling is triggered when the limit is exceeded. Design your client to stay within this limit.

Request parameters

For the common request parameters required by all AI Guardrails API requests, see Common parameters.

The following table describes the parameters in the request body.

ParameterTypeRequiredExampleDescription
IdIntegerYes2147The primary key ID of the image library.
NameStringYestest2sdkdkThe name of the image library.
CategoryStringYesBLACKThe category of the image library. Valid values:
  • BLACK: blacklist
  • WHITE: whitelist
  • REVIEW: review list
SceneStringYesPORNThe moderation scenario to which the image library applies. Valid values:
  • PORN: pornography detection
  • AD: ad detection
  • ILLEGAL: terrorist content detection
BizTypesListNo["bizTypeA", "bizTypeB", "bizTypeC"]The business scenarios associated with the image library. To get valid BizType values, call CreateBizType.
EnableBooleanNotrueSpecifies whether to enable the image library. Valid values: true (enabled), false (disabled).

Response parameters

This operation returns only common response parameters. For details, see Common response parameters.

ParameterTypeExampleDescription
requestIdString795D8871-4889-4C0F-A8B1-C7D2B990FF61The request ID.
codeInteger200The HTTP status code. A value of 200 indicates success.

Examples

Sample request

http(s)://green.cn-shanghai.aliyuncs.com/?Action=UpdateImageLib&ServiceModule=open_api
&<Common request parameters>
{
  "Id": 2147,
  "Name": "test2sdkdk",
  "Category": "BLACK",
  "Scene": "PORN",
  "BizTypes": [
    "bizTypeA",
    "bizTypeB",
    "bizTypeC"
  ]
}

Sample success response

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