跳转到主要内容
POST
/
api
/
knowledge-base
/
{id}
/
documents
curl --request POST \
  --url https://zeus-api.agentspro.cn/api/knowledge-base/kb_abc123/documents \
  --header 'Authorization: Bearer <token>' \
  --form 'file=@/path/to/document.pdf'
{
  "document_id": "doc_xyz789",
  "status": "pending",
  "file_name": "document.pdf"
}
上传文档后状态为 pending,需要手动调用 处理文档 触发处理。
Authorization
string
必填
Bearer JWT Token
Content-Type
string
必填
multipart/form-data
id
string
必填
知识库 ID
file
file
必填
要上传的文档文件。支持格式:PDF、Word(.doc/.docx)、Excel(.xls/.xlsx)、PowerPoint(.ppt/.pptx)、Markdown、CSV、纯文本
document_id
string
文档唯一标识
status
string
文档状态,上传后为 pending
file_name
string
文件名
curl --request POST \
  --url https://zeus-api.agentspro.cn/api/knowledge-base/kb_abc123/documents \
  --header 'Authorization: Bearer <token>' \
  --form 'file=@/path/to/document.pdf'
{
  "document_id": "doc_xyz789",
  "status": "pending",
  "file_name": "document.pdf"
}