Knowledge Bases
Add data to a knowledge base
Knowledge Bases
Add data to a knowledge base
POST
/
knowledge-base
/
{id}
/
index
curl --request POST \
--url https://api.vectorshift.ai/v1/knowledge-base/{id}/index \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"file_data": {
"file": {
"type": "file",
"metadata": {
"name": "<string>",
"path": "<string>",
"mime_type": "<string>"
}
},
"custom_metadata": {}
},
"url_data": {
"request": {
"url": "<string>",
"recursive": true,
"return_type": "CHUNKS",
"url_limit": 123,
"ai_enhance_content": true,
"apify_key": "<string>"
},
"rescrape_frequency": "<string>"
},
"wikipedia": "<string>",
"youtube": "<string>",
"arxiv": "<string>",
"git": "<string>",
"config": {
"index_tables": false,
"analyze_documents": false,
"enrichment_tasks": [
"Vision"
],
"file_processing_implementation": "Default",
"chunk_size": 123,
"chunk_overlap": 123,
"apify_api_key": "<string>"
}
}'
{
"status": "success",
"document_ids": [
"<string>"
]
}
Authorizations
Bearer token authentication using API key
Path Parameters
Knowledge base ID
Body
Available options:
Vision
, Oneshot
, Summary
, Spreadsheet
Available options:
Default
, Textract
, Unstructured
, LlamaParse
, Other
curl --request POST \
--url https://api.vectorshift.ai/v1/knowledge-base/{id}/index \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"file_data": {
"file": {
"type": "file",
"metadata": {
"name": "<string>",
"path": "<string>",
"mime_type": "<string>"
}
},
"custom_metadata": {}
},
"url_data": {
"request": {
"url": "<string>",
"recursive": true,
"return_type": "CHUNKS",
"url_limit": 123,
"ai_enhance_content": true,
"apify_key": "<string>"
},
"rescrape_frequency": "<string>"
},
"wikipedia": "<string>",
"youtube": "<string>",
"arxiv": "<string>",
"git": "<string>",
"config": {
"index_tables": false,
"analyze_documents": false,
"enrichment_tasks": [
"Vision"
],
"file_processing_implementation": "Default",
"chunk_size": 123,
"chunk_overlap": 123,
"apify_api_key": "<string>"
}
}'
{
"status": "success",
"document_ids": [
"<string>"
]
}