Upload PDF
This API supports PDF uploads through two different methods: URL Upload and File upload. Below are the specifications and limitations for each method
Upload PDF using URL
Limitation
Timeout Limit: 300 seconds
There is no specific file size limit for this method; however, the URL must be accessible, and the upload process needs to be completed within the 300-second timeout limit.
Upload PDF using URL
POST
https://pdf.ai/api/v1/upload/url
To get the document ID docId
for the PDF
Headers
X-API-Key
string
<API-Key>
Request Body
url*
string
URL of your PDF file
isPrivate
boolean
If your PDF file is private(true or false)
ocr
boolean
Enable Optical Character Recognition. Make the text of a scanned document searchable
tags
array
List of tags to associate with the document e.g., ["Tag1", "Tag2"]
Upload PDF using file
Limitation
Timeout Limit: 300 seconds
File Size Limit: 4.5 MB
If the PDF file size exceeds 4.5 MB, it is recommended to use the URL Upload Method instead, to avoid any upload failures or delays.
Upload PDF using file
POST
https://pdf.ai/api/v1/upload/file
To get the document ID docId
for the PDF
Headers
X-API-Key*
string
<API-Key>
Request Body
file*
FormData
PDF file form data
isPrivate
boolean
If your PDF file is private(true or false)
ocr
boolean
Enable Optical Character Recognition. Make the text of a scanned document searchable
tags
array
List of tags to assciate with the document e.g., ["Tag1"]
If you receive a 500 error code when OCR is enabled, it is likely because your document is too large, causing the upload process to exceed the 300-second timeout. To avoid this, please perform OCR on your document before using our upload API.
Last updated
Was this helpful?