Light Logo
Predictions

Get a prediction

Retrieve a prediction by its id.

GET
/predictions/{prediction_id}
AuthorizationBearer <token>

In: header

Path Parameters

prediction_idPrediction Id

The ID of the prediction to get.

Formatuuid

Response Body

from wriftai import Clientwriftai = Client()prediction = wriftai.predictions.get("497f6eca-6276-4993-bfeb-53cbbbba6f08")print(prediction.status)
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "model": {
    "name": "kokoro-82m",
    "owner": "hexgrad",
    "version_number": 1
  },
  "created_at": "2024-06-12T14:22:31Z",
  "status": "pending",
  "updated_at": "2024-06-12T14:22:47Z",
  "setup_time": "1.42",
  "execution_time": "3.87",
  "error": {
    "message": "The model failed to load required weights.",
    "source": "internal"
  },
  "metrics": {
    "input_tokens": 42,
    "output_tokens": 128
  },
  "input": {
    "text": "Hello, welcome to WriftAI!"
  },
  "output": {
    "audio": "https://wrift.ai/predictions/output.wav"
  },
  "stream": false
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}