Skip to content

API Contract

Ashwin Bhaskar edited this page Aug 21, 2019 · 4 revisions

Predict API

Method : POST Path : /model/<model-name>/version/<version-identifier>/predict

Request Payload

{
  "features" : []
}

Response [For status code 200]

{
"targets" : [] 
}

Example

Taking the example from here, if you are looking to predict the weight of 2 people, then the request payload with their height, gender and age will look something like this.

{
  "features" : [[181 0 29],
                [170 1 26]]
}

and response something with the predicted weights like this

{
"targets" : [[90],
             [69]] 
}

Clone this wiki locally