# 402utils Text Chunker (Token-Aware RAG Splitter)

> 402utils Text Chunker (Token-Aware RAG Splitter) is a paid API for AI agents from 402utils.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Splits input text into token-measured chunks with configurable size, overlap, and boundary strategy (sentence/paragraph/token) for RAG ingestion, returning each chunk's text, token count, and character offsets.

## Facts

- Endpoint: POST https://402utils.com/v1/chunk
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/402utils-text-chunker-token-aware-rag-splitter-67654517
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lmDQSPIMoO0AWXAOxyPOC

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 402utils-text-chunker-token-aware-rag-splitter-67654517 -d '<json body>'
```

Example prompt: Split this 10,000-word article into sentence-boundary chunks of at most 512 tokens each, with a 50-token overlap, using the o200k_base encoding — I need the chunk text, exact token counts, and character offsets for each piece so I can ingest them into my vector store.

## When to prefer this

Choose this endpoint when you need real, tiktoken-measured token counts (not character estimates) for RAG pipelines targeting OpenAI-compatible embedding or completion models. Prefer it over regex-based splitters when semantic boundary respect (sentence or paragraph cuts) and accurate overlap are required. Best for preprocessing before vector DB ingestion. Not suitable if you need Claude/Anthropic tokenizer estimates.

## Known failure modes

- Text over 1 MB is truncated without error — agent may receive incomplete chunking
- overlap >= maxTokens causes a validation error
- Invalid encoding value returns 422 unprocessable entity
- Empty text body returns empty chunks array
- Very short text with large maxTokens returns a single chunk covering entire input

## How this service works

Split a long text into token-sized chunks for RAG ingestion. Chunks are measured in REAL tokens (tiktoken o200k_base/cl100k_base), honour a token overlap, and cut on sentence, paragraph or word boundaries (strategy). Returns each chunk text, its exact token count and char offsets. The natural composite of token-count; counts are OpenAI-style estimates (no Claude tokenizer exists). Provided text only; nothing is fetched. Over 1 MB is truncated.

## Output

A list of chunk objects, each containing: the chunk text string, its exact token count (measured via tiktoken), and the start/end character offsets within the original text. Input over 1 MB is silently truncated before processing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "The text to chunk (max 1 MB UTF-8; larger is truncated)."
  },
  "overlap": {
   "type": "integer",
   "default": 50,
   "minimum": 0,
   "description": "Token overlap between consecutive chunks (must be < maxTokens)."
  },
  "encoding": {
   "enum": [
    "o200k_base",
    "cl100k_base"
   ],
   "type": "string",
   "default": "o200k_base",
   "description": "tiktoken encoding used to size chunks."
  },
  "strategy": {
   "enum": [
    "sentence",
    "paragraph",
    "token"
   ],
   "type": "string",
   "default": "sentence",
   "description": "Boundary chunks cut on: sentence (semantic), paragraph (blank-line), or token (word)."
  },
  "maxTokens": {
   "type": "integer",
   "default": 512,
   "maximum": 8192,
   "minimum": 1,
   "description": "Maximum tokens per chunk."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/402utils-text-chunker-token-aware-rag-splitter-67654517/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402utils.com](https://www.zero.xyz/host/402utils.com/llms.txt)
