API Reference
Create Knowledge Base
POST /api/v1/knowledge-bases — create an empty Knowledge Base.
Creates an empty Knowledge Base. Add content with Upload documents or Submit URLs.
POST /api/v1/knowledge-basesRequest body
| Field | Type | Required | Description |
|---|---|---|---|
projectId | string (UUID) | With an org-scoped key: yes | The project to create it in. A project-scoped key always creates in its own project; naming a different one returns 403. |
name | string (1–100 chars) | Yes | Unique within the project. |
embeddingLlmConfigId | string (UUID) | Yes | The LLM provider connection that embeds the content. List yours with GET /agents/llm-providers. |
embeddingModel | string | Yes | An embedding model that connection offers, for example text-embedding-3-small. It cannot be changed later without re-indexing every document. |
searchMode | hybrid | vector | keyword | No | Default hybrid (keyword and vector search blended). |
hybridAlpha | number 0–1 | No | Blend for hybrid: 0 is keyword only, 1 is vector only. Default 0.5. |
Response
201 Created — the Knowledge Base, in the shape of Get Knowledge Base.
Errors
| Status | error | When |
|---|---|---|
400 | validation error | A field fails validation ({ "errors": [{ "path", "message" }] }). |
400 | project_required | An org-scoped key did not pass projectId. |
400 | invalid_request | The Knowledge Base service refused the body, for example an unknown embedding model. |
403 | forbidden | A project-scoped key named another project. |
409 | conflict | A Knowledge Base with this name already exists in the project. |
422 | project_not_found | projectId is not a project of your organization. |
Example
curl -X POST https://api.elizon.ai/api/v1/knowledge-bases \
-H "X-API-Key: elz_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"projectId": "2b7e…",
"name": "Pump manuals",
"embeddingLlmConfigId": "8b1e…",
"embeddingModel": "text-embedding-3-small"
}'