OCR an uploaded PDF

You can pass ocr=true in our upload endpoint, but if you forgot to do so, you can use this endpoint to perform OCR (Optical Character Recognition) on a document after it is uploaded without consuming additional API credits. To use this you need docId of the document.

Limitations

  • Timeout Limit: 300 seconds

  • File Size Limit: 50 MB

If the document has a large number of pages, the OCR process may result in a timeout error

OCR a document

POST https://pdf.ai/api/v1/ocr

To get the OCR of the PDF using docId

Headers

NameTypeDescription

X-API-Key

string

<API-Key>

Request Body

NameTypeDescription

docId*

string

Document ID obtained after uploading PDF

ocrLang

string

OCR language. Default: "eng"

{
    "message": "OCR applied successfully!"
}

Last updated