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
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"]
{
"docId": "abcdxxxxxxx"
}
Upload PDF using file
Limitation
Timeout Limit: 300 seconds
File Size Limit: 4.5 MB
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"]
{
"docId": "abcdxxxxxxx"
}
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?