Light Logo
Predictions

Stream a prediction

Stream a prediction by its id. The model response will be streamed as server-sent events.

GET
/predictions/{prediction_id}/stream
AuthorizationBearer <token>

In: header

Path Parameters

prediction_idPrediction Id

The ID of the prediction to stream.

Formatuuid

Query Parameters

after_id?After Id

The id of the event after which to start streaming. Not passing this starts streaming from the beginning.

Header Parameters

Prefer?Prefer

Pass a wait time, in seconds, telling the server the maximum idle time allowed between successive events before closing the connection. If no wait time is given, the server default is used. For example, Prefer: wait=10 will allow up to 10 seconds of idle time between events, whereas Prefer: wait, or omitting the header entirely, will use the server default. Other unsupported preferences are ignored, which means Prefer: wait=10 and Prefer: respond-async, wait=10 are equivalent as the respond-async directive is ignored.

Response Body

curl -X GET "https://api.wrift.ai/v1/predictions/497f6eca-6276-4993-bfeb-53cbbbba6f08/stream?after_id=string" \  -H "Prefer: string"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}