# AgentShelf Text Chunker

> AgentShelf Text Chunker is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-01).

Splits a text string into overlapping chunks by character count or token count, returning an array of text segments suitable for downstream processing.

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/chunk-text?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentshelf-text-chunker-2e7d481b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QXxqjXHm8MMwH-PeLjO-G

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-text-chunker-2e7d481b -d '<json body>'
```

Example prompt: Split this 5,000-word article into chunks of 512 tokens each with an overlap of 50 tokens so I can embed them for a RAG pipeline.

## When to prefer this

Use this endpoint when you need deterministic, reproducible text chunking by character count or token count with configurable overlap, without deploying your own chunking logic. Ideal for RAG pipeline preparation, embedding batch jobs, and sliding-window text processing. Prefer the free sandbox endpoint POST /v1/sandbox/chunk-text first; fall back to this paid endpoint when the sandbox is unavailable or rate-limited.

## Known failure modes

- Text exceeds 100,000 character limit — request rejected
- Chunk size above 20,000 or below 1 — validation error
- Overlap above 5,000 — validation error
- Overlap equal to or larger than chunk size — may cause infinite loop or error
- Missing required fields (text, size, unit) — 400 Bad Request
- Payment not provided or insufficient — 402 Payment Required

## How this service works

Call when an agent needs text chunked by characters or tokens with overlap. No network. Exact $0.002 USDC. Prefer unpaid POST /v1/sandbox/chunk-text first.

## Output

Returns an array of text chunks derived from the input, where each chunk is a substring of the original text up to the specified size in characters or tokens, with consecutive chunks sharing an overlap region of the specified length.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "size": {
   "type": "integer",
   "maximum": 20000,
   "minimum": 1,
   "examples": [
    4
   ],
   "description": "Chunk size in characters or tokens. Default 1000 characters or 200 tokens."
  },
  "text": {
   "type": "string",
   "examples": [
    "abcdefghij"
   ],
   "maxLength": 100000,
   "minLength": 1,
   "description": "Text to split into chunks."
  },
  "unit": {
   "enum": [
    "chars",
    "tokens"
   ],
   "type": "string",
   "examples": [
    "chars"
   ],
   "description": "chars or tokens. Default chars."
  },
  "overlap": {
   "type": "integer",
   "maximum": 5000,
   "minimum": 0,
   "examples": [
    0
   ],
   "description": "Overlap between chunks. Must be smaller than size. Default 0."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentshelf-text-chunker-2e7d481b/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)
