This topic describes how to call the CreateImageLib operation to create an image library.
Description
Operation: CreateImageLib
You can call this operation to create a custom similar image library.
Note The maximum number of image libraries equals the number of image libraries created
by using this operation plus the number of image libraries created in the Alibaba
Cloud Content Moderation console.
Request parameters
For more information about the common request parameters that must be included in all Content Moderation API requests, see Common request parameters.
The following table describes the parameters in the request body.
Parameter | Type | Required | Description |
---|---|---|---|
Name | String | Yes | The name of the image library. |
Category | String | Yes | The category of the image library. Valid values:
|
ServiceModule | String | Yes | The name of the service module to which the image library is applied. Valid value: open_api (indicates the Content Moderation API). |
Scene | String | Yes | The moderation scenario to which the custom image library applies. Valid values:
|
BizTypes | List | No | The business type of the custom image library that you set on the Moderation Policy tab (by choosing Settings > Moderation API). |
Enable | Boolean | No | Specifies whether to enable the image library. A value of true indicates that the image library is enabled, and a value of false indicates that the image library is disabled. |
Response parameters
For more information about common response parameters that this operation returns, see Common response parameters.
Examples
Sample requests
{
"Name": "test1sdkdk",
"BizTypes": [],
"Category": "BLACK",
"ServiceModule": "open_api",
"ResourceType": "IMAGE",
"Scene": "PORN"
}
Sample success responses
{
"requestId": "795D8871-4889-4C0F-A8B1-C7D2B990FF61",
"code": 200
}