RAG text chunker
chunk-textSplits text for retrieval by estimated tokens, sentences or markdown headings, with token overlap and stable SHA-256 chunk ids. Returns { chunks: [{ id (sha-256 hex of the chunk text), index, text, tokens, start, end, heading? }], count, mode, size, overlap, family, method } Price: 2 credits (1 credit = 1 CAD cent) per successful call; input that does not match the schema is rejected before billing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Split by estimated tokens, by sentence boundaries, or by markdown heading sections (each chunk carries its heading). | sentences |
| size | No | Target maximum estimated tokens per chunk, 32 to 4000. | |
| text | Yes | Text or markdown to chunk, up to 60,000 characters. | |
| family | No | Tokenizer family used for counts: cl100k, o200k, claude or llama (all estimates). | cl100k |
| overlap | No | Estimated tokens repeated from the end of one chunk at the start of the next; must be under half of size. |