Skip to main content
POST
/
api
/
v1
/
knowledge
/
bases
/
{kb_uuid}
/
files
Add File to Knowledge Base
curl --request POST \
  --url http://localhost:5300/api/v1/knowledge/bases/{kb_uuid}/files \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "file_id": "document_abc123.pdf"
}
'
{
  "code": 0,
  "msg": "ok",
  "data": {
    "task_id": "<string>"
  }
}

Authorizations

X-API-Key
string
header
required

API Key authentication using X-API-Key header. Example: X-API-Key: lbk_your_api_key_here

Path Parameters

kb_uuid
string
required

Knowledge Base UUID

Body

application/json
file_id
string
required

File ID(从文件上传接口获取)

Response

200 - application/json

Addition successful

code
integer
Example:

0

msg
string
Example:

"ok"

data
object