Skip to main content
GET
/
ai
/
async-prediction
/
{PREDICTION_ID}
Get prediction results
import requests

url = "https://application_id.applications.lucidworks.com/ai/async-prediction/{PREDICTION_ID}"

response = requests.get(url)

print(response.text)
{
"predictionId": "5e893b16-01f8-427c-9ca8-ba52b01b1ba3",
"status": "READY",
"predictions": [
{
"tokensUsed": {
"promptTokens": 51,
"completionTokens": 4,
"totalTokens": 55
},
"response": "CORRECT: misspelled"
}
]
}

Path Parameters

PREDICTION_ID
string
required

Response

OK

predictionId
string<uuid>

The universal unique identifier (UUID) returned in the POST request. This UUID is required in the GET request to retrieve results.

Example:

"fd110486-f168-47c0-a419-1518a4840589"

status
string

The current status of the prediction. Allowed values are:

  • SUBMITTED - The POST request was successful and the response has returned the predictionId and status that is used by the GET request.

  • READY - The results associated with the predictionId are available and ready to be retrieved.

  • ERROR - An error was generated when the GET request was sent.

  • RETRIEVED - The results associated with the predicitonId are returned successfully when the GET request was sent.

Example:

"READY"

predictions
object[]