For agent builders

Your AI agents will hallucinate. Prism catches them before users do.

Hallucination Guard API plugs into your agent's output pipeline. One call before you ship the response. Catches invented citations, statutes, policy refs, made-up sources.

Built for agent builders

Drop-in middleware. Three lines of code.

LangChain (TypeScript)ts
import { Prism } from "@prism/sdk";

const prism = new Prism({ apiKey: process.env.PRISM_API_KEY });

const chain = ChatPromptTemplate.fromMessages([...])
  .pipe(model)
  .pipe(async (output) => {
    // Drop-in middleware before the user sees the response.
    const verified = await prism.guard.verifyReferences({
      text: output.content,
      sources: state.retrievedDocs,
      domain: "legal",
    });
    return verified.flagged_text;
  });
LlamaIndex (Python)py
from prism import Prism

prism = Prism(api_key=os.environ["PRISM_API_KEY"])

response = query_engine.query(user_query)
verified = prism.guard.verify_references(
    text=response.response,
    sources=[node.text for node in response.source_nodes],
    domain="financial",
)
final_text = verified["flagged_text"]
Cursor / Cline / Replit Agentpy
# In your agent's tool list, register Prism as a verifier
from prism import Prism

prism = Prism(api_key=os.environ["PRISM_API_KEY"])

def verify_before_send(text: str, sources: list[str]) -> str:
    return prism.guard.verify_references(
        text=text, sources=sources, domain="legal"
    )["flagged_text"]

# Your agent calls verify_before_send() right before the user sees
# any text that might cite a case, statute, or policy.

Your agent generates → Prism verifies → user receives. The middleware adds ~150ms to the response and zero false-positive risk: existing [verify] markers are idempotent.

Why pick Prism over rolling your own

Production-tested. Stateless. Yours.

Pre-tuned across legal / financial / insurance citation patterns

The regex set is the same one shipping in production across nine professional-vertical Prism modules. You inherit the tuning instead of writing your own from scratch.

Idempotent

Safe to call multiple times on the same text. Existing [verify] markers don't get duplicated. Run it inside a retry loop without thinking.

Offset-safe

Won't corrupt mid-text. Pattern matches are sorted by offset; insertions happen in reverse. Concatenated outputs from multi-call agents stay coherent.

Stateless

No cross-tenant data, no learning from your inputs. Your sources stay yours. Per-key usage counts and timestamps are stored for cap enforcement; the inputs themselves are not.

Pricing for agent workloads

Hobbyist is free. Pay as you scale.

Same tiers as the public developer plan. Switch up at any time.

Hobbyist

$0

100 calls/mo

Prototyping

Most builders

Startup

$97/mo

10,000 calls/mo

Early production

Scale

$497/mo

100,000 calls/mo

Volume

Enterprise

Custom

Negotiated

Dedicated infra

Get an API key

Hobbyist tier needs no card. Sign in, generate a key, ship.

Verify your first response in five minutes.

The full API reference lives at /docs/api/hallucination-guard. Quickstart at /docs/quickstart.