# Lordevo Text Diff

> Lordevo Text Diff is a paid API for AI agents from shop.lordevo.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

Compares two texts and returns identical flag, similarity score, line/word/char stats, unified diff, and hunks

## Facts

- Endpoint: GET https://shop.lordevo.com/api/quick/text-diff?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lordevo-text-diff-d503b119
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4zBpVKnwIPVZpcjn9IwKd

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 lordevo-text-diff-d503b119
```

Example prompt: Compare these two paragraphs word by word and tell me the similarity score, what was added, what was removed, and show me the full diff: before: 'The quick brown fox jumps over the lazy dog.' after: 'The quick red fox leaped over the sleeping cat.'

## When to prefer this

Choose this endpoint when you need a structured, machine-readable diff with similarity scoring and per-unit statistics (line, word, or char) rather than just a raw diff string. It is ideal for agents that need to programmatically process change hunks, detect near-duplicates, or report what fraction of content changed. Use it over generic string comparison when you need unified diff format with context control.

## Known failure modes

- Missing 'before' or 'after' query parameters returns a validation error
- Text exceeding 200,000 characters via GET may be rejected — use POST for long inputs
- Invalid 'mode' enum value returns an error
- Invalid 'context' value (non-numeric or out of 0–20 range) returns a validation error
- Network timeout if texts are very large

## How this service works

Text diff: unified diff, hunks and similarity of two texts: Compares two texts you send and returns whether they are identical, a similarity score, counts of added, removed and unchanged lines (or words or characters), plus a unified diff and hunks in line mode or a change list in word and char mode

## Output

Returns a JSON object with: an 'identical' boolean, a 'similarity' float (0–1), a 'stats' object with added/removed/unchanged counts, and either a 'unified' diff string plus 'hunks' array (line mode) or a 'changes' array of typed segments (word/char mode). Also includes the 'mode' and 'tool' metadata fields.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "before",
      "after"
     ],
     "properties": {
      "mode": {
       "enum": [
        "line",
        "word",
        "char"
       ],
       "type": "string",
       "default": "line",
       "description": "Compare by line (default, unified diff), word or character"
      },
      "after": {
       "type": "string",
       "maxLength": 200000,
       "description": "The new text, up to 200,000 characters (POST for long text)"
      },
      "before": {
       "type": "string",
       "description": "The original text, up to 200,000 characters (POST JSON {\"before\": \"...\", \"after\": \"...\"} for long text)"
      },
      "context": {
       "type": "string",
       "default": "3",
       "pattern": "^\\d{1,2}$",
       "description": "Unchanged lines around each change in line mode, 0-20 (default 3)"
      },
      "ignore_case": {
       "enum": [
        "yes",
        "no"
       ],
       "type": "string",
       "default": "no",
       "description": "Ignore upper/lower case"
      },
      "ignore_whitespace": {
       "enum": [
        "yes",
        "no"
       ],
       "type": "string",
       "default": "no",
       "description": "Line mode: ignore leading/trailing whitespace"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "tool",
      "identical",
      "similarity",
      "stats"
     ],
     "properties": {
      "mode": {
       "enum": [
        "line",
        "word",
        "char"
       ],
       "type": "string"
      },
      "tool": {
       "type": "string"
      },
      "unit": {
       "type": "string"
      },
      "hunks": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "lines": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "new_lines": {
          "
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lordevo-text-diff-d503b119/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from shop.lordevo.com](https://www.zero.xyz/host/shop.lordevo.com/llms.txt)
