> ## 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.

# Create Knowledgebase

> Create a knowledgebase for a project

## Request

```bash theme={null}
POST https://api.pathors.com/v1/projects/{projectId}/knowledgebases
```

### Path Parameters

<ParamField path="projectId" type="string" required>The project ID</ParamField>

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token using your developer key
</ParamField>

### Body

<ParamField body="name" type="string" required>Name of the knowledgebase</ParamField>

<ParamField body="type" type="string" required>
  Knowledgebase backend. Currently only `pgvector` is supported.
</ParamField>

<ParamField body="embeddingModelName" type="string" required>
  Embedding model. One of `text-embedding-ada-002`, `text-embedding-3-small`, `text-embedding-3-large`. Cannot be changed after creation.
</ParamField>

<ParamField body="chunkSize" type="number">Maximum chunk size in characters. Defaults to `500`.</ParamField>
<ParamField body="chunkOverlap" type="number">Overlap between adjacent chunks in characters. Defaults to `50`.</ParamField>

## Response

Returns the created knowledgebase with status `201`.

### Example

```bash theme={null}
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
  }'
```

```json theme={null}
{
  "message": "Knowledgebase created successfully"
}
```

<Note>
  Each project is currently limited to one knowledgebase.
</Note>
