DOCS
Dashboardnorth_eastGet an API keyvpn_key
PAI Chat·Endpoint
POST/chat/{chatId}/document

Upload a document to a chat for RAG (Retrieval Augmented Generation). Supports P

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

GET/chat/{chatId}/document/{documentId}/downloadarrow_forward
tune
Parameters
chatIdrequiredpath
string (uuid)
The ID of the chat session 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
403Default Response
500Default Response
north_east
Request
curl -X POST 'https://chat-api-dev.paicloud.ai//chat/{chatId}/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"
}