curl PDF to Markdown
Copy-paste curl examples for the pdfToMarkdown API.
URL input
curl -X POST https://pdftomarkdown.dev/v1/convert \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"pdf_url":"https://pdftomarkdown.dev/samples/invoice.pdf"}}' Base64 input
pdf_base64=$(base64 < document.pdf | tr -d '\n')
curl -X POST https://pdftomarkdown.dev/v1/convert \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"input\":{\"pdf_base64\":\"$pdf_base64\"}}"