POST
/
api
/
chunk
/
split
curl --request POST \
  --url https://api.trieve.ai/api/chunk/split \
  --header 'Content-Type: application/json' \
  --data '{
  "body_remove_strings": [
    "Warning:",
    "Note:"
  ],
  "chunk_html": "",
  "heading_remove_strings": [
    "###",
    "##",
    "#"
  ]
}'
{
  "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"
      ]
    }
  ]
}

Body

application/json
JSON request payload to perform RAG on some chunks (chunks)
chunk_html
string
required

The HTML content to be split into chunks

body_remove_strings
string[] | null

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

heading_remove_strings
string[] | null

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

Response

200
application/json
This will be a JSON response of the chunks split from the HTML content with the headings and body
chunks
object[]
required