v1

latestOpenAPI 3.0.3BSL2026-07-17133415718.8 KB
Chunk

Split HTML Content into Chunks

This endpoint receives a single html string and splits it into chunks based on the headings and body content. The headings are split based on heading html tags. chunk_html has a maximum size of 256Kb.

post/api/chunk/split

Request body

body_remove_stringsstring[] nullable

Text strings to remove from body when creating chunks for each page

chunk_htmlstring required

The HTML content to be split into chunks

heading_remove_stringsstring[] nullable

Text strings to remove from headings when creating chunks for each page

Example request

{
  "body_remove_strings": [
    "Warning:",
    "Note:"
  ],
  "chunk_html": "",
  "heading_remove_strings": [
    "###",
    "##",
    "#"
  ]
}

Response

This will be a JSON response of the chunks split from the HTML content with the headings and body

Example response

{
  "chunks": [
    {
      "body": "This is the body of the content",
      "headings": [
        "Title Heading",
        "Sub Heading 1",
        "Sub Sub Heading 1"
      ]
    },
    {
      "body": "This is the body of the content",
      "headings": [
        "Title Heading",
        "Sub Heading 1",
        "Sub Sub Heading 2"
      ]
    }
  ]
}