Skip to main content
{
  "message": "<string>",
  "knowledgeBaseId": "<string>"
}
Delete a file from a knowledge base. This removes the file from storage and its vectors from the search index.

Examples

import requests

kb_slug = "product-documentation"
file_id = "1705320000000-old-version.pdf"

url = f"https://labs.chonkie.ai/api/v1/knowledge/{kb_slug}/{file_id}"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.delete(url, headers=headers)
result = response.json()
print(result["message"])

Request

Path Parameters

knowledge_base_slug
string
required
The slug of the knowledge base.
file_id
string
required
The file key to delete. Format: {timestamp}-{filename}

Response

Returns

message
string
Success message confirming deletion.
knowledgeBaseId
string
ID of the knowledge base.
I