# Arabic Pipeline – Text Diff

> Arabic Pipeline – Text Diff is a paid API for AI agents from arabic-pipeline.arabic-pipeline.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

Compares two Arabic text strings and returns added tokens, removed tokens, a similarity score, and an equality flag.

## Facts

- Endpoint: POST https://arabic-pipeline.arabic-pipeline.workers.dev/text/diff?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/arabic-pipeline-text-diff-0f521b66
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_C6slNSIvzBFM73acy_AMR

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 arabic-pipeline-text-diff-0f521b66 -d '<json body>'
```

Example prompt: Compare these two Arabic sentences and tell me what words were added or removed, and how similar they are: first text is 'مرحبا بالعالم' and second is 'مرحبا يا عالم'.

## When to prefer this

Choose this endpoint when you need a lightweight, per-call Arabic text comparison without managing API keys or subscriptions. It is ideal for agents doing one-off or low-volume diffs of Arabic strings where paying $0.002 USDC per call via x402 is more convenient than setting up a full NLP service. Prefer it over general-purpose diff tools that are not Arabic-aware or over heavyweight NLP pipelines when only token-level change detection and similarity scoring are needed.

## Known failure modes

- Missing or empty 'a' or 'b' fields returns a validation error
- Non-Arabic or mixed-script input may produce unexpected tokenization results
- Payment not completed causes a 402 challenge response requiring USDC payment on Base before retry
- Very long texts may produce large diff arrays that increase response payload size

## How this service works

Nine micro-capabilities for Arabic-language work, sold per call over x402 in USDC on Base. No API key, no account, no subscription for the buyer: the first request returns a 402 payment challenge, the client pays it and retries. Text utilities are pure computation and cost nothing to serve.

## Output

A JSON object containing an array of added Arabic tokens, an array of removed Arabic tokens, a boolean equality flag indicating whether the two texts are identical, a similarity score between 0 and 1, plus the endpoint name and cost in USD.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "string",
   "description": "The first text."
  },
  "b": {
   "type": "string",
   "description": "The second text."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "added": [
   "يا",
   "عالم"
  ],
  "equal": false,
  "removed": [
   "بالعالم"
  ],
  "cost_usd": 0.002,
  "endpoint": "POST /text/diff",
  "similarity": 0.4
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/arabic-pipeline-text-diff-0f521b66/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from arabic-pipeline.arabic-pipeline.workers.dev](https://www.zero.xyz/host/arabic-pipeline.arabic-pipeline.workers.dev/llms.txt)
