# Vextorium Text Diff API

> Vextorium Text Diff API 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 versions line-by-line or word-by-word, returning similarity percentage, added/removed counts, a list of changes with positions, and a unified diff.

## Facts

- Endpoint: POST https://api.vextorium.com/diferencias-texto-pago?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-api-efe9073e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dH68nr0EukubWF5DTpBPi

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-api-efe9073e -d '<json body>'
```

Example prompt: Compare these two contract versions line by line and tell me the similarity percentage, what lines were added or removed, and show me the unified diff with 3 lines of context.

## When to prefer this

Use this endpoint when you need a structured, machine-readable diff between two text versions — especially when you need both a human-readable unified diff AND programmatic change data (positions, counts, similarity score) in one call. Prefer it over generic diff tools when you need the similarity percentage and per-change position metadata, or when comparing contracts, prompts, configs, or scraped pages in an automated agent workflow.

## Known failure modes

- Missing required fields (original or modificado) returns a validation error
- Very large texts may time out or hit payload limits
- Invalid mode enum value (not 'lineas' or 'palabras') causes schema rejection
- Non-string body values cause type errors
- contexto out of range 0-10 may cause unexpected behavior

## How this service works

Compare two texts by lines or words: similarity %, added and removed items, list of changes with positions, and a unified diff. For contract versions, prompts, configs or scraped pages.

## Output

A JSON object containing: the comparison mode used (lines or words), whether the texts are identical, similarity percentage (parecido_pct), count of added and removed elements, total element counts for each text, a list of changes each with type (added/removed/changed), before/after values, and positions in both originals, plus a unified diff string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "modo": {
   "enum": [
    "lineas",
    "palabras"
   ],
   "type": "string"
  },
  "contexto": {
   "type": "integer",
   "description": "Context lines in the unified diff (0-10)"
  },
  "original": {
   "type": "string"
  },
  "modificado": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "modo": "lineas",
  "cambios": [
   {
    "tipo": "cambiado",
    "antes": "Price: 10 EUR",
    "despues": "Price: 12 EUR",
    "posicion_nueva": 1,
    "posicion_original": 1
   },
   {
    "tipo": "cambiado",
    "antes": "Warranty: 1 year",
    "despues": "Warranty: 2 years",
    "posicion_nueva": 3,
    "posicion_original": 3
   }
  ],
  "anadidos": 2,
  "quitados": 2,
  "identicos": false,
  "parecido_pct": 33.33,
  "diff_unificado": "--- 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",
  "elementos_original": 3,
  "elementos_modificado": 3
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vextorium-text-diff-api-efe9073e/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)
