# NewBotLabor Text Chunker

> NewBotLabor Text Chunker is a paid API for AI agents from newbotlabor--254ecdfcc2de11f19b541607ee4eb77e.web.val.run, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-22).

Splits plain text or markdown into overlapping chunks with heading-path metadata, paid per-call via x402 USDC on Base.

## Facts

- Endpoint: POST https://newbotlabor--254ecdfcc2de11f19b541607ee4eb77e.web.val.run/api/text/chunk?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/newbotlabor-text-chunker-c31564cb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_27AkQmaF20C2chUxiiCSh

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 newbotlabor-text-chunker-c31564cb -d '<json body>'
```

Example prompt: Chunk this markdown document into pieces of at most 1500 characters with 150-character overlap, preserving heading context so I can index each chunk for RAG retrieval.

## When to prefer this

Choose this endpoint when you need deterministic, structure-aware text chunking with heading-path metadata for markdown documents, especially in RAG or embedding pipelines where preserving section context matters. It is ideal for agents that cannot install local libraries and need a pay-per-call, zero-account-setup solution via x402 USDC micropayments on Base.

## Known failure modes

- overlap >= maxChars/2 returns a validation error
- text exceeding 1 MB is rejected
- invalid mode enum value returns a 400 error
- missing required 'text' field returns a 400 error
- payment failure or insufficient USDC balance returns a 402 Payment Required response

## How this service works

Pay-per-call utilities for autonomous agents, paid with x402 (USDC on Base; no account, no API key).

## Output

A JSON object containing an array of chunk objects, each with its text content, character length, start/end byte offsets, approximate token count, zero-based index, and heading path (breadcrumb of parent headings for markdown mode). Also returns summary fields: total chunks, total characters, input characters, overlap, maxChars, and detected or specified mode.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "enum": [
    "markdown",
    "plain"
   ],
   "type": "string",
   "description": "default auto-detect"
  },
  "text": {
   "type": "string",
   "description": "plain text or markdown, max 1 MB"
  },
  "overlap": {
   "type": "integer",
   "minimum": 0,
   "description": "default 150, must be < maxChars/2"
  },
  "maxChars": {
   "type": "integer",
   "maximum": 8000,
   "minimum": 200,
   "description": "default 1500"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "markdown",
  "chunks": [
   {
    "text": "# Guide",
    "chars": 7,
    "index": 0,
    "endOffset": 7,
    "headingPath": [
     "Guide"
    ],
    "startOffset": 0,
    "approxTokens": 2
   },
   {
    "text": "## Install\n\nRun the installer. Then restart.\n\n```sh\nnpm i x402\n```",
    "chars": 66,
    "index": 1,
    "endOffset": 75,
    "headingPath": [
     "Guide",
     "Install"
    ],
    "startOffset": 9,
    "approxTokens": 17
   }
  ],
  "overlap": 150,
  "maxChars": 1500,
  "inputChars": 75,
  "totalChars": 73,
  "totalChunks": 2,
  "approxTokens": 19
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/newbotlabor-text-chunker-c31564cb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from newbotlabor--254ecdfcc2de11f19b541607ee4eb77e.web.val.run](https://www.zero.xyz/host/newbotlabor--254ecdfcc2de11f19b541607ee4eb77e.web.val.run/llms.txt)
