AI fact-checking API

Fact-check what your AI writes — before it ships.

Lenz is a fact-checking API for AI output. When your product writes a document, report, or answer, Lenz checks whether its factual claims are actually true — returning a sourced verdict and a full audit trail, an API call away. Under the hood: multi-stage, multi-model adversarial verification grounded in real sources.

Lenz is built for the teams that can't afford to ship hallucinations, where a wrong answer becomes a compliance flag, a liability event, or a customer lost.

Four API primitives form a research-depth ladder:

  • POST /extract pulls verifiable claims out of any text (free, 1000/day).
  • POST /assess returns a fast 3-model panel verdict in ~5-10s.
  • POST /verify runs the full 8-model pipeline with citations in ~90s.
  • POST /ask/{id} answers follow-up questions on any verification.

Open the quickstart notebook in Google Colab Run the four primitives against your own key.

OpenAPI 3.1 spec /api/v1/openapi.json →

Four primitives. Pick the depth your use case needs.

Find claims, judge them fast, prove them deep, ask follow-ups.

POST /extract Free · 1000/day

# AI-generated brief in — atomic, verifiable claims out
brief = """
Looking at the data, Einstein had a remarkable career. He won the
1921 Nobel Prize in Physics for his theory of general relativity,
which most physicists consider one of the most important scientific
achievements of all time. His famous equation E=mc² was first published
in 1905, the same year he completed his PhD at the University of Zurich.
"""

out = client.extract(text=brief)
for c in out.identified_claims:
    print("-", c)
# Opinions and meta-commentary skipped; pronouns resolved; compound sentences split:
# - Albert Einstein won the 1921 Nobel Prize in Physics for his theory of general relativity.
# - Albert Einstein first published the equation E=mc² in 1905.
# - Albert Einstein completed his PhD at the University of Zurich in 1905.

Drop into CI tomorrow as “report what factual claims our AI made yesterday.” Zero spend, real signal.

POST /assess ~5-10s · 3-model panel

# fast verdict from a 3-model frontier panel
r = client.assess(text="Albert Einstein won the 1921 Nobel Prize in Physics for his theory of general relativity.")
for c in r.claims:
    print(c.verdict, c.confidence)
# False high

# escalate low-confidence claims to /verify
if r.claims[0].confidence == "low":
    deep = client.verify_and_wait(claim=r.claims[0].claim)

Batch throughput, mobile pre-flight, or any UI where users wait for an answer. Use confidence to decide when to escalate.

POST /verify ~90s · 8-model pipeline

# deep check with citations
v = client.verify_and_wait(claim="Albert Einstein won the 1921 Nobel Prize in Physics for his theory of general relativity.")

print(v.verdict, v.lenz_score, v.confidence)
# → "False" 1 "high"
# The 1921 Nobel was awarded for the photoelectric effect, not relativity.

for s in v.sources[:2]:
    print(s.title, s.url)
# → "Albert Einstein at UZH" — uzh.ch

Eight models orchestrated through a purpose-built verification pipeline: framing, research, opposing-side debate, independent audit, conclusion. Returns a report with reasoning and citations.

POST /ask Q&A on a verification

# follow up on any verification
reply = client.ask.send(
    v.verification_id,
    message="What did Einstein actually win the 1921 Nobel Prize for?",
)
print(reply.content)
# → The photoelectric effect, not relativity. The Nobel committee cited his
#   1905 paper on the discovery of the law of the photoelectric effect.

Ground a chat thread on the verification's evidence. Same citations, same model, no re-research per turn.

LLM hallucination detection, by API.

Point Lenz at any model output and it does hallucination detection the honest way: /extract pulls out every factual claim, then /verify checks each one against real sources and flags the ones that don't hold up — returning a sourced verdict and citations, not a confidence guess. Nothing is taken on faith, including your model's.

Run it in CI to catch hallucination regressions before they ship, or call it at runtime to gate answers before they reach a user.

Independent verification, with a full audit trail.

Lenz checks your AI's output with multiple frontier models from rival vendors, cross-checked against real curated sources. You get an independent verdict, decided on the evidence, with citations.

Every verification ships the full trace: framing, sources, citations, the opposing-side debate, and the panel's reasoning. When a customer, auditor, or regulator asks how a claim was checked, you have the record — proof the content was verified before you published it.

Picking between /assess and /verify

  • Need citations and a research trail? → /verify
  • Need batch throughput or a fast take in ~5-10s? → /assess
  • Calling from a UI where the user waits for the result? → /assess, then escalate low-confidence claims to /verify
  • Want to drill into a finished verdict? → /ask on the verification_id

Three ways teams plug us in.

Sync verdicts in product flows

Use /assess as a pre-send gate on outbound AI text where the user is waiting. ~5-10s fits a chat-completion timeout; high-confidence claims pass, low-confidence ones escalate to /verify in the background.

Pre-release / CI regression catching

Run your golden test set through /extract + /verify on every deploy. Catch hallucination regressions before they ship. /extract is the free entry point — wire it in today, before spending a euro.

Incident triage

A customer reported a bad answer. Paste it in, get back which claims are wrong, what the evidence says, and a citation trail you can send back to the customer.

Pricing

Self-serve from day one. Pay only for what runs the pipeline.

Free

$0

/extract · 1,000/day
/assess · 100/mo
/verify · 10/mo
/ask · 20/mo

Prototype today, zero spend. No card required.

Pro

$99/mo

/extract · 1,000/day
/assess · 5,000/mo
/verify · 500/mo
/ask · 1,000/mo

Self-serve. $999/yr annual.

Enterprise

Custom

Volume, SLA, white-label.

Talk to us →

See full pricing on /subscription →

10 lines from your terminal

Typed SDKs in Python and TypeScript. One method call returns the verdict.

Python 3.9+

# pip install lenz-io
from lenz_io import Lenz

client = Lenz(api_key="lenz_...")
v = client.verify_and_wait(
    claim="Albert Einstein won the 1921 Nobel Prize "
          "in Physics for his theory of general relativity.",
)
print(v.verdict, v.lenz_score)
# False 1

TypeScript Node 18+

// npm install lenz-io
import { Lenz } from "lenz-io";

const client = new Lenz({ apiKey: "lenz_..." });
const v = await client.verifyAndWait({
  claim: "Albert Einstein won the 1921 Nobel Prize "
       + "in Physics for his theory of general relativity.",
});
console.log(v.verdict, v.lenz_score);
// False 1

The boring infrastructure is taken care of.

Idempotency by default

A network drop after submit never spawns a duplicate task. The SDK auto-generates an Idempotency-Key per call.

Auto-retry on transient errors

5xx and 429 retried with exponential backoff. Retry-After honored.

HMAC-signed webhooks

Submit with webhook_url=..., Lenz POSTs the typed payload when done. LenzWebhooks.parse() verifies signatures in 4 lines.

Support-ready errors

Every error carries cause + fix + docs URL + a request_id you can quote on a ticket.

12 supported languages

API responses in English (default) plus Spanish, German, French, Italian, Portuguese, Dutch, Swedish, Danish, Norwegian, Finnish, and Bulgarian.

Resources

Research

Open evaluations of how frontier LLMs perform on real-world user claims. Frozen snapshots, full data, full methodology.

Stop shipping unverified AI output.

Self-serve from day one. Free tier, no card required.