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 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
/language/datasets | The name parameter was passed in, but no value was provided. | | 400 | Bad Request | Uploading a dataset requires either the data field. | POST
/language/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 | POST
/language/datasets/upload | The data parameter cannot be duplicated | | 400 | Bad Request | The dataset is not yet available for update, try again once the dataset is ready. | PUT
/language/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
/language/datasets/upload/
language/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
/language/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
/language/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
/language/datasets/<DATASET_ID> |

  • You don't have access to the dataset.
  • The dataset was deleted.
| | 404 | Not Found | Unable to find dataset. | DELETE
/language/datasets/<DATASET_ID> |
  • You don't have access to the dataset.
  • The dataset was deleted.
| | | 404 | Bad Request | Duplicate labels are not allowed. | POST
/language/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
/language/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
/language/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
/language/train
The name or datasetId parameter is missing.
400Bad RequestInvalid id <MODEL_ID>GET
/language/train/<MODEL_ID>
There’s no model with an ID that matches the modelId parameter.
400Bad RequestInvalid id <MODEL_ID>GET
/language/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
/language/models/<MODEL_ID>
The model for which you are getting metrics hasn’t completed training.
404Not FoundNoneGET
/language/models/<MODEL_ID>
The modelId parameter is missing.
405Method Not AllowedNoneGET
/language/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
/language/intent
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
/language/intent
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
/language/intent
The modelId parameter is missing.
400Bad RequestFile size limit exceededPOST
/language/intent
The file you passed in for prediction exceeds the maximum file size limit of 5 MB.
400Bad RequestBad Request: Unsupported sample file formatPOST
/language/intent
The file you passed in for prediction isn’t one of the supported file types.
403ForbiddenForbidden!POST
/language/intent
  • 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
/language/intent
You have exceeded the number of prediction requests for your current plan. Contact your AE to update your plan. See Rate Limits.