# Vextorium Text Diff

> Vextorium Text Diff is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-30).

Compares two text strings line-by-line or word-by-word, returning similarity percentage, added/removed counts, positional change list, and a unified diff.

## Facts

- Endpoint: POST https://api.vextorium.com/v1/text-diff?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vextorium-text-diff-bb2aadc1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rhj5_foZHFhUlPq0LNxed

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 vextorium-text-diff-bb2aadc1 -d '<json body>'
```

Example prompt: Compare these two versions of our service agreement line by line — tell me the similarity percentage, what was added or removed, and show me a unified diff with 3 lines of context.

## When to prefer this

Choose this endpoint when you need structured, machine-readable diff output including positional change metadata and similarity scoring — not just a raw diff. Ideal for agents that need to programmatically process what changed (e.g. flag contract modifications, track prompt drift, monitor config changes) rather than just display a diff to humans.

## Known failure modes

- Missing required 'original' or 'modified' fields returns a validation error
- Invalid mode value (not 'lines' or 'words') causes a schema rejection
- Context value outside 0-10 range may be rejected or clamped
- Very large texts may time out or exceed payload limits
- Empty strings for both inputs return identical=true with 100% similarity

## How this service works

244 pay-per-call data APIs for AI agents: official statistics and economy (ECB, Fed, Eurostat, World Bank, SEC, BOE, INE), crypto prices and sentiment, Spanish public data, compliance (sanctions, VAT, IBAN, LEI), science, weather, web and developer tools and local AI text tools. Pay in USDC via x402.

## Output

A JSON object containing: mode used (lines/words), whether texts are identical, similarity percentage (0-100), counts of original and modified elements, number of added and removed elements, a list of changes each with type (added/removed/modified), before/after text, and original/new positions, plus a unified diff string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "enum": [
    "lines",
    "words"
   ],
   "type": "string"
  },
  "context": {
   "type": "integer",
   "description": "Context lines in the unified diff (0-10)"
  },
  "modified": {
   "type": "string"
  },
  "original": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "lines",
  "added": 2,
  "changes": [
   {
    "type": "cambiado",
    "after": "Price: 12 EUR",
    "before": "Price: 10 EUR",
    "new_position": 1,
    "original_position": 1
   },
   {
    "type": "cambiado",
    "after": "Warranty: 2 years",
    "before": "Warranty: 1 year",
    "new_position": 3,
    "original_position": 3
   }
  ],
  "removed": 2,
  "identical": false,
  "similar_pct": 33.33,
  "unified_diff": "--- original\n+++ modificado\n@@ -1,3 +1,3 @@\n-Price: 10 EUR\n+Price: 12 EUR\n Delivery: 3 days\n-Warranty: 1 year\n+Warranty: 2 years",
  "modified_elements": 3,
  "original_elements": 3
 }
}
```

## More

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