# MoneyTools Text Diff

> MoneyTools Text Diff is a paid API for AI agents from tools.moneytools.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-05).

Computes line, word, or character-level diff between two texts, returning a unified patch, added/removed counts, and similarity score

## Facts

- Endpoint: POST https://tools.moneytools.dev/v1/diff?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-05
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/moneytools-text-diff-6c36e8cf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OHAl8VCltqzMjx9GG1OKz

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 moneytools-text-diff-6c36e8cf -d '<json body>'
```

Example prompt: Can you do a word-level diff between these two paragraphs and tell me what was added, removed, and how similar they are? Old: 'The quick brown fox jumps over the lazy dog.' New: 'The quick red fox leaps over the sleepy dog.'

## When to prefer this

Choose this endpoint when you need a structured, quantitative comparison of two text strings — particularly when you want a unified patch format, explicit added/removed counts, and a similarity score. It supports three granularity modes (line, word, character), making it flexible for comparing code, prose, or configuration text. Prefer it over manual string comparison logic or heavyweight NLP tools when you need a lightweight, pay-per-call diff with no setup.

## Known failure modes

- Missing required fields 'a' or 'b' returns a 400 error
- Invalid mode value (not 'lines', 'words', or 'chars') may return a 400 error or default behavior
- Free tier exhaustion (more than 10 calls/day without payment) triggers HTTP 402 Payment Required
- Empty strings for both inputs may return a trivial result with 100% similarity and no diff
- Very large texts may time out or be rejected
- Payment failure via x402 results in no charge and no response

## How this service works

Text diff: Line, word or character diff between two texts with a unified patch, added/removed counts and similarity. Free tier 10/day; then $0.001 via x402 (HTTP 402 + PAYMENT-REQUIRED) or X-API-Key credits. Not charged on failure. $0.001 USDC per call via x402 on Base. Run by MoneyTools.

## Output

Returns a unified diff patch showing changes between the two texts, counts of added and removed units (lines, words, or characters depending on mode), and a similarity score between 0 and 1 indicating how alike the two texts are.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "string",
   "examples": [
    "hello world"
   ],
   "description": "old text"
  },
  "b": {
   "type": "string",
   "examples": [
    "hello brave world"
   ],
   "description": "new text"
  },
  "mode": {
   "type": "string",
   "examples": [
    "words"
   ],
   "description": "lines | words | chars"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/moneytools-text-diff-6c36e8cf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tools.moneytools.dev](https://www.zero.xyz/host/tools.moneytools.dev/llms.txt)
