Common error codes for Visual Search
If an API request fails, the server returns an error message. This topic describes the error codes that the Visual Search API returns.
If you have questions about API access, usage, or other issues related to the Alibaba Cloud Visual Intelligence API, join our DingTalk group (23109592) to contact us.
Troubleshooting center
Use the Troubleshooting Center to efficiently diagnose problems with your API calls.
Image Search error codes
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 the parameter value exists. |
403 | EntityNotExist.Role | You do not have the required RAM permissions. Contact your 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. If you use a non-Shanghai OSS image URL, see Handle file URLs. |
586 | InternalError.Algo | An internal algorithm processing error occurred. If this issue affects your business, contact us through our DingTalk group (23109592). |
500 | InternalError.Timeout | The algorithm service timed out during internal processing. Try again later. If this issue affects your business, contact us through our 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 make API calls. For more information, see SDK overview. |
400 | InvalidApi.ForbiddenInvoke | The call is restricted. Check whether the capability you are calling is restricted. To use a restricted capability, you must find the capability in the console and submit a request. You can call the capability only after the request is approved or you manually activate the capability. If this is not the case, check whether your account has an overdue payment. |
400 | InvalidApi.NotPurchase | The service is not activated. For more information, see Service description. |
403 | InvalidApi.OutOfService | The product is not activated. For more information, see Service description. |
400 | InvalidFile.Content | Check the file content against 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 local network and whether the URL is accessible. If you use a non-Shanghai OSS file URL, see Handle file URLs. |
400 | InvalidFile.REGION | The region of the file URL is incorrect. If you use a non-Shanghai OSS file URL, see Handle file URLs. |
400 | InvalidFile.Resolution | The file resolution exceeds the limit. Check the file resolution and content. Modify the file resolution and try again. |
400 | InvalidFile.Type | The file type is incorrect. Check the file type and use a file type supported by the algorithm. For more information, see the algorithm's API documentation. The Alibaba Cloud Visual Intelligence API reads the file to get its true type. It does not determine the type by the file extension. Checking only the file extension is not valid. For more information about how to determine and handle file types, see Determine and handle file types. |
400 | InvalidFile.URL | The file cannot be downloaded. Check your local network and whether the URL is accessible. If you use a non-Shanghai OSS file URL, see Handle file URLs. |
400 | InvalidImage.Content | Check the image content against 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 local network, whether the URL is accessible, and whether the OSS URL has expired. If you use a non-Shanghai OSS image URL, see Handle file URLs. URLs do not support spaces or Chinese characters. If a URL contains these characters, encode the URL before you use it. |
404 | InvalidImage.NotFoundFace | No face was found in the image. Check whether your image contains a face or if the face is too small. |
400 | InvalidImage.REGION | The region of the image URL is incorrect. If you use a non-Shanghai OSS image URL, see Handle file URLs. |
400 | InvalidImage.Resolution | The file resolution exceeds the limit. Check the file resolution and content. Modify the file resolution and try again. |
400 | InvalidImage.Timeout | The image download timed out. Check your local network, whether the URL is accessible, and whether the OSS URL has expired. If you use a non-Shanghai OSS image URL, see Handle file URLs. |
400 | InvalidImage.Type | The image type is incorrect. Check the image type and use an image type supported by the algorithm. For more information, see the algorithm's API documentation. |
400 | InvalidImage.URL | The image URL is invalid. Check whether the image URL is accessible. If you use a non-Shanghai OSS image URL, see Handle file URLs. For Shanghai OSS URLs, use standard OSS domain names. Accelerated domain names and custom domain names are not supported. |
400 | InvalidParameter | An input parameter is incorrect. |
400 | InvalidParameter.BadRequest | The request is invalid. This is usually caused by incorrect request parameters. Check the request parameters. |
400 | InvalidParameter.NotFound | A parameter is incorrect. Check the parameter value against the algorithm's API documentation and the error message. Check for extra spaces or other special characters before or after the parameter value. |
400 | InvalidParameter.TooLarge | A parameter is incorrect. The file size exceeds the limit. Adjust the file size as described in the algorithm's API documentation. |
403 | InvalidRamRole | You do not have the required RAM permissions. Contact your root account to grant you the AliyunVIAPIFullAccess permission. For more information, see Control access permissions using RAM policies. |
400 | InvalidResult | A parameter is incorrect. Check the parameter value against the documentation and check the file content. 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 | InvalidTimeStamp.Expired | The timestamp has expired. Update the timestamp. |
400 | MissingAccessKeyId | The AccessKey ID is missing. Check whether the AccessKey ID and AccessKey secret are correct. |
400 | MissingParameter | A parameter is missing. Check the parameter values against the documentation. |
400 | ParameterError | A parameter is incorrect. Check the parameter value. |
503 | ServiceUnavailable | The service is unavailable. If the server returned a RequestId, contact us through our DingTalk group (23109592). |
400 | SignatureDoesNotMatch | The signature is incorrect. Recalculate the signature. For more information, see Request signature. |
400 | SignatureNonceUsed | The signature nonce has already been used. Recalculate the signature. For more information, see Request signature. |
400 | Throttling | Throttling was triggered. For paid APIs, purchase a higher QPS. For free APIs, if you have special requirements, contact us through our DingTalk group (23109592). Note When throttling is triggered, both Throttling and Throttling.User errors can occur. Consider both when handling the error. |
400 | Throttling.User | Your traffic for this period has exceeded the limit. For paid APIs, purchase a higher QPS. For free APIs, if you have special requirements, contact us through our DingTalk group (23109592). Note When throttling is triggered, both Throttling and Throttling.User errors can occur. Consider both when handling the error. |
408 | Timeout | The request timed out. |
400 | Unauthorized | You do not have the required RAM permissions. Contact your root account to grant you the AliyunVIAPIFullAccess permission. For more information, see Control access permissions using RAM policies. |
Common error codes
For common API error codes, see API Error Center.
Troubleshooting suggestions
If a service request returns an error code, refer to the error description to identify the cause and resolve the error. This section provides troubleshooting suggestions for common errors.
URL-related error codes
These errors usually occur because the file URL does not meet the requirements. For example, the URL is insecure or invalid. For more information, see Handle file URLs.
Image loading error codes
These errors, such as image download errors and region errors, are also related to image URLs. We recommend that you use the China (Shanghai) region. If you generate a URL using OSS, make sure that the OSS bucket is also in the China (Shanghai) region. For more information, see Handle file URLs.
Parameter-related error codes
These errors usually occur because the input parameters do not meet the requirements, such as a missing parameter or a parameter of an incorrect type. Check your input parameters against the request parameters table in the corresponding API document.
System service error codes
If this type of error occurs, retry the service request. If the problem persists, provide feedback in our DingTalk group (23109592).