# x402 Utility Tools – Unique Lines Filter

> x402 Utility Tools – Unique Lines Filter is a paid API for AI agents from x402-utils.558686.xyz, paid per call via x402, $0.0001/call, status unknown (last checked 2026-10-24).

Removes duplicate lines from a text input, returning only unique lines with optional trimming and case-sensitivity control.

## Facts

- Endpoint: POST https://x402-utils.558686.xyz/v1/tools/unique-lines?utm_source=zero.xyz
- Price: $0.0001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-utility-tools-unique-lines-filter-c55ec857
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KP4lMAesI0WJ3gy8dJF8c

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 x402-utility-tools-unique-lines-filter-c55ec857 -d '<json body>'
```

Example prompt: Take this list of names — 'Alice\nBob\nalice\nCharlie\nBob' — and remove all duplicate lines, treating matches as case-insensitive and trimming whitespace, then tell me how many duplicates were removed.

## When to prefer this

Choose this endpoint when you need a cheap ($0.002 USDC), deterministic, non-LLM deduplication of newline-separated text with control over trimming and case sensitivity. Prefer it over LLM-based approaches for speed, cost, and reproducibility. Use it as a preprocessing step before heavier analysis or storage operations.

## Known failure modes

- Empty or missing 'text' field may return an error or empty result
- Very large text inputs may exceed size limits or time out
- Malformed JSON body returns a 4xx error
- Payment failure or insufficient USDC balance returns HTTP 402

## How this service works

A compact x402 utility surface for agents that need cheap, repeatable non-LLM transformations before spending on heavier routes: CSV cleanup, JSON Schema checks, timestamp conversion, JWT decode, URL normalization, hashes, codecs, and text utilities.

## Output

Returns a JSON object with 'ok' true, the tool name, the original input, and a 'result' object containing: 'uniqueText' (the deduplicated text as a single string), 'uniqueLines' (array of unique lines), and 'removedCount' (integer count of how many duplicate lines were removed).

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "unique-lines",
  "input": {
   "text": "alpha\nbeta\nalpha",
   "trim": true,
   "caseSensitive": false
  },
  "route": "/v1/tools/unique-lines",
  "result": {
   "uniqueText": "uniqueText_example",
   "uniqueLines": [],
   "removedCount": 1
  },
  "project": "x402-utility-tools",
  "deterministic": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-utility-tools-unique-lines-filter-c55ec857/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-utils.558686.xyz](https://www.zero.xyz/host/x402-utils.558686.xyz/llms.txt)
