# 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 along with counts of added, removed, and unchanged lines.

## Facts

- Endpoint: POST https://centralcity.ai/api/public/x402/off_pcoojvpfj7ebutav?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-1d7c91b3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_t5uV9HIvcfgJD_GCd9l_X

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

Example prompt: Can you diff these two versions of my config file and show me exactly what changed, with 5 lines of context around each change? Here's the old version: 'host=localhost\nport=5432\ndb=prod' and the new version: 'host=db.example.com\nport=5432\ndb=staging'.

## When to prefer this

Use this endpoint when you need a quick, structured line-by-line text comparison with change counts and no dependency on a local diff tool. Ideal for agents comparing configuration files, source code snippets, or document drafts up to 64 KiB each. Prefer this over general-purpose LLM summarization when you need an exact, deterministic diff output with precise added/removed line counts.

## 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-limit 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 for lines added, lines removed, and lines 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-1d7c91b3/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)
