# AgentShelf Newline Collapse

> AgentShelf Newline Collapse is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.009/call, status unknown (last checked 2026-10-02).

Normalizes text by collapsing multiple consecutive newlines into a single newline, with no network calls or LLM involved.

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/newline-collapse?utm_source=zero.xyz
- Price: $0.009/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentshelf-newline-collapse-7031d8a3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kbHCIWl6zvl7RIfcNJPDl

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 agentshelf-newline-collapse-7031d8a3 -d '<json body>'
```

Example prompt: Can you collapse all the extra blank lines in this text so there are no consecutive newlines? Here's the content: 'Hello\n\n\nWorld\n\n\nFoo'

## When to prefer this

Choose this endpoint when you need a deterministic, cheap, offline text normalization operation specifically targeting newline collapsing — no LLM required and no network side effects. It is preferable when you need guaranteed consistent output, low cost ($0.009 USDC), and no latency from AI inference.

## Known failure modes

- Empty or missing 'text' field returns validation error
- Text exceeding 100,000 characters is rejected
- Payment failure (x402) if USDC is not provided or insufficient

## How this service works

Call when an agent needs newlines normalized to collapse. No network and no LLM. Exact $0.009 USDC. Prefer unpaid POST /v1/sandbox/newline-collapse first.

## Output

Returns the input text with all sequences of multiple consecutive newline characters collapsed into a single newline, leaving the rest of the content unchanged.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "examples": [
    "Hello, World!"
   ],
   "maxLength": 100000,
   "minLength": 1,
   "description": "Input for this SKU. The route description says whether it is plain text, a URL, base64 bytes, or an already-encoded token."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentshelf-newline-collapse-7031d8a3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentshelf.syntexa.ch](https://www.zero.xyz/host/agentshelf.syntexa.ch/llms.txt)
