Skip to content

For developers

Fact-check drafts before your pipeline publishes them.

When a draft, report or answer is about to ship, Lenz checks its factual claims, whoever wrote it, and returns a sourced verdict with a full audit trail. One API call. Under the hood: multiple models across five stages, grounded in external sources.

# pip install lenz-io
from lenz_io import Lenz

client = Lenz()  # reads LENZ_API_KEY
# one sentence from this week's newsletter
v = client.verify_and_wait(
    claim="The James Webb Space Telescope "
          "launched in December 2019.",
)
print(v.verdict, v.lenz_score)
# False 1
  • SpecOpenAPI 3.1
  • SDKsPython and TypeScript
  • Free tier100 credits a month
  • ExtractFree, 1,000 a day

01The API

Four checks, and one call that runs them on a draft.

Find claims, judge them fast, prove them deep, check their citations.

EndpointWhat it doesTime
POST /extractPulls verifiable claims out of any text, web page, Google Doc, PDF, YouTube video, or image URL.free
POST /assessReturns a fast verdict and the pages it looked at.~15 s
POST /verifyRuns a full investigation and returns a verdict with verified citations.~90 s
POST /citecheckChecks that each cited source says what the text attributes to it.—
POST /reviewOne call that returns the issues in a draft's claims and in its citations.2–4 min

POST /ask/{id} answers follow-up questions about any verification.

02Call by call

Pick the depth your use case needs.

POST /extract Free · 1,000/day

Free, so it can run on every draft before a credit is spent.

text can also be a single public web page URL (http or https, nothing else in the field). Lenz reads the page, a Google Doc, a PDF (.pdf), a YouTube video's transcript, or an image (.png, .jpg, .jpeg, .webp), and extracts the claims from its first 50,000 characters. Pages behind a login (Facebook, Instagram, Threads, LinkedIn) can't be read. A URL call typically takes 5-40 seconds, and the SDK waits up to 150 seconds for it.

# a newsletter draft in — atomic, verifiable claims out
draft = """
Space news this week. The James Webb Space Telescope
launched in December 2019 and orbits the Sun-Earth L2
point, about 1.5 million km from Earth. Its mirror has
18 hexagonal segments and spans 6.5 metres, which most
astronomers consider a leap over Hubble.
"""

out = client.extract(text=draft)
for c in out.claims:
    print("-", c.claim)
# opinions skipped, pronouns resolved, compounds split:
# - The James Webb Space Telescope launched in December 2019.
# - ...

POST /assess ~15 s · 3-model panel

One text, or the claims /extract returned in a single call. Mobile pre-flight, or any UI where users wait for an answer. Use confidence to decide when to escalate.

rationale is the reasoning of a reviewer who agrees with the panel's verdict. It is a reviewer's note, not a checked source; for sourced evidence, call /verify.

# fast verdict from a panel of frontier models
r = client.assess(
    claim="The James Webb Space Telescope "
          "launched in December 2019.",
)
for c in r.claims:
    print(c.verdict, c.confidence)
    if c.rationale:
        print(c.rationale)
# False high
# It launched on 25 December 2021, after repeated
# delays, not in 2019.

# a list of up to 20 in one call:
# one row per claim, same order
rows = client.assess(claims=[
    "Water boils at 100 °C at sea level.",
    "Drinking coffee lowers the risk of heart disease.",
]).claims
for c in rows:
    print(c.verdict, c.confidence)
# True high
# Mostly True low

POST /verify ~90s · multi-model pipeline

Multiple models orchestrated through a purpose-built verification pipeline: framing → research → debate → panel review → conclusion. Returns a report with reasoning and citations.

# deep check with citations
v = client.verify_and_wait(
    claim="The James Webb Space Telescope "
          "launched in December 2019.",
)

print(v.verdict, v.lenz_score, v.confidence)
# → "False" 1 "high"
# It launched on 25 December 2021, not in 2019.

for s in v.sources[:2]:
    print(s.title, s.url)
# → "James Webb Space Telescope" — science.nasa.gov

POST /citecheck does the source say it?

For each citation: does the cited source say what the text attributes to it, with the passage it rests on. Send pairs, or a whole text with its links. Citecheck guide.

# a statement and the page it cites in;
# the finding and the passage out
check = client.citecheck_and_wait(pairs=[{
    "statement": "The Eiffel Tower was completed in 1889.",
    "url": "https://en.wikipedia.org/wiki/Eiffel_Tower",
}])
for c in check.citations:
    finding = c.result.finding if c.result else "failed"
    print(finding, c.check.snippet)

Or one call that runs them all: /review reads a draft, checks its claims and citations, and returns the issues.

POST /review 2–4 min · the whole ladder

Extract, assess and verify in one call: the claims that come back False, Mostly False, Mixed or No Public Record, or with low confidence get the full pipeline, up to five unless you set the cap. review_and_wait polls for you; pass webhook_url to be called instead.

It can also check the draft's links and DOIs: does each source say what the draft attributes to it. See citation checks.

# a whole draft in; the issues and the
# suggested rewrites out
draft = (
    "The EU AI Act took effect in March 2024. "
    "It sorts AI systems into four risk tiers."
)

review = client.review_and_wait(text=draft)
for i in review.issues:
    print(i.verdict, i.claim)
    if i.suggested_rewrite:
        print("  Suggested rewrite:", i.suggested_rewrite)
# False The EU AI Act took effect in March 2024.
#   Suggested rewrite: The EU AI Act entered into force
#   on 1 August 2024.

Picking between /assess and /verify

  • Need citations and a research trail?→ /verify
  • Need batch throughput or a fast take in about 15 seconds?→ /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
  • Need the issues in a draft and its citations?→ /review

03SDKs

10 lines in Python or TypeScript.

