# Process a PDF for text extraction and embedding **POST /message/pdf** 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. ## Servers - Local development server: http://localhost:3000/api/v1 (Local development server) - Production server: https://referspecs-backend.onrender.com/api/v1 (Production server) ## Parameters ### Body: application/json (object) - **url** (string(url)) The publicly accessible URL of the PDF file (from Vercel Blob). - **fileId** (string) The CUID of the corresponding record in the 'file_uploads' table. ## Responses ### 200 PDF processed and embedded successfully #### Body: application/json (object) - **success** (boolean) - **statusCode** (integer) - **message** (string) - **data** (object) ### 400 Bad Request (e.g., missing URL/fileId, file too large, invalid URL, failed size check) #### Body: application/json (object) - **success** (boolean) - **statusCode** (integer) - **message** (string) ### 500 Internal Server Error (e.g., failed to download/process PDF, embedding error) #### Body: application/json (object) - **success** (boolean) - **statusCode** (integer) - **message** (string) [Powered by Bump.sh](https://bump.sh)