Upload PDF
Last updated
Last updated
This API supports PDF uploads through two different methods: URL Upload and File upload. Below are the specifications and limitations for each method
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.
POST
https://pdf.ai/api/v1/upload/url
To get the document ID docId
for the PDF
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
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.
POST
https://pdf.ai/api/v1/upload/file
To get the document ID docId
for the PDF
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.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
X-API-Key
string
<API-Key>
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"]
X-API-Key*
string
<API-Key>
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"]