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

circle-info

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

Name
Type
Description

X-API-Key

string

<API-Key>

Request Body

Name
Type
Description

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

circle-info

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

Name
Type
Description

X-API-Key*

string

<API-Key>

Request Body

Name
Type
Description

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"]

circle-exclamation

Last updated

Was this helpful?