Back to Docs
Verification Engine

POST /api/check

The standalone verification endpoint. Fact-check any AI-generated text against your knowledge base — without routing an action through the Execute API. Useful for inline verification in chatbots, content pipelines, and QA workflows.

Headers

HeaderValueRequired
AuthorizationBearer <api_key>Yes
Content-Typeapplication/jsonYes

Request Body

FieldTypeRequiredDescription
questionstringYesThe user question that prompted the AI response.
answerstringYesThe AI-generated text to verify.
docsTextstringNoOptional inline reference text. If omitted, your uploaded knowledge base is used.

Response

json
{
  "risk_score": 0.72,
  "claims": [
    {
      "claim": "Items can be returned within 60 days",
      "label": "Unsupported",
      "confidence": 0.12,
      "claim_type": "policy",
      "evidence": [
        {
          "chunk_id": 42,
          "text": "Customers may return items within 30 days of purchase.",
          "score": 0.94,
          "doc_title": "Return Policy"
        }
      ],
      "reasoning": "The knowledge base states 30 days, not 60 days."
    },
    {
      "claim": "Full refund is available",
      "label": "Supported",
      "confidence": 0.92,
      "claim_type": "policy",
      "evidence": [...],
      "reasoning": "Matches the refund policy document."
    }
  ],
  "safe_rewrite": "You can return items within 30 days for a full refund."
}

Response Fields

FieldTypeDescription
risk_scorenumberAggregate risk score from 0 to 1.
claimsarrayArray of extracted claims with verdicts and evidence.
claims[].claimstringThe atomic claim extracted from the answer.
claims[].labelstring"Supported", "Unsupported", or "Needs Review".
claims[].confidencenumberConfidence score from 0 to 1.
claims[].evidencearrayMatching evidence chunks from the knowledge base.
claims[].reasoningstringExplanation of the verification decision.
safe_rewritestring | nullRewritten text using only verified claims, or null if risk is low.