# Machine Shop – Document Preparation & Chunking

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

Parses and chunks a text document, extracting entities (URLs, dates, money, emails, EVM addresses) and returning a content hash for downstream analysis tasks.

## Facts

- Endpoint: POST https://api.pay-forge.online/v1/prepare-document?utm_source=zero.xyz
- Price: $0.01/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-document-preparation-chunking-3467c10f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Cc5Np4G8Li9xektWbnYxs

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-document-preparation-chunking-3467c10f -d '<json body>'
```

Example prompt: Can you prepare this contract text for analysis — chunk it into segments of about 1500 characters with a 150-character overlap, and pull out any dates, money amounts, email addresses, and Ethereum wallet addresses mentioned in it?

## When to prefer this

Choose this endpoint when you need to preprocess raw text into structured, searchable chunks before feeding into an LLM context window, vector store, or evidence-comparison pipeline. It is especially useful when you also need lightweight entity extraction (emails, dates, money, EVM addresses) as a free side-effect of chunking, or when you want a stable SHA-256 fingerprint for change detection. Prefer it over general-purpose text splitters when blockchain/Web3 entity extraction (EVM addresses) is needed alongside chunking.

## Known failure modes

- Text exceeds 50,000 character limit — request rejected
- chunk_size below 64 or above 10,000 — validation error
- overlap exceeds chunk_size — may produce degenerate chunks
- Empty or missing text field — empty or error response
- Non-UTF-8 or malformed input — parsing failure

## 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

Returns the full chunked representation of the input text (array of chunk objects with start/end indices and text), a SHA-256 hash of the content, extracted named entities (URLs, dates, money values, emails, EVM addresses), and a count of removed duplicate lines.

## 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": {
  "text": "Hello world",
  "chunks": [
   {
    "end": 11,
    "text": "Hello world",
    "index": 0,
    "start": 0
   }
  ],
  "sha256": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c",
  "entities": {
   "urls": [],
   "dates": [],
   "money": [],
   "emails": [],
   "evm_addresses": []
  },
  "removed_duplicate_lines": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/machine-shop-document-preparation-chunking-3467c10f/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)
