Submits feedback on an incorrect image moderation result. The feedback takes effect the next time the same image is moderated.
This operation is free of charge.
QPS limits
This operation supports up to 20 calls per second per account. Exceeding this limit triggers throttling, which may affect your service.
Request parameters
For common parameters required in all Alibaba Cloud AI Guardrails API requests, see Common parameters.
The request body is a JSON object. The following table describes the parameters.
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
taskId | String | No | xxx | The ID of the moderation task, returned by the AI Guardrails server. Uniquely identifies the moderation task. |
suggestion | String | No | block | The expected moderation result. If specified, you must also specify scenes. Valid values: pass, block. See the Suggestion values table below. |
url | String | No | http://www.aliyundoc.com | The URL of the image. Required to add the image to the feedback-based image library in the Alibaba Cloud AI Guardrails console. |
scenes | StringArray | No | ["ad","terrorism"] | The moderation scenarios to apply feedback to. Valid values: porn, terrorism, ad. Multiple values are supported. |
note | String | No | xxx | A description for the feedback record. |
label | String | No | normal | The expected result category for the image in the specified moderation scenario. For valid values per scenario, see the scenes and label parameters in Synchronous moderation. |
Suggestion values
| Value | Meaning | Effect |
|---|---|---|
pass | The image is normal. | The image is added to the feedback-based image library in the Alibaba Cloud AI Guardrails console. |
block | The image contains violations. | — |
Scenes values
| Value | Description |
|---|---|
porn | Pornography detection |
terrorism | Terrorist content detection |
ad | Ad detection |
Response parameters
The data field in the response body is empty. For common response parameters, see Common response parameters.
Examples
The following example submits feedback that an image at a given URL should be classified as block for the ad and terrorism scenarios. Specifying url adds the image to the feedback-based image library in the console.
Sample request
http(s)://[Endpoint]/green/image/feedback
&<Common request parameters>{
"suggestion": "block",
"scenes": [
"ad",
"terrorism"
],
"url": "http://www.aliyundoc.com"
}Sample response
{
"code": 200,
"msg": "OK",
"requestId": "EE5A1189-4D7B-4C24-AD78-4C1FAA3E7A0C"
}