# Relaystation Text Diff

> Relaystation Text Diff is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Computes a unified diff of two text strings, showing exactly what changed between them

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/text/diff
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-text-diff-26cd6b10
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aSAQQXXMJqZ4IIlzQRU0N

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 relaystation-text-diff-26cd6b10 -d '<json body>'
```

Example prompt: Compare these two versions of my README and show me exactly what changed: [original text] vs [updated text] — give me a unified diff so I can see the added and removed lines clearly.

## When to prefer this

Choose this endpoint when you need a programmatic, pay-per-use unified diff of two text strings without standing up your own diff infrastructure. Ideal for AI agents that need to surface change summaries, generate changelogs, or validate edits at low volume with no upfront commitment. Prefer it over embedding a diff library yourself when simplicity and per-call pricing ($0.0002/MB) matter more than in-process performance.

## Known failure modes

- Missing required body fields returns a 4xx error
- Extremely large text inputs may exceed size limits and incur higher MB-based pricing
- Malformed POST body or wrong bodyType causes a parse error
- Insufficient x402 payment credit results in payment-required error

## How this service works

$0.0002/MB. Unified diff of two strings — see exactly what changed. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

A unified diff output showing the changes between the two input strings, formatted with +/- line prefixes and context lines, indicating exactly which lines were added, removed, or unchanged between the original and modified versions.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "properties": {}
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## More

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