Skip to main content
POST
/
knowledge-base
/
{id}
/
index
Index documents in a knowledge base
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",
      "raw_bytes": "aSDinaTvuI8gbWludGxpZnk=",
      "metadata": {
        "name": "<string>",
        "path": "<string>",
        "mime_type": "<string>"
      }
    },
    "custom_metadata": {}
  },
  "wikipedia": "<string>",
  "youtube": "<string>",
  "arxiv": "<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>"
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.vectorshift.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer token authentication using API key

Path Parameters

id
string
required

Knowledge base ID

Body

file_data
object
required
url_data
object
wikipedia
string
youtube
string
arxiv
string
config
object

Response

Document indexed successfully

status
enum<string>
Available options:
success,
failed
document_ids
string[]