# Automata Text Comparator — Literal String Diff

> Automata Text Comparator — Literal String Diff is a paid API for AI agents from tienda.textokit.store, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-20).

Compares two text strings byte-by-byte and returns whether they are equal, their lengths, and the exact position of the first difference in Unicode code points and UTF-16 offsets.

## Facts

- Endpoint: POST https://tienda.textokit.store/api/comparar-textos?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/automata-text-comparator-literal-string-diff-846200e0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JZdp7n3PzaoxaO9c51yWe

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 automata-text-comparator-literal-string-diff-846200e0 -d '<json body>'
```

Example prompt: Compare these two texts character by character and tell me exactly where they first differ — the original is 'Hello world' and the delivered version is 'Hello World'.

## When to prefer this

Choose this endpoint when you need a literal, character-level comparison of two text strings and need to know the exact position (line, column, UTF-16 offset, code point index) of the first discrepancy. It is ideal for verifying document integrity, checking submission accuracy, or debugging text pipelines where exact byte-level equality matters. It does NOT normalize whitespace, infer semantic equivalence, or check file bytes — use it strictly for raw string comparison up to 20,000 UTF-16 units per string.

## Known failure modes

- Input string exceeds 20,000 UTF-16 units — request rejected
- Malformed JSON body — 400 error
- Payment not provided or insufficient USDC — 402 Payment Required
- Network or Base blockchain transaction failure — payment not confirmed
- Missing 'original' or 'entrega' fields — validation error

## How this service works

Compare two strings literally, with no normalization and no inference: equality, lengths, and the first difference with line, column, Unicode code point and UTF-16 offset. Up to 20,000 UTF-16 units each. Use this when an agent must check that a delivered text matches the agreed text exactly, or locate where two versions diverge. Deterministic JSON. Free sample at /api/comparar-textos/sample.

## Output

A JSON object indicating whether the two strings are equal ('equal' boolean), the UTF-16 and code-point lengths of each string, and — if they differ — the precise location of the first difference including line number (1-based), column number (1-based, in code points), UTF-16 offset (0-based), the specific character and its Unicode code point in each string, and a note on the scope and limitations of the comparison.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "entrega": {
   "type": "string",
   "maxLength": 20000,
   "description": "Delivered text; handler limit: 20000 UTF-16 units"
  },
  "original": {
   "type": "string",
   "maxLength": 20000,
   "description": "Original text; handler limit: 20000 UTF-16 units"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "equal": false,
  "scope": "Compara literalmente las cadenas recibidas, sin normalización ni inferencia. No verifica bytes de archivos, hechos ni aceptación de una entrega.",
  "lengths": {
   "entrega": {
    "utf16": 3,
    "codePoints": 2
   },
   "original": {
    "utf16": 3,
    "codePoints": 2
   }
  },
  "firstDifference": {
   "line": 1,
   "column": 2,
   "entrega": {
    "character": "b",
    "codePoint": "U+0062"
   },
   "original": {
    "character": "a",
    "codePoint": "U+0061"
   },
   "utf16Offset": 2,
   "codePointIndex": 1
  },
  "positionConvention": {
   "lineBase": 1,
   "columnBase": 1,
   "columnUnit": "Unicode code points",
   "lineSeparator": "LF",
   "utf16OffsetBase": 0,
   "codePointIndexBase": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/automata-text-comparator-literal-string-diff-846200e0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tienda.textokit.store](https://www.zero.xyz/host/tienda.textokit.store/llms.txt)
