— DOCUMENTATION

How Sentinal AI works

A single API call inspects a prompt/response pair, extracts every checkable factual claim, verifies each one, and returns a structured report — score, flags, and a ready-to-use correction.

Verification pipeline

01

Exchange arrives

The prompt and the model’s draft response are sent to /api/verify before the user ever sees them.

02

Claims are extracted

Sentinal AI parses the response into discrete factual claims — names, numbers, dates, citations, causal statements.

03

Each claim is checked

Every claim is cross-referenced against the supplied context, retrieved sources, and internal consistency rules.

04

Risk is scored

Flagged claims are weighted by severity into a single 0–100 hallucination score for the exchange.

05

A correction is drafted

For anything above threshold, Sentinal AI proposes a corrected span — not just a flag, a fix — ready to swap in.

Detector reference

Six detectors run against every response. Each flagged claim records which detector caught it, how severe it is, and the exact excerpt responsible.

Unsupported Claim

critical

A factual statement presented with confidence but with no basis in the provided context or verifiable source.

Fabricated Citation

critical

References a paper, case, statistic, or quote that does not exist, or misattributes a real one.

Numeric Drift

high

Numbers, dates, or quantities that are internally inconsistent or contradict the source material.

Entity Confusion

high

Conflates two similar people, places, products, or organizations into one incorrect answer.

Context Contradiction

high

The response directly contradicts a fact stated earlier in the prompt or conversation.

Overconfidence Marker

medium

Hedge-free, definitive language wrapped around a claim the model has no way to verify.

Scoring & thresholds

Each flagged claim carries a severity weight (critical = 70, high = 40, medium = 18). Weighted scores sum with diminishing returns for repeated flags, then cap at 100 to produce a single 0–100 hallucination score.

Trusted0 – 24

No unverified claims found. Ship the response as-is.

Needs review25 – 59

Minor or unverifiable claims. Flag for a human, or auto-correct low-risk spans.

Hallucinated60 – 100

High-confidence fabrication detected. Block, or serve the corrected version.

API schema

One endpoint. Send what you have — a prompt, a response, or both.

Request
POST /api/verify
Content-Type: application/json

{
  "prompt": "Who won the Nobel Prize in Physics in 2019?",
  "response": "It was awarded entirely to Stephen Hawking..."
}
Response
{
  "score": 91,
  "status": "hallucinated",
  "claims": [
    {
      "detector": "Unsupported Claim",
      "text": "awarded entirely to Stephen Hawking",
      "severity": "critical",
      "source": "response",
      "note": "Hawking died in 2018 and was never
                awarded a Nobel Prize."
    }
  ],
  "corrected": "James Peebles, Michel Mayor, and
                Didier Queloz, for discoveries in
                physical cosmology and exoplanet
                detection.",
  "meta": {
    "claims_checked": 4,
    "detectors_run": 6,
    "verified_at": "2026-06-21T09:14:02Z"
  }
}

SDK quickstart

Available now for Node and Python; Go is in beta.

npm
npm install sentinal-ai-sdk

import { SentinalAI } from "sentinal-ai-sdk";
const sentinalAI = new SentinalAI({ apiKey: process.env.SENTINELAI_API_KEY });

const result = await sentinalAI.verify({ prompt, response });