# Text Chunking API

> Text Chunking API is a paid API for AI agents from x402-gateway-production-1f21.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Splits a large text string into overlapping or non-overlapping chunks of a specified size for RAG ingestion and downstream processing

## Facts

- Endpoint: POST https://x402-gateway-production-1f21.up.railway.app/text/chunk?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/text-chunking-api-a2939e71
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Mka_W3xHAxwhBQFvynGjp

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 text-chunking-api-a2939e71 -d '<json body>'
```

Example prompt: Split this 10,000-word article into chunks of 512 characters with an overlap of 50 characters so I can load them into my vector store.

## When to prefer this

Choose this endpoint when you need deterministic, machine-payable text chunking at $0.001 USDC per call via x402 protocol, especially in automated agent pipelines that need to prepare text for RAG ingestion, vector embedding, or LLM context windowing without standing up your own chunking infrastructure.

## Known failure modes

- Text exceeds 500,000 character limit — returns validation error
- Chunk size outside allowed range (50–50,000) — returns schema validation error
- Overlap exceeds chunk size — may return error or unexpected behavior
- Missing required 'text' field — returns 400 bad request
- Payment not provided or insufficient — returns x402 payment required response

## How this service works

Machine-payable x402 utilities for hashing, Base64, UUID generation, unit and timezone conversion, realtime crypto market data, webpage/document extraction, URL-to-Markdown, metadata, RAG ingestion and deterministic website change detection.

## Output

Returns a JSON response with an array of text chunks derived from the input, split according to the requested size and overlap parameters, ready for embedding or downstream NLP tasks.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "size": {
       "type": "integer",
       "maximum": 50000,
       "minimum": 50
      },
      "text": {
       "type": "string",
       "maxLength": 500000
      },
      "overlap": {
       "type": "integer",
       "maximum": 10000,
       "minimum": 0
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "ready"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/text-chunking-api-a2939e71/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production-1f21.up.railway.app](https://www.zero.xyz/host/x402-gateway-production-1f21.up.railway.app/llms.txt)
