DOCS
Dashboardnorth_eastGet an API keyvpn_key
PAI Chat·Endpoint
POST/chatbot/{chatbotId}/document

Upload a document to a chatbot for RAG (Retrieval Augmented Generation). Support

Upload a document to a chatbot for RAG (Retrieval Augmented Generation). Supports PDF, Excel, Word, CSV, and text files up to 50MB.

DELETE/chatbot/{chatbotId}/document/{documentId}arrow_forward
tune
Parameters
chatbotIdrequiredpath
string (uuid)
The ID of the chatbot instance to upload the document to
double_arrow
Returns 201
documentIdrequired
string (uuid)
The UUID for the uploaded document
filenamerequired
string
The name of the uploaded file
fileSizerequired
number
Size of the file in bytes
statusrequired
string
Processing status (uploading, processing, ready, failed)
messagerequired
string
Success message
report
Errors
StatusDescription
400Default Response
500Default Response
north_east
Request
curl -X POST 'https://chat-api-dev.paicloud.ai//chatbot/{chatbotId}/document' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
south_west
Response
201 OK
application/json
{
  "documentId": "00000000-0000-0000-0000-000000000001",
  "filename": "filename",
  "fileSize": 0,
  "status": "status",
  "message": "message"
}