POST
/
v1
/
chunk
/
sdpm
curl --request POST \
  --url https://api.chonkie.ai/v1/chunk/sdpm \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form embedding_model=minishlab/potion-base-8M \
  --form 'threshold=<string>' \
  --form mode=window \
  --form chunk_size=512 \
  --form similarity_window=1 \
  --form min_sentences=1 \
  --form min_characters_per_sentence=12 \
  --form threshold_step=0.01 \
  --form 'delim=<string>' \
  --form include_delim=prev \
  --form return_type=chunks
[
  {
    "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

multipart/form-data

Response

200 - application/json

Successful Response: A list of SemanticChunk objects.

A list containing SemanticChunk objects (as SDPM uses semantic chunking), detailing segments and sentences with optional embeddings.