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 CodeHTTP MessageAPI MessageResourcePossible Causes
401UnauthorizedInvalid access tokenAnyThe access token is expired.
401UnauthorizedInvalid authentication schemeAnyAn Authorization header was provided, but the token isn't properly formatted.
5XX
  • Internal server error
  • Service unavailable
NoneAnyOur 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 CodeHTTP MessageAPI MessageResourcePossible Causes
400Bad RequestNoneAny 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.
400Bad RequestThe name parameter is required to create a dataset.POST
/vision/datasets
The name parameter was passed in, but no value was provided.
400Bad RequestUploading 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.
400Bad RequestThe 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.
400Bad RequestThe 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.
400Bad RequestFailed 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.
400Bad RequestSupported 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.
400Bad RequestExample 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.
404Not FoundNoneAny dataset, label, or example resources.The requested REST resource doesn’t exist or you don't have permission to access the resource.
404Not FoundUnable to find dataset.GET
/vision/datasets/<DATASET_ID>
  • You don't have access to the dataset.
  • The dataset was deleted.
404Not FoundUnable to find dataset.DELETE
/vision/datasets/<DATASET_ID>
  • You don't have access to the dataset.
  • The dataset was deleted.
404Bad RequestExample 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.
404Bad RequestDuplicate 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.
503Service UnavailableOperation 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 CodeHTTP MessageAPI MessageResourcePossible Causes
400Bad Request
  • The name parameter is required to train.
  • A valid datasetId parameter is required to create a example.
POST
/vision/train
The name or datasetId parameter was passed in, but no parameter value was provided.
400Bad RequestThe name or datasedId parameters are required to train.POST
/vision/train
The name or datasetId parameter is missing.
400Bad RequestInvalid id <MODEL_ID>GET
/vision/train/<MODEL_ID>
There’s no model with an ID that matches the modelId parameter.
400Bad RequestInvalid id <MODEL_ID>GET
/vision/train/<MODEL_ID>/lc
There’s no model with an ID that matches the modelId parameter.
400Bad Request
  • The job has not terminated yet; its current status is RUNNING.
  • The job has not terminated yet; its current status is QUEUED.
GET
/vision/models/<MODEL_ID>
The model for which you are getting metrics hasn’t completed training.
404Not FoundNoneGET
/vision/models/<MODEL_ID>
The modelId parameter is missing.
405Method Not AllowedNoneGET
/vision/train/<MODEL_ID>
The modelId parameter is missing.

Error codes that can occur when you make a prediction.

HTTP CodeHTTP MessageAPI MessageResourcePossible Causes
400Bad RequestNonePOST
/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.
400Bad RequestBad Request: Bad sampleLocationPOST
/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.
400Bad RequestThe modelId parameter is required.POST
/vision/predict
The modelId parameter is missing.
400Bad RequestBad Request: Missing sampleLocation, sampleBase64Content, and sampleContentPOST
/vision/predict
The parameter that specifies the image to predict is missing.
400Bad RequestFile size limit exceededPOST
/vision/predict
The file you passed in for prediction exceeds the maximum file size limit of 5 MB.
400Bad RequestBad Request: Unsupported sample file formatPOST
/vision/predict
The file you passed in for prediction isn’t one of the supported file types.
403ForbiddenForbidden!POST
/vision/predict
  • The model specified by the modelId parameter doesn’t exist.
  • The modelId parameter was passed in but no value was provided.
429Too Many RequestsYou'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.