Skip to main content

Create Prediction

Use this endpoint to make a prediction on new data with your model.

Provide a batch of data points that include the input fields required by your project to generate a batch of predictions with confidence scores from the latest version of your Humanloop AI model.

Path Parameters
id Id REQUIRED
Request Body REQUIRED
data object[] REQUIRED
n_best Controls the number of most confident predictions from the model to return for each data point.
save Whether or not the Humanloop platform will log the request and response data from a prediction
Responses
200

Successful Response

Schema
object[]
id Unique identifier for each prediction.
data object REQUIRED
predictions object[] REQUIRED
output The name of the associated project output definition.
task_type object
value The value of the output (either classification or span values)
explanation An explanation for how the output value was determined.
id A unique identifier for the output value.
object Object
usage object
422

Validation Error

Schema
detail object[]
loc string[] REQUIRED
msg Message REQUIRED
type Error Type REQUIRED