# agent402.tools Dedupe Lines

> agent402.tools Dedupe Lines is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Removes duplicate lines from text, preserving first-seen order, and returns the deduplicated text along with the count of removed lines.

## Facts

- Endpoint: POST https://agent402.tools/api/dedupe-lines
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-dedupe-lines-7779f08d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wPXUKp5B0WfgcJgWElxti

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 agent402-tools-dedupe-lines-7779f08d -d '<json body>'
```

Example prompt: Can you remove all duplicate lines from this list, case-insensitively, and tell me how many were removed? Here's the text: 'apple\nBanana\napple\ncherry\nbanana\napple'

## When to prefer this

Choose this endpoint when you need to quickly deduplicate a block of multi-line text while preserving the original first-seen order. It's ideal for cleaning lists, log outputs, config files, or any newline-delimited data where exact or case-insensitive duplicate removal is needed without sorting or reordering.

## Known failure modes

- Missing or empty text field returns an error
- Extremely large text inputs may be rejected or time out
- Non-string text value causes a schema validation error
- Network or payment failure (x402) prevents the call from completing

## How this service works

Remove duplicate lines, preserving first-seen order. Returns the deduped text and how many were removed.

## Output

Returns the deduplicated text with duplicate lines removed (preserving the first occurrence), plus a count of how many duplicate lines were removed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ci": {
   "type": "boolean",
   "description": "Case-insensitive"
  },
  "text": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "kept": 3,
  "result": "a\nb\nc",
  "removed": 2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-dedupe-lines-7779f08d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
