Interpreting the API output

The API response contains predictions of the deployed model. The number of predictions in the response depends on the type of problem that is solved by the model.

Regression problem

If the model solves a regression problem, the output will contain a single key-value pair.

Example:

{"target":0.3740423}

Classification problem

If the model solves a classification problem, the classes will be represented by a JSON object that contains the score of each class.

Example:

{'target': {'0': 3.3823929e-12,
  '1': 1.0685593e-21,
  '2': 2.4630313e-09,
  '3': 0.99999976,
  '4': 8.0027716e-30,
  '5': 2.5211065e-07,
  '6': 3.4311706e-24,
  '7': 2.8240297e-17,
  '8': 1.1280019e-17,
  '9': 1.3100968e-08}}

Responses to batch requests

When your request contains more than one row of input features, the response will have an equal number of rows, represented as an array of objects or key-value pairs.

Example:

{
 "Rows":[
  {"target":0.37404223},
  {"target":0.57564130}
 ]
}

Error responses from the API

When the platform is unable to process an API request, it will return an error code and a description in the response.

Example:

{"errorCode":"DeploymentNotEnabled","errorMessage":"\uD83D\uDED1 Deployment '3aff6d81-a150-4c20-9066-xxxxxxxxxxxx' is not enabled"}
Error code HTTP response code

BadData

400 (Bad request)

FeatureNotFound

400 (Bad request)

InsufficientScopeTokenError

403 (Forbidden)

DataUriError

400 (Bad request)

InvalidTokenError

401 (Unauthorized)

DeploymentNotEnabled

403 (Forbidden)

InternalError

500 (Server error)

JsonParsingError

400 (Bad request)

JsonPropertyTypeMismatch

400 (Bad request)

ResourceNotFound

404 (Not found)

UnsupportedContentType

415 (Unsupported Media Type)

Get started for free