POST
/
v1
/
chunk
/
late
curl --request POST \
  --url https://api.chonkie.ai/v1/chunk/late \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "text": "<string>",
  "embedding_model": "sentence-transformers/all-minilm-l6-v2",
  "chunk_size": 512,
  "recipe": "default",
  "lang": "en",
  "min_characters_per_chunk": 24
}'
[
  {
    "text": "<string>",
    "start_index": 123,
    "end_index": 123,
    "token_count": 123,
    "sentences": [
      {
        "text": "<string>",
        "start_index": 123,
        "end_index": 123,
        "token_count": 123
      }
    ],
    "embedding": [
      123
    ]
  }
]

Authorizations

Authorization
string
header
required

Your API Key from the Chonkie Cloud dashboard

Body

application/json

Data to pass to the Late Chunker.

text
required

The input text or list of texts to be chunked.

embedding_model
string
default:sentence-transformers/all-minilm-l6-v2

SentenceTransformer model to use for embedding

chunk_size
integer
default:512

Maximum number of tokens per chunk

recipe
string
default:default

Rules to split text by. Find all recipes on our Hugging Face.

lang
string
default:en

Language of the text. This must match the language of the recipe.

min_characters_per_chunk
integer
default:24

Minimum number of characters per sentence

Response

200 - application/json
Successful Response: A list of late chunk objects.
text
string

The actual text content of the chunk.

start_index
integer

The starting character index of the chunk within the original input text.

end_index
integer

The ending character index (exclusive) of the chunk within the original input text.

token_count
integer

The number of tokens in this specific chunk, according to the tokenizer used.

sentences
object[]

List of standard sentences contained within this chunk.

Represents a single sentence within a chunk.

embedding
number[] | null

Optional embedding vector for the entire chunk (array of floats or null).

Was this page helpful?