# centralcity.ai Text Diff

> centralcity.ai Text Diff is a paid API for AI agents from centralcity.ai, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-19).

Compares two texts line by line, returning a unified diff and counts of added, removed, and unchanged lines.

## Facts

- Endpoint: POST https://centralcity.ai/api/public/x402/off_5wfufd3ikmr4jfzs?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/centralcity-ai-text-diff-8fb59c58
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ttbo4rnV3KE7JRWYnkq5o

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 centralcity-ai-text-diff-8fb59c58 -d '<json body>'
```

Example prompt: Can you diff these two versions of my config file and show me what changed, with 5 lines of context around each change? Here's the old version: [old text] and the new version: [new text].

## When to prefer this

Use this endpoint when you need a programmatic, structured diff of two text blobs — especially when you want both the human-readable unified diff output and machine-readable line counts (added/removed/kept) in a single call. Ideal for code review automation, document change summaries, config auditing, or any workflow where you need to quantify and display textual differences without spinning up a local diff tool.

## Known failure modes

- Input text exceeds 64 KiB limit — request rejected
- Context parameter outside 0–10 range — validation error
- Missing required fields 'a' or 'b' — bad request error
- Network timeout for very large near-identical texts

## How this service works

Compares two texts line by line: a unified diff and how many lines were added, removed and kept.

## Output

Returns a unified diff string showing changed lines (prefixed with + or -) and surrounding context lines, along with integer counts of lines added, lines removed, and lines kept unchanged.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "string",
   "description": "The first (old) text, at most 64 KiB."
  },
  "b": {
   "type": "string",
   "description": "The second (new) text, at most 64 KiB."
  },
  "context": {
   "type": "integer",
   "maximum": 10,
   "minimum": 0,
   "description": "Unchanged lines shown around each change, 0 to 10 (default 3)."
  }
 }
}
```

## More

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