For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact usJoin our Discord
HomeAdministration & GovernanceDevelopment and IntegrationAgent ForgeAPI ReferenceSDK Docs
HomeAdministration & GovernanceDevelopment and IntegrationAgent ForgeAPI ReferenceSDK Docs
  • API Reference
    • POSTResponses
    • POSTChat Completions
    • POSTCompletions
    • POSTEmbeddings
    • POSTAudio Transcription
    • POSTDocuments Extract
    • POSTRerank
    • POSTTokenize
    • POSTDetokenize
    • POSTFactuality
    • POSTInjection
    • POSTPII
    • POSTToxicity
    • GETModels
    • GETMCP Servers
    • GETMCP Tools
  • Valid Inputs
    • Enumerations for API
LogoLogo
Contact usJoin our Discord
API Reference

Factuality

POST
https://{your-pg.api-domain}.com/factuality
POST
/factuality
$curl -X POST https://{your-pg.api-domain}.com/factuality \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "reference": "The President shall receive in full for his services during the term for which he shall have been elected compensation in the aggregate amount of 400,000 a year, to be paid monthly, and in addition an expense allowance of 50,000 to assist in defraying expenses relating to or resulting from the discharge of his official duties.",
> "text": "The president of the united states can take a salary of one million dollars"
>}'
1{
2 "id": "fact-3262157b-1ff2-4d78-8365-c2dcac56cadd",
3 "object": "factuality.check",
4 "created": 1727891187,
5 "checks": [
6 {
7 "index": 0,
8 "score": 0.7879657745361328
9 }
10 ]
11}
Check the factuality of a given text compared to a reference.
Was this page helpful?
Previous

Injection

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

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

Response

Successful response.
idstring
Unique ID for the factuality check.
objectstring

Type of object (factuality.check).

createdinteger
Timestamp of when the factuality check was created.
checkslist of objects
The set of vectorized data.

Errors

400
Bad Request Error
403
Forbidden Error