Resync File
This endpoint is used to re-generate embeddings for the specified file.
POST/resync_file
Request Body
- Name
file_id
- Required
Required
- Type
- string
- Description
The ID of the file to resync
- Name
chunk_size
- Type
- integer
- Description
The chunk size (in tokens) applied when splitting the document.
- Name
chunk_overlap
- Type
- integer
- Description
The chunk overlap (in tokens) applied when splitting the document.
Before you can make requests to the Supavec API, you will need to grab your API key from your dashboard.
JavaScript
const res = await fetch("https://api.supavec.com/resync_file", {
method: "POST",
headers: {
"Content-Type": "application/json",
authorization: apiKey,
},
body: JSON.stringify({ file_id }),
});
Response
{
"success": true,
"message": "File resynced successfully",
"file_id": "4db6b5d7-b199-4bfd-9914-6991cb4ba3b6",
"file_name": "elon_musk.txt",
"chunks": 2,
"chunk_size": 1000,
"chunk_overlap": 200
}