Common error codes for Content Moderation

Updated at:

This topic describes the error codes that the Content Moderation API returns when a request fails.

Note

If you have questions about API integration, API usage, or other issues related to the Alibaba Cloud Visual Intelligence API, you can contact us in the DingTalk group (23109592).

Troubleshooting center

You can use the Troubleshooting Center to help developers efficiently diagnose problems with API calls.

Content Moderation error codes

HTTP status code

Error code

Description

403

AuthFailed

Authorization failed. Check your RAM permission configuration.

400

ClientError.IllegalArgument

Check the parameters. For example, check whether the database specified by a parameter value exists.

403

EntityNotExist.Role

You do not have RAM permissions. Contact the root account to grant you the AliyunVIAPIFullAccess permission. For more information, see Control access permissions using RAM policies.

400

IllegalUrlParameter

The URL is invalid. Check whether the URL can be opened. For image URLs that are not for OSS in the China (Shanghai) region, see Process file URLs.

500

InternalError

An internal server error occurred. If your business is affected, contact us through the DingTalk group (23109592).

586

InternalError.Algo

An internal algorithm processing error occurred. If your business is affected, contact us through the DingTalk group (23109592).

585

InternalError.Cache

A cache error occurred. Retry the operation. If this error code persists, contact us through the DingTalk group (23109592).

591

InternalError.ConnectPool

The connection pool is full. Contact us through the DingTalk group (23109592).

580

InternalError.DB

The database operation failed. Retry the operation. If this error code persists, contact us through the DingTalk group (23109592).

595

InternalError.Frame

Failed to capture frames. Contact us through the DingTalk group (23109592).

587

InternalError.MiddleWare

A middleware error occurred. Contact us through the DingTalk group (23109592).

581

InternalError.Timeout

An internal algorithm processing timeout error occurred. If your business is affected, contact us through the DingTalk group (23109592).

400

InvalidAccessKeyId.Inactive

The AccessKey ID is invalid. Check whether the AccessKey ID is disabled, or whether the AccessKey ID and AccessKey secret are correct.

400

InvalidAccessKeyId.NotFound

The AccessKey ID was not found. Check whether the AccessKey ID and AccessKey secret are correct.

400

InvalidAccessKeySecret

The AccessKey ID or AccessKey secret is incorrect. Check whether the AccessKey ID and AccessKey secret are correct.

400

InvalidAction.NotFound

The capability was not found. Check whether the category and capability match, and whether the endpoint and capability match. For more information, see Endpoints.

Select a programming language and modify the sample code to integrate the SDK. For more information, see SDK overview.

400

InvalidApi.ForbiddenInvoke

The call is restricted. Check whether the capability you are calling is restricted. To call a restricted capability, you must find the capability in the console, request access, and wait for approval or manual activation.

If this is not the case, check whether your account has an overdue payment.

403

InvalidApi.NotPurchase

The service is not activated. Activate the service first.

400

InvalidApi.OutOfService

The product is not activated. Activate the product.

400

InvalidFile.Content

Check the file content based on the algorithm documentation. Replace the file with one that meets the algorithm requirements.

400

InvalidFile.Decode

Check whether the file can be opened.

400

InvalidFile.Download

The file cannot be downloaded. Check your on-premises network and whether the URL is accessible. For file URLs that are not for OSS in the China (Shanghai) region, see Process file URLs.

400

InvalidFile.REGION

The region in the file URL is incorrect. For file URLs that are not for OSS in the China (Shanghai) region, see Process file URLs.

400

InvalidFile.Resolution

The file resolution exceeds the limit. Check the file resolution and content, modify the resolution, and then retry.

400

InvalidFile.Type

The file type is not supported. Check the file type and use a type supported by the algorithm as described in the API documentation. Alibaba Cloud Visual Intelligence API reads the file to determine its actual type instead of relying on the file extension. Checking only the file extension is not a valid method. For more information about how to determine and process file types, see Determine and process file types.

400

InvalidFile.URL

The file cannot be downloaded. Check your on-premises network and whether the URL is accessible. For file URLs that are not for OSS in the China (Shanghai) region, see Process file URLs.

400

InvalidImage.Content

Check the image content based on the algorithm documentation. Replace the image with one that meets the algorithm requirements.

400

InvalidImage.Decode

Check whether the image can be opened.

400

InvalidImage.Download

The image cannot be downloaded. Check your on-premises network, whether the URL is accessible, and whether the OSS URL has expired. For image URLs that are not for OSS in the China (Shanghai) region, see Process file URLs. URLs do not support spaces or Chinese characters. If a URL contains these characters, URL-encode the URL before you pass it.

404

InvalidImage.NotFound

The content to be moderated was not found. This error usually occurs because your image, video, or audio content cannot be downloaded. Make sure the content is accessible over the public network.

404

InvalidImage.NotFoundFace

No face was found in the image. Check whether the image contains a face or if the face is too small.

400

InvalidImage.REGION

The region in the image URL is incorrect. For image URLs that are not for OSS in the China (Shanghai) region, see Process file URLs.

400

InvalidImage.Resolution

The file resolution exceeds the limit. Check the file resolution and content, modify the resolution, and then retry.

