from chonkie.cloud import EmbeddingsRefinery 

refinery = EmbeddingsRefinery(api_key="{api_key}") 

refined_chunks = refinery(chunks=[YOUR_CHUNKS])
[
  {
    "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

Request body for the Embeddings Refinery endpoint.

Response

200
application/json

Successful Response: A list of Chunk objects with added embeddings.

A list containing Chunk objects, each with an added embedding field.