Create a prediction
Create a prediction for the provided inputs against a specific model version. By default this endpoint handles requests asynchronously by creating a prediction and returning the created prediction without waiting for a response from the model. This endpoint can be made to wait for a response by passing a optional Prefer header with the wait time. This endpoint will then wait upto the wait time specified for a response from the model. If it receives one it will return the response otherwise the pending prediction is returned which can be polled for updates. If it receives one it will return the response otherwise the pending prediction is returned which can be polled for updates using get prediction endpoint.
In: header
Path Parameters
The username of the user that owns the model.
The name of the model.
The number of the version.
Header Parameters
Enable input validation against the schema before processing.
falsePass a wait time to tell the server how long to wait in seconds for a prediction response. e.g Prefer: wait=10 will wait for upto 10 seconds. Other preferences passed will be ignored which means Prefer: wait=10 and Prefer: respond-async, wait=10 are equivalent as the respond-async directive is ignored. If you notice that the endpoint returns before your specified wait time you may be being timed out by our server which will limit how long the endpoint will wait for a response.
The input to pass to the model during prediction.
Empty Object
Details about the webhook to post prediction updates to.
Response Body
curl -X POST "https://api.wrift.ai/v1/models/string/string/versions/0/predictions" \ -H "Validate-Input: false" \ -H "Prefer: string" \ -H "Content-Type: application/json" \ -d '{ "input": {} }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"model": {
"owner": "string",
"name": "string",
"version_number": 0
},
"created_at": "2019-08-24T14:15:22Z",
"status": "pending",
"updated_at": "2019-08-24T14:15:22Z",
"setup_time": "string",
"execution_time": "string",
"error": {
"source": "internal",
"message": "string",
"detail": null
},
"input": null,
"output": null,
"url": "string"
}{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"model": {
"owner": "string",
"name": "string",
"version_number": 0
},
"created_at": "2019-08-24T14:15:22Z",
"status": "pending",
"updated_at": "2019-08-24T14:15:22Z",
"setup_time": "string",
"execution_time": "string",
"error": {
"source": "internal",
"message": "string",
"detail": null
},
"input": null,
"output": null,
"url": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}