Create prediction

Create a prediction for a specific task.

Authentication

Authorizationstring
The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>

Request

This endpoint expects an object.
model_versionstringOptional

Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface

resultlist of objectsOptional
Prediction result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/predictions)
scoredoubleOptional
Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first.
taskintegerOptional
Task ID for which the prediction is created

Response

Created prediction
created_agostringDefaults to
Delta time from creation time
created_atdatetime
idinteger
resultlist of objects
List of prediction results for the task
taskinteger
updated_atdatetime
clusterinteger or null-2147483648-2147483647
Cluster for the current prediction
mislabelingdouble or null
Related task mislabeling score
modelinteger or null
An ML Backend instance that created the prediction.
model_runinteger or null
A run of a ModelVersion that created the prediction.
model_versionstring or null

Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface

neighborsany or null
Array of task IDs of the closest neighbors
projectinteger or null
scoredouble or null
Prediction score