All Products
Search
Document Center

AI Guardrails:Create an image library

Last Updated:Mar 31, 2026

Creates a custom image library for use in content moderation workflows.

Usage notes

  • The maximum number of image libraries you can create through this operation equals the limit enforced in the Alibaba Cloud Content Moderation console. Both methods share the same quota.

  • This operation is free of charge.

  • QPS limit: 10 requests per second per Alibaba Cloud account. Requests that exceed this limit are throttled.

For common request parameters and how to construct an HTTP request, see Common parameters and Request structure. To use an SDK instead, see SDK overview.

Request parameters

The following parameters are required in the request body. For common request parameters, see Common parameters.

ParameterTypeRequiredExampleDescription
NameStringYestest1sdkdkThe name of the image library.
CategoryStringYesBLACKThe category of the image library. Valid values:
  • BLACK: a blacklist
  • WHITE: a whitelist
  • REVIEW: a review list
SceneStringYesPORNThe moderation scenario to which the custom image library applies. Valid values:
  • PORN: pornography detection
  • AD: ad detection
  • ILLEGAL: terrorist content detection
BizTypesListNo["bizTypeA", "bizTypeB", "bizTypeC"]The business scenarios associated with this image library. For more information, see CreateBizType.
EnableBooleanNotrueSpecifies whether to enable the image library. Valid values: true (default) and false.

Response parameters

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

Examples

Sample request

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

Sample response

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