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
$curl -X POST https://api.predictionguard.com/factuality \
> -H "x-api-key: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "reference": "reference",
> "text": "text"
>}'
Response
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}