This topic describes the common response parameters and HTTP status codes for calling content moderation operations.

Common response parameters

The following table describes the common parameters in the JSON data returned upon receiving any request.
Parameter Type Required Description
code Integer Yes The HTTP status code returned for the moderation task. Some extended error codes are supported.
  • 2xx indicates a success.
  • 4xx indicates an incorrect request.
  • 5xx indicates a back-end error.

For more information, see Common HTTP status codes.

msg String Yes The message returned for the moderation task.
requestId String Yes The unique ID of the request, which can be used to locate issues.
data Integer, String, or JSON object No The service-related response data. This parameter may be empty when an error occurs. Generally, the value is a JSON structure or array.

Common HTTP status codes

Identifier HTTP status code Description
OK 200 The message returned because the request is successful.
PROCESSING 280 The error message returned because the task is running. We recommend that you wait for a while, for example, 5 seconds, before querying the result.
BAD_REQUEST 400 The error message returned because the request is incorrect. This error is typically caused by incorrect request parameters. Check the request parameters carefully.
NOT_ALLOWED 401 The error message returned because an insecure image or video link is used.
FORBIDDEN 403 The error message returned because your image or video link cannot be accessed. Check whether the link is accessible from the Internet and whether an anti-theft chain policy is configured.
NOT_FOUND 404 The error message returned because the content to be moderated cannot be found. This is usually because your image or video content cannot be downloaded. Make sure that the content is accessible from the Internet.
DOWNLOAD_FAILED 480 The error message returned because the download fails. Make sure that the size and resolution, if any, of the content to be moderated are within the limits of the API.
GENERAL_ERROR 500 The error message returned because a temporary server error occurs. We recommend that you try again. If the error code persists, submit a ticket.
DB_FAILED 580 The error message returned because an error occurs while operating on the database. We recommend that you try again. If the error code persists, submit a ticket.
TIMEOUT 581 The error message returned because the operation times out. We recommend that you try again. If the error code persists, submit a ticket.
CACHE_FAILED 585 The error message returned because a cache error occurs. We recommend that you try again. If the error code persists, submit a ticket.
ALGO_FAILED 586 The error message returned because an algorithm error occurs. Submit a ticket to us.
MQ_FAILED 587 The error message returned because a middleware error occurs. Submit a ticket to us.
EXCEED_QUOTA 588 The error message returned because the number of requests exceeds the quota. The quota defaults to 50 images, 20 videos, 20 audios, or 100 pieces of text per second. If you want to adjust the quota, submit a ticket.
TOO_LARGE 589 The error message returned because 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 code persists, submit a ticket.
BAD_FORMAT 590 The error message returned because the content to be moderated is in an incorrect format. Make sure that the format of the content is allowed by the API.
CONNECTION_POOL_FULL 591 The error message returned because the connection pool is full. Submit a ticket to us.
DOWNLOAD_TIMEOUT 592 The error message returned because the download times out. The download duration is limited to 3 seconds. Make sure that the size of the moderated content is allowed by the API.
EXPIRED 594 The error message returned because the task expires. For example, taskId expires.
CATCH_FRAME_FAILED 595 The error message returned because frame capturing fails. Submit a ticket to us.
PERMISSION_DENY 596 The error message returned because the account is unauthorized, overdue, inactivated, or disabled. For more information, see the returned message.