# Ysaere Agent Compare Documents

> Ysaere Agent Compare Documents is a paid API for AI agents from api.ysaere.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-20).

Compares two documents (by URL or text) and returns section-level diffs (added, removed, changed), a summary, and SHA-512 hashes of each input and the output.

## Facts

- Endpoint: POST https://api.ysaere.com/v1/intel/compare-docs?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ysaere-agent-compare-documents-26974afd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7KVozmnNtbP2MyHjeugpj

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 ysaere-agent-compare-documents-26974afd -d '<json body>'
```

Example prompt: Can you compare these two contract drafts and tell me what sections were added, removed, or changed? Here's the old version: https://example.com/contract-v1.pdf and the new version: https://example.com/contract-v2.pdf

## When to prefer this

Use this endpoint when an AI agent needs to perform a structured, section-level comparison of two documents (legal contracts, policy docs, terms of service, reports) provided either as URLs or raw text, and needs a machine-readable diff rather than a simple similarity score. It is especially valuable when you also need cryptographic integrity verification (SHA-512 hashes) or a notary stamp on the result. Prefer this over generic LLM summarization when auditability, determinism, and structured diff output matter.

## Known failure modes

- Identical inputs rejected before payment — returns an error indicating documents are the same
- Unreadable or inaccessible URLs rejected before payment
- URL fetch blocked by SSRF checks if internal/private addresses are targeted
- Text input exceeding 8,000 characters rejected
- Missing both url and text for either document a or b
- Network errors fetching remote URLs returning a fetch failure response

## How this service works

Ysaere Agent Compare Documents — $0.05 USDC. Input: {"a":{"url"|"text"},"b":{"url"|"text"}}. Returns section-level added / removed / changed items, a short summary, the SHA-512 of each input and output_sha512. Identical or unreadable inputs are refused before payment.

## Output

A structured diff containing section-level lists of added, removed, and changed items between the two input documents; a short natural-language summary of the differences; SHA-512 hashes of each input document; and a SHA-512 hash of the output itself. If the stamp flag is true, a hash_only Notary receipt over the output hash is also included. Identical or unreadable inputs are rejected before payment is processed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "object",
   "properties": {
    "url": {
     "type": "string",
     "description": "Public https URL to read (fetched with SSRF checks)."
    },
    "text": {
     "type": "string",
     "maxLength": 8000,
     "description": "Text to use instead of a URL (max 8,000 characters)."
    }
   }
  },
  "b": {
   "type": "object",
   "properties": {
    "url": {
     "type": "string",
     "description": "Public https URL to read (fetched with SSRF checks)."
    },
    "text": {
     "type": "string",
     "maxLength": 8000,
     "description": "Text to use instead of a URL (max 8,000 characters)."
    }
   }
  },
  "stamp": {
   "type": "boolean",
   "description": "Optional. When true, mint a hash_only Notary receipt over output_sha512 (integrity, not factual truth)."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ysaere-agent-compare-documents-26974afd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.ysaere.com](https://www.zero.xyz/host/api.ysaere.com/llms.txt)
