# Halowerk Terms Diff — Contract Version Comparison

> Halowerk Terms Diff — Contract Version Comparison is a paid API for AI agents from buero.halowerk.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-09).

Compares two versions of a contract or terms document and reports exactly what changed, using deterministic diff first and LLM-based substance analysis second.

## Facts

- Endpoint: POST https://buero.halowerk.com/v1/terms-diff?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/halowerk-terms-diff-contract-version-comparison-be75e5b3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fjZ2BgZo0SKb3jLd0GAu7

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 halowerk-terms-diff-contract-version-comparison-be75e5b3 -d '<json body>'
```

Example prompt: Compare these two contract drafts and tell me what actually changed — I'm giving you the old version as a PDF URL (https://example.com/contract-v1.pdf) and the new version inline as a DOCX base64 string — I need to know which paragraphs were modified and what the substantive differences are.

## When to prefer this

Choose this endpoint when you need reliable, deterministic contract or terms-document comparison — particularly when you need to trust the diff itself (not just a model's impression of what changed). The Myers-diff-first approach means the changed paragraphs are identified deterministically before any LLM interpretation, making it more trustworthy than asking a model to compare documents directly. Prefer this over general-purpose LLM document comparison when accuracy and auditability of the diff matter, or when documents are in mixed formats (PDF, DOCX, ODT, HTML, Markdown).

## Known failure modes

- Unsupported file format or corrupted document returns a parsing error
- URL is inaccessible or returns non-200 status — endpoint cannot fetch the document
- Base64 encoding is malformed — decoding fails
- Documents are too large and exceed processing limits
- Payment of 0.004 USDC not completed — request is rejected via x402 protocol
- Identical documents return an empty diff with no changes reported

## How this service works

Takes two contract versions as text, public URLs or inline base64 — PDF, DOCX, ODT, HTML and Markdown are read — and reports what is different. Which passages changed is decided by a Myers shortest-edit-script over the paragraphs, not by a model: the deterministic comparison is the source of truth, and only afterwards is a model asked what changed in substance at those specific places. That order is the point.

## Output

Returns a structured report of which paragraphs changed (based on a Myers shortest-edit-script diff), along with an LLM-generated summary of what changed in substance at those specific locations — giving both a deterministic source of truth for what changed and a natural-language explanation of the implications.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "object",
   "properties": {
    "url": {
     "type": "string",
     "maxLength": 2048,
     "description": "Public http(s) URL of a PDF, DOCX, ODT, HTML or text file. Private and local addresses are refused."
    },
    "text": {
     "type": "string",
     "maxLength": 200000,
     "description": "The text directly. Cheapest and clearest — its length is billed as counted here."
    },
    "format": {
     "enum": [
      "auto",
      "pdf",
      "docx",
      "odt",
      "html",
      "markdown",
      "rtf",
      "text"
     ],
     "type": "string",
     "default": "auto",
     "description": "Override the detected format. \"auto\" reads it from the bytes."
    },
    "filename": {
     "type": "string",
     "maxLength": 260,
     "description": "Only consulted when the bytes carry no recognisable signature."
    },
    "content_base64": {
     "type": "string",
     "maxLength": 4000000,
     "description": "The file inline, base64."
    }
   },
   "description": "The earlier version. Exactly one of text, url or content_base64.",
   "additionalProperties": false
  },
  "b": {
   "type": "object",
   "properties": {
    "url": {
     "type": "string",
     "maxLength": 2048,
     "description": "Public http(s) URL of a PDF, DOCX, ODT, HTML or text file. Private and local addresses are refused."
    },
    "text": {
     "type": "string",
     "maxLength": 200000,
     "description": "The text directly. Cheapest and clearest — its length is billed as counted here."
    },
    "format": {
     "enum": [
      "auto",
      "pdf",
      "docx",
      "odt",
      "html",
      "markdown",
      "rtf",
      "text"
     ],
     "type": "string",
     "default": "auto",
     "description": "Override the detected format. \"auto\" reads it from the bytes."
    },
    "filename": {
     "type": "string",
     "maxLength": 260,
     "description": "Only consulted when the bytes carry no recognisable signature."
    },
    "content_base64": {
     "type": "string",
     "maxLength": 4000000,
     "description": "The file inline, base64."
    }
   },
   "description": "The later version. Same shape as a.",
   "additionalProperties": false
  },
  "document_chars": {
   "type": "integer",
   "maximum": 24000,
   "minimum": 1,
   "description": "Only needed when a version arrives by url or content_base64: the combined length of both versions in characters, which is what you are billed for. Longer text i
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/halowerk-terms-diff-contract-version-comparison-be75e5b3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from buero.halowerk.com](https://www.zero.xyz/host/buero.halowerk.com/llms.txt)
