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

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
git
string
config
object

Response

200
application/json
Document indexed successfully
status
enum<string>
Available options:
success,
failed
document_ids
string[]