# Arch Tools — diff-text

> Arch Tools — diff-text is a paid API for AI agents from archtools.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Compares two text strings and returns a diff showing what changed between them, in unified or other formats

## Facts

- Endpoint: POST https://archtools.dev/v1/tools/diff-text
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/arch-tools-diff-text-c2c9fc57
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_d1_JyBCEfwhtuEsQbwWhV

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 arch-tools-diff-text-c2c9fc57 -d '<json body>'
```

Example prompt: Can you diff these two versions of my README file and show me what changed? Here's the original: 'Hello world. This is v1.' and the modified version: 'Hello world. This is v2. Added new features.' Use unified format.

## When to prefer this

Choose this endpoint when you need a programmatic, pay-per-use text diff without setting up any infrastructure. Ideal for AI agents that occasionally need to compare text snippets, detect document changes, or summarize edits as part of a larger workflow. Prefer this over git diff or local tools when operating in a serverless or sandboxed environment with no shell access. The $0.01 USDC per-call pricing makes it cost-effective for low-to-moderate volume use cases.

## Known failure modes

- Missing required fields (text1 or text2) returns a validation error
- Extremely large text inputs may be rejected or time out
- Invalid mode value may return an error or fall back to default unified format
- Payment failure (insufficient USDC balance) blocks the request
- Empty strings for both inputs may return an empty or trivial diff

## How this service works

Arch Tools — diff-text

## Output

A JSON response containing the diff output between the two input texts, showing additions, deletions, and unchanged lines. The format depends on the mode parameter (default: unified diff), similar to standard Unix diff output, indicating which lines were added (+), removed (-), and contextual lines around changes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "enum": [
    "unified",
    "words",
    "chars",
    "json"
   ],
   "type": "string",
   "default": "unified",
   "description": "Diff output format"
  },
  "text1": {
   "type": "string",
   "description": "Original text"
  },
  "text2": {
   "type": "string",
   "description": "Modified text"
  }
 }
}
```

## More

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