Catalog/rag-recursive-character-split

Retrieval

Recursive character splitter API

LangChain-style recursive character splitter: splits on a separator hierarchy down to a size limit with optional overlap. Answers 'How do I recursively split text like LangChain?', 'How do I chunk with a separator hierarchy?'.

Price$0.03per request
MethodPOST
Route/v1/retrieval/recursive-character-split
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
chunkrecursivesplitlangchaincharacterragingestionoverlap
API URLhttps://x402.hexl.dev/v1/retrieval/recursive-character-split
Integration docs
Example request
{
  "text": "Hello world. This is a test of recursive splitting logic.",
  "chunkSize": 25,
  "chunkOverlap": 5
}
Example response
{
  "chunkSize": 25,
  "chunkOverlap": 5,
  "separators": [
    "\n\n",
    "\n",
    ". ",
    " ",
    ""
  ],
  "chunkCount": 3,
  "chunks": [
    {
      "index": 0,
      "text": "Hello world This is a",
      "charCount": 21
    },
    {
      "index": 1,
      "text": " is a test of recursive",
      "charCount": 23
    },
    {
      "index": 2,
      "text": "rsive splitting logic.",
      "charCount": 22
    }
  ]
}
Input schema
{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string"
    },
    "chunkSize": {
      "type": "integer"
    },
    "chunkOverlap": {
      "type": "integer"
    },
    "separators": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}