Skip to main content
Upload a document to a knowledge base as multipart/form-data. After upload the document is parsed asynchronously into chunks, and on completion candidate memory nodes are auto-extracted into the “自动抽取记忆” (auto-extract) cube.

Endpoint

Authentication

Authorization: Bearer <jwt> or X-API-Key <sk_...>. Minimum role: contributor.

Path parameters

string
required
Workspace id.
string
required
Target KB id.

Request body (multipart)

file
required
The uploaded file (form field name file).

Response

string
Document id (doc_...).
string
Owning KB id.
string
Owning workspace id.
string
File name.
string
Storage path.
string
File MIME type.
string
Parse status (parsing / parsed / failed).
string
Upload time (RFC3339).

Example