# 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 text strings 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_7i5lql5gkmyqiufb?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-bc9aeee0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ca_qRTr45SycP8Y5hKHk4

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-bc9aeee0 -d '<json body>'
```

Example prompt: Can you compare these two versions of my config file and show me a unified diff with 5 lines of context around each change? Here's the old version: [text A] and here's the new one: [text B].

## When to prefer this

Use this endpoint when you need a quick, structured line-by-line diff of two text blobs without setting up a local diffing library — especially useful in agent workflows that compare configuration files, code snippets, or document drafts and need machine-readable change counts alongside the human-readable unified diff.

## Known failure modes

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

## 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, plus integer counts of how many lines were added, removed, and 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-bc9aeee0/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)
