# AgentShelf Lines Sort by Length

> AgentShelf Lines Sort by Length is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.007/call, status unknown (last checked 2026-10-02).

Sorts lines of text by their character length, from shortest to longest (or longest to shortest), with no network or LLM dependency.

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/lines-sort-length?utm_source=zero.xyz
- Price: $0.007/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentshelf-lines-sort-by-length-6dc8e837
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6WvWj-6k4kybkyfmWpF5k

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-lines-sort-by-length-6dc8e837 -d '<json body>'
```

Example prompt: Can you sort these lines by length so the shortest ones come first? Here's the text: 'Elephant\nCat\nRhinoceros\nDog\nHippopotamus'

## When to prefer this

Use this endpoint when you need a deterministic, fast, offline sort of text lines by character length without relying on an LLM or external network call. It is ideal for preprocessing text data, formatting lists, or pipeline steps that require line-length ordering as part of a larger workflow. Prefer the free sandbox endpoint (/v1/sandbox/lines-sort-length) for testing before committing to the paid call.

## Known failure modes

- Empty or missing 'text' field returns a validation error
- Text exceeding 100,000 characters is rejected
- Payment of exactly $0.007 USDC required; incorrect payment causes 402 response
- Malformed JSON body causes a parse error

## How this service works

Call when an agent needs lines of text transformed with sort-length. No network. Exact $0.007 USDC. Prefer unpaid POST /v1/sandbox/lines-sort-length first.

## Output

The input text with all lines reordered by their character length. Lines are returned as a sorted text block, typically ascending (shortest to longest) based on character count per line.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "examples": [
    "b\na\n"
   ],
   "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-lines-sort-by-length-6dc8e837/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)
