# Verify a factual claim before acting

## When to use

Call this before your agent takes an action whose consequences depend on a
factual claim being true. Payments, medical or legal recommendations, contract
terms, compliance-relevant reports, moves that are hard to reverse. The
verification is pre-action: it produces a signed record of what was known and
checked at the moment of the decision when signing succeeds, not an after-the-fact reconstruction.

Endpoint:

- `POST /evaluate` — claim in, verdict out, with sources listed for reference (they don't feed the verdict yet). Use when your agent has
  a raw claim string and needs Tanilo to run its model checks.
  Free during the beta: no key and no payment header, rate-limited.
  Experimental. Not suitable for automatically authorizing actions. The response applies the published gate calculation plus an additional caller threshold; the receipt signs the gate result, not the caller threshold or response recommendation.

## Access

`/evaluate` and `/v1/verify-facts` are free during the beta: no payment header, no account, no API key header. No paid plan is announced. To ask about higher limits, join early access at https://tanilo.io/register. The `/evaluate` result cache is disabled. Requests that proceed to evaluation run fresh checks rather than replaying a cached response. A signed receipt is returned when signing succeeds.

## Call shape — POST /evaluate

Send the claim text. Request body:

```json
{
  "content": "<claim text>",
  "min_confidence": 0.7
}
```

Send at most 4,000 UTF-16 code units of text as `content`; longer input is refused with HTTP 413 `input_too_long` and nothing is cut. URL input is disabled: a request that includes `url` is refused with HTTP 422 `url_input_disabled`, because /evaluate does not extract text from a fetched page.

Response body includes `evaluation_id` and `evaluation` (per-claim verdicts,
evidence, confidence, plain-English recommendation). An /evaluate response includes,
when signing succeeds, a signed receipt suitable for retention as evidence.

## What you get back

A signed envelope containing:

- The `subject` (claim hash, skill hash) tied to the specific claim
- The `v_gate` verdict, confidence, threshold, adversarial result, and
  recommendation
- Envelope kind and version (`verification.v0.3+composed`)
- Signature line with `kid` matching Tanilo's published JWKS

The receipt IS the artifact. Retain it as evidence of what was decided and
why, at the time.

## How to verify the receipt (offline)

The signed receipt verifies without any Tanilo service call:

```bash
pip install tanilo-receipt-verify
curl -s https://agentoracle.co/.well-known/jwks.json -o jwks.json
python3 -c "import json; from tanilo_receipt_verify import verify; r=verify(json.load(open('receipt.json')), jwks_by_issuer={'https://agentoracle.co/.well-known/jwks.json': json.load(open('jwks.json'))}); print(r.status)"
```

The JWKS is publicly cacheable. Once cached, verification runs against
canonical bytes (RFC 8785) and Ed25519 signature (RFC 8037) with no network
dependency. Offline verification requires the receipt, the applicable public key material
and a compatible verifier. Signature validity does not establish the truth of the assessment.

## Hard rule

**Treat `verdict: "halt"` as a stop signal.** Do not act on the claim, even
if some other axis reads well. Halt means the published rule didn't permit the action for this claim, for
example because the model checks refuted it, couldn't establish it, it
didn't survive the counter-argument check, or a claim-producing checker's answer was unusable. (Some Tanilo
customer-facing surfaces label this outcome `do_not_act` for readability;
the machine-facing API enum is `halt`.)

**Retain the receipt.** Whether the verdict was `"act"` or `"halt"`, keep
the signed receipt in your evidence store. It is a signed record of what the issuer reported at
evaluation time. Retain it with the applicable policy and supporting evidence; the
signature alone does not establish when the record existed or what was actually known.

## References

- Spec (IETF Internet-Draft): https://datatracker.ietf.org/doc/draft-krausz-verification-state
- Conformance vectors + reference verifiers: https://github.com/TKCollective/tanilo-receipt-spec
- JWKS: https://agentoracle.co/.well-known/jwks.json
- Whitepaper: https://tanilo.io/whitepaper
- Changelog: https://tanilo.io/changelog
