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

NameTypeDescription

X-API-Key

string

<API-Key>

Request Body

NameTypeDescription

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

{
    "docId": "abcdxxxxxxx"
}

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

NameTypeDescription

X-API-Key*

string

<API-Key>

Request Body

NameTypeDescription

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

{
    "docId": "abcdxxxxxxx"
}

Last updated