Catalog/rag-chunk-by-paragraphs

Retrieval

Chunk text by paragraphs API

Splits text at blank-line paragraph boundaries and packs paragraphs up to a character budget. Answers 'How do I chunk text by paragraphs?', 'How do I split a doc on blank lines?'.

Price$0.02per request
MethodPOST
Route/v1/retrieval/chunk-by-paragraphs
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
chunkparagraphssplitragingestionboundarytextmarkdown
API URLhttps://x402.hexl.dev/v1/retrieval/chunk-by-paragraphs
Integration docs
Example request
{
  "text": "Para one text.\n\nPara two text.\n\nPara three.",
  "maxChars": 30
}
Example response
{
  "maxChars": 30,
  "paragraphCount": 3,
  "chunkCount": 2,
  "chunks": [
    {
      "index": 0,
      "text": "Para one text.",
      "charCount": 14,
      "paragraphCount": 1
    },
    {
      "index": 1,
      "text": "Para two text.\n\nPara three.",
      "charCount": 27,
      "paragraphCount": 2
    }
  ]
}
Input schema
{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string"
    },
    "maxChars": {
      "type": "integer"
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}