Predict API Docs for:

This interface takes in {{ len_inputs }} input(s) and returns {{ len_outputs }} output(s).

The URL endpoint is:

Input(s): [{%for i in range(0, len_inputs)%} {{inputs[i]}}{% if i != len_inputs - 1 %} ,{% endif %}{%endfor%} ]

Output(s): [{%for i in range(0, len_outputs)%} {{outputs[i]}}{% if i != len_outputs - 1 %} ,{% endif %}{%endfor%} ]

Payload:

  {

    "data": [{%for i in range(0, len_inputs)%} {{ input_types[i] }}{% if i != len_inputs - 1 %} ,{% endif %}{%endfor%} ]

  }

Response:

  {

    "data": [{%for i in range(0, len_outputs)%} {{ output_types[i] }}{% if i != len_outputs - 1 %} ,{% endif %}{%endfor%} ],

    "durations": [ float ], // the time taken for the prediction to complete

    "avg_durations": [ float ] // the average time taken for all predictions so far (used to estimate the runtime)

  }

Try it (live demo):

import requests


r = requests.post(url='

',

json={"data":

[{% for i in range(0, len_inputs) %}{{ sample_inputs[i]|tojson }}{% if i != len_inputs - 1 %}

,

{% endif %}{%endfor%}

]})

r.json()

curl -X POST 

 -H 'Content-Type: application/json' -d '{"data": [{%for i in range(0, len_inputs)%}{{ sample_inputs[i]|tojson }}{% if i != len_inputs - 1 %}

,

{% endif %}{%endfor%}

]}'

fetch('', { method: "POST", body: JSON.stringify({"data":[{%for i in range(0, len_inputs)%} {{ sample_inputs[i]|tojson }}{% if i != len_inputs - 1 %},{% endif %}{%endfor%}

]}), headers: { "Content-Type": "application/json" } }).then(function(response) { return response.json(); }).then(function(json_response){ console.log(json_response) })