POST
/
parse
/
parsepdf

Headers

api-subscription-key
string
default:

Your unique subscription key for authenticating requests to the Sarvam AI Speech-to-Text API. " "Here are the steps to get your api key", example="dxxxxxx-bxxx-4xxx-axxx-cxxxxxxxxxxx

Body

multipart/form-data
pdf
file
required

Upload the PDF file you want to parse. This should be uploaded as a form input if you're using multipart/form-data Note: Sarvam Parse supports only English PDFs currently.

page_number
string
default:
1

The page number you want to extract data from. This is a one-based index (meaning, the first page is 1).

sarvam_mode
string | null
default:
large

The mode of parsing to use: Use 'large' for better accuracy (more detailed parsing).

Response

200 - application/json
output
string | null

The base64 encoded HTML string corresponding to the parsed page. The output will be an empty string if parsing fails for some reason.