Skip to navigation

Run predictions

View as Markdown

Run predictions with a trained ML model.

Identify the model by ml_model_id, or by ml_model_name (the name of a non-archived model). Each row in data maps the model’s feature columns to values; list_ml_models shows the columns each model expects. Returns one prediction per input row, plus per-class probabilities for classifiers.

Requires an API key with the read scope.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
datalist of maps from strings to anyRequired
pixel_thresholddoubleOptional>=0Defaults to 0.5
Segmentation models only. A pixel belongs to a predicted region when the model's probability for it exceeds this. Lower values find fainter regions and grow existing ones. Higher values keep only confident pixels. Probabilities are uncalibrated, so useful values depend on the model.
min_region_pixelsintegerOptional>=1Defaults to 9

Segmentation models only. Drops predicted regions with fewer pixels than this. Pixels are counted on the hole-filled mask at the model’s inference resolution.

max_hole_pixelsinteger or nullOptional>=0

Segmentation models only. Fills enclosed holes of up to this many pixels in each predicted mask before it is split into regions. Null fills every hole. 0 keeps all holes, so ring-shaped predictions stay rings.

min_confidencedoubleOptional0-1Defaults to 0
Segmentation models only. Drops predicted regions whose confidence, the mean probability of their pixels, is below this.
ml_model_idstring or nullOptionalformat: "uuid"
ml_model_namestring or nullOptional

Response

OK
predictionslist of any
model_idstringformat: "uuid"
model_namestring
probabilitieslist of maps from strings to any or nullOptional
annotationslist of objects or nullOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error