All Products
Search
Document Center

AI Guardrails:/green/text/feedback

Last Updated:Mar 31, 2026

Provides feedback on invalid moderation results returned by Alibaba Cloud AI Guardrails for a text moderation task.

QPS limits

This operation supports up to 20 calls per second per account. Exceeding this limit triggers throttling, which may affect your business. Plan your call rate accordingly.

Request parameters

For common parameters required in all AI Guardrails API requests, see Common parameters.

The request body is a JSON array. Each element contains the following parameters.

ParameterTypeRequiredExampleDescription
taskIdStringYestaskid xxxThe ID of the moderation task, as returned by the AI Guardrails server, which uniquely identifies the moderation task.
dataIdStringNotest7fcmzGkKbNp7@JqPQRnwIe-1mwwZXThe ID of the moderated content, specified in the dataId parameter of the original moderation request.
contentStringNofoobarThe text content that was moderated. Maximum length: 10,000 characters.
labelStringNospamThe expected moderation category for the text in the specified moderation scenario. For valid values, see Text moderation.
noteStringNoblabla...A description of the moderated text, such as keywords in the content.
The label value determines how the text is added to the feedback-based text library in the AI Guardrails console:
normal: adds the text to the whitelist
Any other value: adds the text to the block list

Response parameters

For common response parameters, see Common response parameters.

The data field in the response body is empty.

Examples

Sample request

http(s)://[Endpoint]/green/text/feedback
&<Common request parameters>
{
  "dataId": "test7fcmzGkKbNp7@JqPQRnwIe-1mwwZX",
  "taskId": "taskid xxx",
  "content": "foobar",
  "label": "spam",
  "note": "blabla..."
}

Sample response

{
  "msg": "OK",
  "code": 200,
  "requestId": "02C418E7-81D4-4375-9732-900B64D07CEE"
}