Takes a URL to a PDF and a fileId (CUID of the file_uploads record). Checks the PDF size, downloads it, extracts text, chunks it, generates embeddings, and stores them.
POST
/message/pdf
curl \
--request POST 'http://localhost:3000/api/v1/message/pdf' \
--header "Content-Type: application/json" \
--data '{"url":"https://blob.vercel-storage.com/.../document.pdf","fileId":"clwxyz..."}'
Request example
{
"url": "https://blob.vercel-storage.com/.../document.pdf",
"fileId": "clwxyz..."
}
Response examples (200)
{
"success": true,
"statusCode": 200,
"message": "string",
"data": {
"embeddingsData": {
"count": 150,
"status": "success"
}
}
}
Response examples (400)
{
"success": false,
"statusCode": 400,
"message": "Error description"
}
Response examples (500)
{
"success": false,
"statusCode": 400,
"message": "Error description"
}