# chainverdict.xyz Document Diff

> chainverdict.xyz Document Diff is a paid API for AI agents from chainverdict.xyz, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Computes a structured per-line diff of two text blocks, returning additions, deletions, changes, and an identical flag to detect document changes.

## Facts

- Endpoint: POST https://chainverdict.xyz/v1/doc/diff
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chainverdict-xyz-document-diff-ee2546a3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DdBrp5AcT1UnEb5HV09cJ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability chainverdict-xyz-document-diff-ee2546a3 -d '<json body>'
```

Example prompt: Compare these two versions of our supplier contract and tell me exactly which lines were added, deleted, or changed — and whether they're identical overall.

## When to prefer this

Choose this endpoint when you need a structured, machine-readable line-by-line diff of two text documents — especially contracts, policies, specs, or terms — and want explicit addition/deletion/change categorization plus an identical flag, rather than a human-readable summary or a semantic similarity score.

## Known failure modes

- Missing or empty body fields cause a 400 validation error
- Extremely large documents may hit payload size limits
- Non-text binary content passed as input will produce garbled or error output
- Network timeout if the service is temporarily unavailable
- Payment failure if insufficient USDC balance for the $0.002 per-call fee

## How this service works

Structured diff of two text blocks: per-line additions, deletions and changes, plus an identical flag. Use it to detect whether a contract, policy or spec changed between two fetches.

## Output

Returns a structured diff object with per-line entries categorized as additions, deletions, or changes, along with an identical boolean flag indicating whether the two input text blocks are completely unchanged relative to each other.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "a",
  "b"
 ],
 "properties": {
  "a": {
   "type": "string"
  },
  "b": {
   "type": "string"
  },
  "mode": {
   "enum": [
    "lines",
    "words",
    "chars"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainverdict-xyz-document-diff-ee2546a3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chainverdict.xyz](https://www.zero.xyz/host/chainverdict.xyz/llms.txt)
