# Machine Shop – Chunk Text

> Machine Shop – Chunk Text is a paid API for AI agents from api.pay-forge.online, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-20).

Splits a long text string into overlapping fixed-size chunks with character offsets and indices

## Facts

- Endpoint: POST https://api.pay-forge.online/v1/chunk-text?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/machine-shop-chunk-text-20dc860b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xID-r2Pf5w_j2t02pbZJC

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 machine-shop-chunk-text-20dc860b -d '<json body>'
```

Example prompt: Split this 10,000-character article into chunks of 1,500 characters with 150 characters of overlap so I can embed each piece: [article text here]

## When to prefer this

Choose this endpoint when you need deterministic, offset-aware text chunking with configurable size and overlap for downstream embedding, retrieval, or evidence-extraction workflows. It is ideal when you need character-level start/end positions for each chunk (e.g. to cite sources), when preparing documents for vector databases, or when working within the Machine Shop document-analysis ecosystem where other endpoints consume chunked inputs.

## Known failure modes

- Text exceeds 50,000 character limit — request rejected
- chunk_size below 64 or above 10,000 — validation error
- overlap equal to or greater than chunk_size — may produce degenerate chunks
- Empty or missing text field — returns empty chunks array or error
- Payment not provided or insufficient — 402 Payment Required response

## How this service works

Turn Apify product scrape results into safe catalog updates with Catalog Update Gate. Find evidence in supplied documents, compare snapshots, extract typed JSON fields, inspect x402 quotes and assess API migrations. Preview inputs, evidence and cost for free. No live web search, scheduled monitoring or third-party purchasing.

## Output

An array of chunk objects, each containing the chunk index, the extracted text substring, and its start and end character positions within the original input string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "title": "Text",
   "maxLength": 50000
  },
  "overlap": {
   "type": "integer",
   "title": "Overlap",
   "default": 150,
   "maximum": 9999,
   "minimum": 0
  },
  "chunk_size": {
   "type": "integer",
   "title": "Chunk Size",
   "default": 1500,
   "maximum": 10000,
   "minimum": 64
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chunks": [
   {
    "end": 11,
    "text": "Hello world",
    "index": 0,
    "start": 0
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/machine-shop-chunk-text-20dc860b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.pay-forge.online](https://www.zero.xyz/host/api.pay-forge.online/llms.txt)