Typed SDKs in Python and TypeScript. One method call returns the verdict. The example is at the top of the page.

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

04CLI

Or skip the SDK — run it from your shell.

The same four primitives as a CLI. pipx install, paste your key once, done. Add --json to any command to pipe straight into jq.

$ pipx install "lenz-io[cli]"   # isolated install, recommended
# paste an API key (free)
$ lenz login
# atomic claims · free, 1,000/day
$ lenz extract "…output from your LLM…"
# or a public web page, by URL
$ lenz extract "https://en.wikipedia.org/wiki/Air_pollution"
# fast panel verdict
$ lenz assess "The Great Wall is visible from space"
# full multi-model pipeline, ~90s
$ lenz verify "Water boils at 90°C at sea level"
# False · 1/10
# machine-readable
$ lenz verify "<claim>" --json | jq .verdict
$ lenz ask <verification_id> "Which source is strongest?"

05MCP

Or skip code entirely — connect it to your AI client.

Lenz is a remote MCP server. Add it to Claude Code, Cursor, VS Code or Codex, or to Claude and ChatGPT, then sign in with your Lenz account, and your assistant can fact-check a claim inline. Any other MCP client takes your API key.

MCP Streamable HTTP · .mcp.json for Claude Code

{
  "mcpServers": {
    "lenz": {
      "type": "http",
      "url": "https://lenz.io/mcp"
    }
  }
}

Claude Code signs in with your Lenz account on first use, so there is no key in the file. Another MCP client adds the key as a header:

{ "headers": { "Authorization": "Bearer lenz_…" } }

Not writing code? Connect Lenz to Claude or ChatGPT

Add the guided workflow — the fact-check Skill

The lenz-fact-check Agent Skill adds the workflow on top of the connector: it finds the claims in a passage, quick-checks each and deep-checks the high-stakes ones.

Get the Skill on GitHub

n8n and Zapier

The Lenz node is live on n8n, and the Zapier app adds the same step to any Zap. Add a fact-check step to any workflow, no API code required. Integrations

06Demos

See the SDK in action — two open-source demos.

Both run on the keyless public API through the lenz-io SDKs, with no backend of their own.

Fact or Fiction React · Vite · lenz-io

// the entire data layer, no API key
import { Lenz } from "lenz-io";

const lenz = new Lenz();
const round = await lenz.library.list({
  curated: ["trivia"],  // a named collection
  sort: "random",
  verdict: "True,False",
});

IsThisBS? Python · Jinja2 · lenz-io

# a whole fact-check site: no API key,
# no server, no database
from lenz_io import Lenz

client = Lenz()  # keyless public reads
page = client.library.list(sort="recent")
v = client.verifications.get(
    page.items[0].verification_id
)

07Infrastructure

The boring infrastructure is taken care of.

Idempotency by default

Every call that runs or charges for work sends an Idempotency-Key and reuses it across the SDK’s retries, so a network drop never runs or charges the work twice.

Retries on transient errors

5xx, 429 and dropped connections are retried with backoff, honouring Retry-After, and every error says whether a retry can succeed (retryable).

Signed webhooks

Pass webhook_url and Lenz POSTs the result, signed with HMAC-SHA256; LenzWebhooks verifies it, on edge runtimes too. See webhooks.

Errors with a request id

Every error carries its cause, a fix, a docs link and a request_id you can quote on a ticket.

Stop a run

Cancel a verification, a review or a citation check you no longer need; see going to production.

08Use cases

Three jobs, and the calls each one takes.

What goes in, what comes back, which endpoints.

Marketing and competitor claims

A landing page says “the only platform that” and quotes a market share. /assess checks every claim; /verify takes the two a competitor would challenge, and returns the sources before the page goes live.

The marketing desk
Newsletter issues

An issue is twenty sentences of figures, dates and names. /extract with a focus on those, /assess on each, the doubtful ones to /verify: one verdict per claim, in document order, private to your account.

The editorial desk
Legal and tax memos

A memo cites statutes, thresholds and treaty articles. /verify checks each against current sources; a threshold that changed last year comes back with the sources it fails against.

The tax and legal desk

09Audit trail

What every verification ships.

LLM hallucination detection against independent sources, with a record of how each claim was checked for when a customer, auditor or regulator asks.

/extract pulls out every factual claim, and /verify investigates each one you send it: it researches independent sources, has two models argue both sides and three reviewers score the evidence. Every verification ships the full trace: framing, sources, citations, the debate and the panel’s reasoning.

LLM hallucination detection, in depth

10Pricing

Pay only for what runs the pipeline.

Free

$0

100 credits/month
enough for 100 /assess, or 10 /verify, or 100 /ask
/extract free · 1,000/day

Prototype today, zero spend. No card required.

Pro

$99/mo

5,000 credits/month
enough for 5,000 /assess, or 500 /verify, or 5,000 /ask
/extract free · 1,000/day

Self-serve. Annual plan: $83/mo, billed $990 yearly. For teams shipping AI-drafted text.

Scale

$399/mo

20,000 credits/month
enough for 20,000 /assess, or 2,000 /verify, or 20,000 /ask
/extract free · 1,000/day

Annual plan: $333/mo, billed $3,990 yearly. For high-volume production workflows.

Compare all plans on the plans page →

Enterprise

Volume beyond the Scale plan, SLAs, white-label, custom integration support.

Talk to us →

11Languages

13 supported languages.

API responses in English (default) plus Spanish, German, French, Italian, Portuguese, Dutch, Swedish, Danish, Norwegian, Finnish, Bulgarian, and Serbian. To ask for another language, contact us.

Pass a code as language, or send language: "auto" on /assess, /verify, /review, /extract or /ask to get the answer in the language of the text. A code you name always wins.

Ship verified AI output.

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