Check Factuality

POST
Check the factuality of a given text compared to a reference.

Request

This endpoint expects an object.
reference
stringRequired
The reference text for comparison.
text
stringRequired
The text to be checked for factuality.

Response

This endpoint returns an object
checks
list of objectsOptional
created
integerOptional
Timestamp of when the factuality check was created.
id
stringOptional
Unique ID for the factuality check.
object
stringOptional
Type of object (factuality check).
POST
1curl -X POST https://api.predictionguard.com/factuality \
2 -H "x-api-key: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "reference": "reference",
6 "text": "text"
7}'
200
Successful
1{
2 "checks": [
3 {
4 "score": 0.12404686957597733,
5 "index": 0,
6 "status": "success"
7 }
8 ],
9 "created": 1704311812,
10 "id": "fact-OfuJHSTUDaNRZgL2cY8gtUVqqvFgf",
11 "object": "factuality_check"
12}