# Agent Payload Tools – Text Diff

> Agent Payload Tools – Text Diff is a paid API for AI agents from api.agent-payload-tools.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Computes a deterministic line-by-line text diff between two strings, returning the differences between the original and updated text.

## Facts

- Endpoint: POST https://api.agent-payload-tools.workers.dev/text-diff
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-payload-tools-text-diff-31023545
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tehRRZOfyaY8JuXfYl5J8

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 agent-payload-tools-text-diff-31023545 -d '<json body>'
```

Example prompt: Show me exactly what changed between these two versions of my README file — the original says 'Installation requires Node 16' and the updated version says 'Installation requires Node 20 or higher, with npm 9+'.

## When to prefer this

Choose this endpoint when you need a deterministic, programmatic text diff within an AI agent workflow — especially when comparing configuration files, document revisions, code snippets, or any string content where exact line-by-line change detection is required. Prefer it over manual string comparison or LLM-based summarization when you need precise, structured diff output rather than a prose description of changes.

## Known failure modes

- Missing 'before' or 'after' fields returns a validation error
- Extremely large text inputs may time out or exceed payload limits
- Payment failure (x402) prevents processing
- Non-string values in before/after fields may cause errors

## How this service works

Return a deterministic line-by-line difference summary for two texts.

## Output

The endpoint returns a structured diff showing which lines or segments were added, removed, or unchanged between the 'before' and 'after' text inputs, enabling precise change detection between two versions of any text.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "after": {
   "type": "string",
   "default": "",
   "description": "Updated text."
  },
  "before": {
   "type": "string",
   "default": "",
   "description": "Original text."
  }
 }
}
```

## More

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