Split any text into overlapping chunks for RAG pipelines. Three strategies: token, sentence, and paragraph. Zero external API calls — runs entirely locally. Natural pair for /embeddings.
POST /text/chunk splits large text into smaller, optionally-overlapping chunks — the first step in any RAG (Retrieval-Augmented Generation) pipeline. Use it to prepare documents for /embeddings and then store them in /memory/upsert.
Max input: 500,000 characters. Overlap prevents context loss at chunk boundaries.
| Parameter | Type | Default | Description |
|---|---|---|---|
text * |
string | — | Text to chunk (max 500,000 chars) |
chunk_size |
integer | 500 | Approximate tokens per chunk (1 token ≈ 4 chars) |
overlap |
integer | 50 | Overlap tokens between consecutive chunks |
strategy |
string | sentence | token | sentence | paragraph |
Use /text/chunk + /embeddings + /memory/upsert for a complete RAG pipeline:
$0.001 per request via x402 micropayment on Base (USDC). Zero external API calls — pure local processing.