# SignalHarness Document Diff

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

Computes a structured diff between two text documents, returning added, changed, and removed sections with line counts and hashes.

## Facts

- Endpoint: POST https://signalharness.ai/api/agent/services/document_diff/invoke
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/signalharness-document-diff-da181627
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BZObvbOid1Y7muzNIuz05

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 signalharness-document-diff-da181627 -d '<json body>'
```

Example prompt: Compare these two versions of my contract and tell me exactly what sections were added, removed, or changed — here's the original text and the revised version.

## When to prefer this

Choose this endpoint when you need a structured, machine-readable diff of two text documents — especially when you need section-level granularity, SHA-256 integrity hashes, and exact counts of additions, deletions, and changes. Prefer it over simple string comparison when downstream agents need to act on specific changed sections, or when audit trails (via payment receipts and hashes) are required. It is well-suited for contract review, configuration auditing, and document version tracking workflows.

## Known failure modes

- Input text exceeds 65,536 character limit — request rejected with validation error
- Empty or missing 'before'/'after' fields may return zero-delta result with all-zero hashes
- Network or payment failure returns a non-succeeded status in the receipt
- Malformed JSON body results in a 400-level error before execution begins

## How this service works

Explore 330 pay-per-call x402 API services and 27 agent-native digital products, with Base USDC pricing, secure Polar checkout, and free discovery.

## Output

A JSON object containing a summary of added, changed, and removed section counts; arrays of added, changed, and removed sections with their content; line counts for both the before and after documents; section counts; and SHA-256 hashes of both documents for integrity verification. Also includes execution metadata such as latency, payment receipt, and request IDs.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "after": {
   "type": "string",
   "maxLength": 65536,
   "minLength": 0
  },
  "before": {
   "type": "string",
   "maxLength": 65536,
   "minLength": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "replay": false,
  "result": {
   "summary": {
    "added": 0,
    "changed": 0,
    "removed": 0
   },
   "afterHash": "0000000000000000000000000000000000000000000000000000000000000000",
   "beforeHash": "0000000000000000000000000000000000000000000000000000000000000000",
   "addedSections": [
    {
     "hash": "example000000000000000000000000000000000000000000000000000000000",
     "text": "Example caller-supplied content.",
     "heading": "example",
     "lineCount": 0
    }
   ],
   "afterLineCount": 0,
   "beforeLineCount": 0,
   "changedSections": [
    {
     "heading": "example",
     "afterHash": "example000000000000000000000000000000000000000000000000000000000",
     "afterText": "example",
     "beforeHash": "example000000000000000000000000000000000000000000000000000000000",
     "beforeText": "example"
    }
   ],
   "removedSections": [
    {
     "hash": "example000000000000000000000000000000000000000000000000000000000",
     "text": "Example caller-supplied content.",
     "heading": "example",
     "lineCount": 0
    }
   ],
   "afterSectionCount": 0,
   "beforeSectionCount": 0
  },
  "status": "succeeded",
  "receipt": {
   "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "usage": [],
   "status": "succeeded",
   "network": "eip155:8453",
   "artifacts": [],
   "endedAtMs": 0,
   "latencyMs": 0,
   "paymentId": "example-payment",
   "receiptId": "example-receipt",
   "requestId": "example-request",
   "serviceId": "document_diff",
   "executionId": "example-execution",
   "startedAtMs": 0,
   "amountAtomic": "20000",
   "resultSha256": "209b1a6d14c3a45c31cfea93dff5e343947ff7274aae503f4348125e94b17916",
   "serviceVersion": "1.0.0",
   "settlementReference": "0x0000000000000000000000000000000000000000000000000000000000000000"
  },
  "artifacts": [],
  "requestId": "example-request",
  "executionId": "example-execution"
 }
}
```

## More

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