Image Review Interface
Interface Description
This interface is used to request the image review service. The image review service is an intelligent image review service provided by Baidu AI Cloud externally. It can review images from multiple dimensions, including pornograph, terror, politician, disgusting images, and advertisement.
**Descriptions:** To use this interface, you need to enable the image review service on the console first. url: The fixed value is $(img-censor) without modificaiton. parameters: This value is generated through the Base64 coding of the image review parameter. The image review parameter is still a JSON string.
The list of sub-services supported by the image review service includes:
- ocr: Optical character recognition
- face: Face detection
- antiporn: Pornographic recognition
- politician: Politician recognition
- terror: Terror recognition
- public: Public figures recognition
- disgust: Disgusting image recognition
- watermark: Watermark QR code recognition
- quality: Image quality recognition
For detailed explanations of sub-service request parameters and return parameters, see the detailed explanation below.
Request URI
POST /v1/{bucketName}/{objectKey}?process
Parameter Name | Parameter Type | Required | Description | Example Value | Parameter Position |
---|---|---|---|---|---|
bucketName | String | Yes | Bucket name | "bucketName_example" | Path |
objectKey | String | Yes | Object name | "objectKey_example" | Path |
Request Body Parameters
Description of Data Structure for Request Body Field
Parameter Name | Parameter Type | Required? | Description | Example Value |
---|---|---|---|---|
action | Action | No |
Description of Data Structure for Action Field
Parameter Name | Parameter Type | Required? | Description | Example Value |
---|---|---|---|---|
sync | List |
No |
Instructions for Data Structure of Sync Field
Parameter Name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
url | String | No | The fixed value is $(img-censor), which does not need to be modified. | $(img-censor) |
parameters | String | No | This value is generated through the Base64 encoding of the image review parameter. The image review parameter is still a JSON string | <base64_encode(param)> |
Response Body Parameters
Description of Data Structure for Response Body Field
Request Example
POST /v1/bucketName_example/objectKey_example?process
Common Request Header
{
"action" : {
"sync" : [ {
"parameters" : "<base64_encode(param)>",
"url" : "$(img-censor)"
} ]
}
}
Response Example
HTTP/1.1 200 OK
<Common response header>
{ }
Error Code
Refer to the universal error code.