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
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer <api_key> | Yes |
| Content-Type | application/json | Yes |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| question | string | Yes | The user question that prompted the AI response. |
| answer | string | Yes | The AI-generated text to verify. |
| docsText | string | No | Optional 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
| Field | Type | Description |
|---|---|---|
| risk_score | number | Aggregate risk score from 0 to 1. |
| claims | array | Array of extracted claims with verdicts and evidence. |
| claims[].claim | string | The atomic claim extracted from the answer. |
| claims[].label | string | "Supported", "Unsupported", or "Needs Review". |
| claims[].confidence | number | Confidence score from 0 to 1. |
| claims[].evidence | array | Matching evidence chunks from the knowledge base. |
| claims[].reasoning | string | Explanation of the verification decision. |
| safe_rewrite | string | null | Rewritten text using only verified claims, or null if risk is low. |