Skip to main content
POST
/
api
/
v1
/
knowledge
/
index
Index content into knowledge base
curl --request POST \
  --url https://neo.api.projectdiscovery.io/api/v1/knowledge/index \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "index_name": "<string>",
  "files": [
    {
      "relative_path": "<string>",
      "content": "<string>",
      "language": "<string>",
      "url": "<string>"
    }
  ],
  "options": {
    "chunk_overlap": 300,
    "chunk_size": 2500,
    "force_reindex": false,
    "splitter": "treesitter"
  }
}
'
{
  "indexed": {
    "index_name": "<string>",
    "total_chunks": 123,
    "total_files": 123
  },
  "message": "<string>",
  "success": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.neo.projectdiscovery.io/llms.txt

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

Authorizations

Authorization
string
header
required

JWT authentication token

Body

application/json
index_name
string
required

Name to identify this knowledge index (e.g., 'security-docs')

files
object[]
Minimum array length: 1
options
object

Response

Indexing results

indexed
object
required
message
string
required
success
boolean
required