API Error Codes and Messages
If an API call is unsuccessful, it returns an HTTP error code. If the error is known, you receive a message in the response body.
Known errors are returned in the response body in this format.
HTTP Code | HTTP Message | API Message | Resource | Possible Causes |
---|---|---|---|---|
401 | Unauthorized | Invalid access token | Any | The access token is expired. |
401 | Unauthorized | Invalid authentication scheme | Any | An Authorization header was provided, but the token isn't properly formatted. |
5XX |
| None | Any | Our systems encountered and logged an unexpected error. Please contact us if you continue to see the error. |
Error codes that can occur when you access datasets, labels, or examples.
HTTP Code | HTTP Message | API Message | Resource | Possible Causes |
---|---|---|---|---|
400 | Bad Request | None | Any dataset, label, or example resources. | The request couldn’t be fulfilled because the HTTP request was malformed, the Content Type was incorrect, there were missing parameters, or a parameter was provided with an invalid value. |
400 | Bad Request | The name parameter is required to create a dataset. | POST /vision/datasets | The name parameter was passed in, but no value was provided. |
400 | Bad Request | Uploading a dataset requires either the data field or the path field. | POST /vision/datasets/upload | The path to the local .zip file or the URL to the .zip file in the cloud wasn’t specified. |
400 | Bad Request | The data parameter cannot be duplicated, nor sent along with the path parameter. | POST /vision/datasets/upload | Both the path and data parameters were passed to the call; only one of these parameters can be passed. |
400 | Bad Request | The dataset is not yet available for update, try again once the dataset is ready. | PUT /vision/datasets/<DATASET_ID>/upload | You’re adding examples to a dataset that’s currently being created. You must wait for dataset to become available before you can add examples to it. |
400 | Bad Request | Failed to download the dataset from the public URL. | POST /vision/datasets/upload/ vision/datasets/upload/sync | The API can't access the dataset file via the URL provided. When specifying the URL for a .zip file in a cloud drive service like Dropbox, be sure it's a link to the file and not a link to the interactive download page. For example, the URL should look like https://www.dropbox.com/s/abcdxyz/mountainvsbeach.zip?dl=1. |
400 | Bad Request | Supported dataset types: [image, image-detection, image-multi-label] | POST /vision/datasets/upload | The type request parameter contains a value that isn't a valid dataset type. |
400 | Bad Request | Example max size supported is 1024000. | POST /vision/datasets/<DATASET_ID>/examples | The image file being added as an example exceeds the maximum file size of 1 MB. |
404 | Not Found | None | Any dataset, label, or example resources. | The requested REST resource doesn’t exist or you don't have permission to access the resource. |
404 | Not Found | Unable to find dataset. | GET /vision/datasets/<DATASET_ID> |
|
404 | Not Found | Unable to find dataset. | DELETE /vision/datasets/<DATASET_ID> |
|
404 | Bad Request | Example file already exists for the label <NAME_OF_EXAMPLE> . | POST /vision/feedback | An example with the same name already exists in the dataset. Example names must be unique within a dataset. |
404 | Bad Request | Duplicate labels are not allowed. | POST /vision/datasets | The call is trying to create a label with a name that exists in the dataset. Label names must be unique within a dataset. |
503 | Service Unavailable | Operation timed out! | GET /vision/datasets | The call has timed out due to large data size. By default, this call returns 25 datasets. If the datasets contain a lot of examples, this call may time out. Use the offset and count parameters to limit and page through the data. |
Error codes that can occur when you train a dataset to create a model or access a model.
HTTP Code | HTTP Message | API Message | Resource | Possible Causes |
---|---|---|---|---|
400 | Bad Request |
| POST /vision/train | The name or datasetId parameter was passed in, but no parameter value was provided. |
400 | Bad Request | The name or datasedId parameters are required to train. | POST /vision/train | The name or datasetId parameter is missing. |
400 | Bad Request | Invalid id <MODEL_ID> | GET /vision/train/<MODEL_ID> | There’s no model with an ID that matches the modelId parameter. |
400 | Bad Request | Invalid id <MODEL_ID> | GET /vision/train/<MODEL_ID>/lc | There’s no model with an ID that matches the modelId parameter. |
400 | Bad Request |
| GET /vision/models/<MODEL_ID> | The model for which you are getting metrics hasn’t completed training. |
404 | Not Found | None | GET /vision/models/<MODEL_ID> | The modelId parameter is missing. |
405 | Method Not Allowed | None | GET /vision/train/<MODEL_ID> | The modelId parameter is missing. |
Error codes that can occur when you make a prediction.
HTTP Code | HTTP Message | API Message | Resource | Possible Causes |
---|---|---|---|---|
400 | Bad Request | None | POST /vision/predict | The prediction request couldn’t be fulfilled because the HTTP request was malformed, the Content Type was incorrect, there were missing parameters, or a parameter was provided with an invalid value. |
400 | Bad Request | Bad Request: Bad sampleLocation | POST /vision/predict | The URL passed in the sampleLocation parameter is invalid. The URL could be incorrect, contain the wrong file name, or the file may have been moved. |
400 | Bad Request | The modelId parameter is required. | POST /vision/predict | The modelId parameter is missing. |
400 | Bad Request | Bad Request: Missing sampleLocation, sampleBase64Content, and sampleContent | POST /vision/predict | The parameter that specifies the image to predict is missing. |
400 | Bad Request | File size limit exceeded | POST /vision/predict | The file you passed in for prediction exceeds the maximum file size limit of 5 MB. |
400 | Bad Request | Bad Request: Unsupported sample file format | POST /vision/predict | The file you passed in for prediction isn’t one of the supported file types. |
403 | Forbidden | Forbidden! | POST /vision/predict |
|
429 | Too Many Requests | You've reached the maximum number of predictions. | POST /vision/predict | You have exceeded the number of prediction requests for your current plan. Contact your AE to update your plan. See Rate Limits. |