480

InvalidImage.Restriction

The download failed. Make sure the size or resolution of the content to be moderated is within the API limits.

400

InvalidImage.Timeout

The download timed out. The time limit for a download is 3 seconds. Make sure the size of the content to be moderated is within the API limits.

400

InvalidImage.Type

The image type is not supported. Check the image type and use a type supported by the algorithm as described in the API documentation.

403

InvalidImage.Unaccessable

The access request failed. This error usually occurs because the URL of your image, video, or audio content is inaccessible. Make sure the content is accessible over the public network and that no hotlink protection policy is configured.

401

InvalidImage.Unsafe

The request failed. This error usually occurs because an insecure URL was used for the image, video, or audio content.

400

InvalidImage.URL

The image URL is invalid. Check whether the image URL is accessible. For image URLs that are not for OSS in the China (Shanghai) region, see Process file URLs. For OSS URLs in the China (Shanghai) region, use standard OSS domain names. Accelerated domain names and custom domain names are not supported.

400

InvalidParameter

A parameter is invalid. Check the parameter value against the API documentation and the error message. Check for extra spaces or other special characters before or after the parameter value.

400

InvalidParameter.BadRequest

The request is invalid. This error is usually caused by incorrect request parameters. Check the request parameters.

400

InvalidParameter.Format

The format of the content to be moderated is incorrect. Make sure the content is within the API limits.

400

InvalidParameter.NotFound

A parameter is invalid. Check the parameter value against the API documentation and the error message. Check for extra spaces or other special characters before or after the parameter value.

400

InvalidParameter.TooLarge

The content to be moderated is too large. Make sure the content is within the API limits. Retry the operation. If this error code persists, contact us through the DingTalk group (23109592).

403

InvalidRamRole

You do not have RAM permissions. Contact the root account to grant you the AliyunVIAPIFullAccess permission. For more information, see Control access permissions using RAM policies.

400

InvalidResult

A parameter is invalid. Check the parameter value and file content against the documentation. For example, check whether the image content is incomplete or too blurry.

400

InvalidSide

The specified parameter `Side` is not valid. Enter a valid value for the `Side` parameter as described in the documentation.

400

InvalidTask.N.ImageTimeMillisecond

The value of the `Task.N.ImageTimeMillisecond` parameter is invalid.

400

InvalidTimeStamp.Expired

The timestamp has expired. Update the timestamp.

400

MissingAccessKeyId

The AccessKey ID is not specified. Check whether the AccessKey ID and AccessKey secret are correct.

400

QuotaExceeded.ImageCount

The number of faces or traces exceeds the limit.

449

Retry

The operation failed due to an occasional issue such as network jitter. Retry the operation.

400

SDK.ServerUnreachable

An SDK-side error occurred.

503

ServiceUnavailable

The service is unavailable. If the server has returned a RequestId, contact us through the DingTalk group (23109592).

500

ServiceUnavailable

A network request error occurred. First, check for faults in your on-premises network, such as the local area network. If the server has returned a RequestId, contact us through the DingTalk group (23109592).

400

SignatureDoesNotMatch

You do not have RAM permissions. Contact the root account to grant you the AliyunVIAPIFullAccess permission. For more information, see Control access permissions using RAM policies.

400

SignatureNonceUsed

The signature has already been used. Recalculate the signature. For more information, see Request signing.

400

Throttling

Throttling was triggered. For paid APIs, purchase a higher QPS. For free APIs, if you have special requirements, contact us through the DingTalk group (23109592).

Note

When throttling is triggered, both `Throttling` and `Throttling.User` may be returned. Consider both error codes when you handle them.

400

Throttling.User

The traffic for the current period has exceeded the limit. For paid APIs, purchase a higher QPS. For free APIs, if you have special requirements, contact us through the DingTalk group (23109592).

Note

When throttling is triggered, both `Throttling` and `Throttling.User` may be returned. Consider both error codes when you handle them.

408

Timeout

The request or processing timed out.

403

Unauthorized

RAM permission verification failed. For more information, see Control access permissions using RAM policies.

403

UnsupportedHTTPMethod

The HTTP request method is not supported. See the API call documentation for each product.

Common error codes

For information about common API error codes, see the API Error Center.

Suggestions

If a service request returns an error code, refer to the description of the error code to identify the cause and resolve the error. The following suggestions are provided for some common types of errors.

  • URL-related error codes

    These error codes usually indicate that the file URL does not meet the requirements. For example, the URL might be insecure or invalid. For more information, see Process file URLs.

  • Image loading error codes

    These errors, such as image download errors or region errors, are typically related to the image URL. We recommend that you use the China (Shanghai) region. If you generate a URL using OSS, the bucket that you create in OSS must be in the China (Shanghai) region. For more information, see Process file URLs.

  • Parameter-related error codes

    These error codes usually indicate that the input parameters do not meet the requirements. For example, a parameter is missing or has an incorrect type. To verify that your input parameters meet the requirements, refer to the request parameters table in the relevant API document.

  • System service error codes

    If this type of error code is returned, try the service request again. If the problem persists, provide feedback in the DingTalk group (23109592).