Skip to main content
POST
/
v1
/
projects
/
{projectId}
/
knowledgebases
Create Knowledgebase
curl --request POST \
  --url https://api.pathors.com/v1/projects/{projectId}/knowledgebases \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "<string>",
  "embeddingModelName": "<string>",
  "chunkSize": 123,
  "chunkOverlap": 123
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.pathors.com/llms.txt

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

Request

POST https://api.pathors.com/v1/projects/{projectId}/knowledgebases

Path Parameters

projectId
string
required
The project ID

Headers

Authorization
string
required
Bearer token using your developer key

Body

name
string
required
Name of the knowledgebase
type
string
required
Knowledgebase backend. Currently only pgvector is supported.
embeddingModelName
string
required
Embedding model. One of text-embedding-ada-002, text-embedding-3-small, text-embedding-3-large. Cannot be changed after creation.
chunkSize
number
Maximum chunk size in characters. Defaults to 500.
chunkOverlap
number
Overlap between adjacent chunks in characters. Defaults to 50.

Response

Returns the created knowledgebase with status 201.

Example

curl -X POST https://api.pathors.com/v1/projects/{projectId}/knowledgebases \
  -H "Authorization: Bearer dk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Knowledge Base",
    "type": "pgvector",
    "embeddingModelName": "text-embedding-3-small",
    "chunkSize": 500,
    "chunkOverlap": 50
  }'
{
  "message": "Knowledgebase created successfully"
}
Each project is currently limited to one knowledgebase.