This topic describes the common response parameters and common error codes for calling the Content Moderation API operations.
Common response parameters
Responses to all requests are JSON-formatted data. The following table describes the common response parameters.
Parameter | Type | Description |
Code | Integer | The HTTP status code returned for the moderation task.
For more information, see Common error codes. |
Msg | String | The details of the error. |
RequestId | String | The unique ID of the request, which can be used to locate issues. |
Data |
| The service-related response data. This parameter may be left empty when an error occurs. Generally, the value is a JSON structure or array. |
Common error codes
Code | Msg | Description |
200 | OK | The request was successful. |
280 | PROCESSING | The task is running. We recommend that you wait for a while (such as 5 seconds) and start the query again. |
400 | BAD_REQUEST | The request is invalid. This error is usually caused by invalid request parameters. Check whether the request parameters are valid. |
401 | NOT_ALLOWED | The URL contained in the request redirects to an insecure image or video. |
403 | FORBIDDEN | The URL is inaccessible. Check whether the URL can be accessed from the Internet and whether hotlink protection is configured. |
404 | NOT_FOUND | The content to be moderated is not found. This is usually because your image or video content cannot be downloaded. Make sure that the content is accessible from the Internet. |
480 | DOWNLOAD_FAILED | The download failed. If the size and resolution of the content can be obtained, make sure that the size and resolution are allowed by the API. |
500 | GENERAL_ERROR | A temporary server error occurred. We recommend that you try again. If the error persists, submit a ticket on Support and Services. |
503 | ServiceUnavailable | A system error occurred. We recommend that you check whether the domain name in the request is normal. If you confirm that the domain name is normal, submit a ticket on Support and Services. |
580 | DB_FAILED | An error occurred on database operations. We recommend that you try again. If the error persists, submit a ticket on Support and Services. |
581 | TIMEOUT | The operation timed out. We recommend that you try again. If the error persists, submit a ticket on Support and Services. |
585 | CACHE_FAILED | A cache error occurred. We recommend that you try again. If the error persists, submit a ticket on Support and Services. |
586 | ALGO_FAILED | An algorithm error occurred. Submit a ticket on Support and Services. |
587 | MQ_FAILED | A middleware error occurred. Submit a ticket on Support and Services. |
588 | EXCEED_QUOTA | The number of requests exceeds the quota. The default quota for moderation is 50 images per second, 20 channels of videos per second, 20 channels of audio per second, or 100 entries of text per second. The default quota for optical character recognition (OCR) is 10 images per second. If you want to adjust the quota, submit a ticket on Support and Services. |
589 | TOO_LARGE | The content to be moderated is too large in size. Make sure that the content size is allowed by the API. We recommend that you try again. If the error persists, submit a ticket on Support and Services. |
590 | BAD_FORMAT | The content to be moderated is in an invalid format. Make sure that the format of the content is allowed by the API. |
591 | CONNECTION_POOL_FULL | The connection pool is full. Submit a ticket on Support and Services. |
592 | DOWNLOAD_TIMEOUT | The download timed out. The download duration is limited to 3 seconds. Make sure that the size of the moderated content is allowed by the API. |
594 | EXPIRED | The task expired. For example, the task ID expired. |
595 | CATCH_FRAME_FAILED | Frame capture failed. Submit a ticket on Support and Services. |
596 | PERMISSION_DENY | The account is not activated, unauthorized, disabled, or has overdue payments. For more information, see the returned message. |