跳转到主要内容
POST
/
api
/
v1
/
knowledge
/
bases
创建知识库
curl --request POST \
  --url http://localhost:5300/api/v1/knowledge/bases \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "技术文档库",
  "description": "存储技术文档和API参考",
  "embedding_model_uuid": "uuid-of-embedding-model"
}
'
{
  "code": 0,
  "msg": "ok",
  "data": {
    "uuid": "<string>"
  }
}

授权

X-API-Key
string
header
必填

使用 X-API-Key 请求头进行 API 密钥认证。 示例:X-API-Key: lbk_your_api_key_here

请求体

application/json
name
string
必填

知识库名称

embedding_model_uuid
string
必填

向量模型 UUID

description
string

知识库描述

响应

200 - application/json

创建成功

code
integer
示例:

0

msg
string
示例:

"ok"

data
object