# Check an agent's claims before it acts

Put a verification step between an AI agent's output and the action or human approval that follows: verify each claim, gate on the verdict, and keep the record.

Documentation index: https://webcite.co/llms.txt
Canonical page: https://webcite.co/api-docs/agent-checks
API origin: https://api.webcite.co
Authentication: x-api-key header. Keep keys on your server.

## How do I catch a made-up claim or citation before my agent answers?

Put a check between the agent's draft and the reply or action. Send each factual claim to `POST /api/v1/verify` (MCP `verify_claim`): proceed only when every claim is `supported`, stop on `contradicted`, and send the rest to a person with the evidence attached. For quotes the agent took from documents it was given, [batch quote checks](/api-docs/batch) return `unbound` for a quote that is not in its source. The recorded response below shows a contradicted claim, and the next section has the gate code that reads it.

## Endpoint and minimal request

`POST https://api.webcite.co/api/v1/verify` takes one required field, `claim`, and checks it against web sources. Send the key in the `x-api-key` header. Agents call the same check as the MCP tool `verify_claim`.

```bash
curl --fail-with-body -X POST 'https://api.webcite.co/api/v1/verify' \
  -H "x-api-key: $WEBCITE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"claim": "The Great Wall of China is visible from the Moon with the naked eye."}'
```

The recorded response, trimmed to the fields a gate reads ([full file](/samples/claim-great-wall.json)):

```json
{
  "claim_groups": [
    {
      "claim": "The Great Wall of China is visible from the Moon with the naked eye.",
      "citation_count": 6,
      "verdict": {
        "result": "contradicted",
        "stance_breakdown": {
          "contradicts": 4,
          "inconclusive": 2
        }
      },
      "citations": [
        {
          "url": "https://www.nasa.gov/image-article/great-wall/",
          "stance": "contradicts",
          "passage": {
            "text": "The Great Wall of China and Inner Mongolia are featured in this image photographed by Expedition 10 Commander Leroy Chiao on the International Space Station. Despite myths to the contrary, the wall isn't visible from the moon..."
          }
        }
      ]
    }
  ],
  "citation_id": "e23d97c1-18a4-420e-af30-7147abb291b6"
}
```

Each claim group has a `verdict.result` of `supported`, `partially_supported`, `contradicted`, `mixed` or `unverifiable`, the stance of every source and the passage each stance rests on.

## Gate the action on the verdict

Let the agent act on its own only when every claim it relies on is `supported`. Stop on `contradicted`. Send everything else to a person with the evidence attached, so the reviewer reads passages instead of re-researching the claim.

```javascript
async function checkClaim(claim) {
  const response = await fetch("https://api.webcite.co/api/v1/verify", {
    method: "POST",
    headers: { "x-api-key": process.env.WEBCITE_API_KEY, "Content-Type": "application/json" },
    body: JSON.stringify({ claim }),
    signal: AbortSignal.timeout(300_000),
  });
  if (!response.ok) throw new Error(`verify failed: ${response.status}`);
  const result = await response.json();
  const results = result.claim_groups.map((group) => group.verdict?.result);
  const decision = results.every((r) => r === "supported")
    ? "proceed"
    : results.includes("contradicted") ? "stop" : "ask_a_person";
  return { decision, citationId: result.citation_id, groups: result.claim_groups };
}
```

A failed request is not a pass. If the call errors or times out, route the action to a person rather than letting it proceed unchecked. To check against the documents the agent was given rather than the open web, pass up to five public HTTPS URLs in `source_urls`, or use `filters` such as `is_primary_source`. See [verify a claim](/api-docs/verify).

## Check quotes the agent took from documents

When an agent quotes a file or a page to justify an action, check the quote against that source. [Batch quote checks](/api-docs/batch) (MCP `verify_batch`) take up to 200 quotes, each with its `url`, `asset_id` and `page`, or `source_text`, and return a `binding` and a `verification.band` for each. Treat `needs_review` as a reason to ask a person: fuzzy and reflowed matches always land there. [Show the source of an AI answer](/api-docs/source-links) explains each match method.

## Keep the record of what was checked

Every verification is saved. Store the returned `citation_id` with the action, and read the record back later with [get a saved verification](/api-docs/citation) (`GET /api/v1/citations/{id}`, MCP `get_citation`) or list them with [list saved verification records](/api-docs/citations). When a reviewer overrules a batch result, record it with [reviewer feedback](/api-docs/feedback) using the item's `feedback_token`. [Audit evidence](/governance) describes what these records show and what they do not prove.
