Document to Markdown API: PDF to LLM-Ready Markdown

Convert a PDF to Markdown an LLM can read. Every line comes back with bounding boxes on the page, plus decoded barcodes and fraud checks. 23 formats, including scans, photos, emails, and spreadsheets. Free 14-day trial, no credit card.

Get Started for Free Book a Demo
Document to Markdown API: PDF to LLM-Ready Markdown

Document in. LLM-ready Markdown out.

The Document to Markdown API takes any document — a phone photo, a scan, a spreadsheet, an email, or a PDF with several documents inside — and returns clean markdown an LLM can read, with every line tied back to where it sits on the page. Here is what happens between the request and the response.

  1. POST a file upload, a file_url or file_urls, base64 file_data, or an S3 package_path. Any of 23 formats, up to 20 MB.

  2. A combined PDF is split where one document ends and the next begins, and each piece is classified. No manual separation.

  3. The layout model finds tables, checkboxes, logos, barcodes, handwriting, signatures, and multi-column text on every page.

  4. Each element goes to a purpose-built vision or vision-language model. Barcodes are decoded, handwriting is read, and 100+ languages are supported.

  5. The response carries markdown, page and OCR scores under meta, and bounding boxes in pages when details is true.

POST api.veryfi.com/api/v8/partner/parse 200 OK
Request · Python
import requests

url = "https://api.veryfi.com/api/v8/partner/parse"
headers = {
    "CLIENT-ID": "<CLIENT_ID>",
    "AUTHORIZATION": "apikey <USERNAME>:<API_KEY>",
}
payload = {
    "file_url": "https://cdn.example.com/batch_0425.pdf",
    "details": True,  # bounding boxes
}

r = requests.post(url, headers=headers, json=payload)
print(r.json()["markdown"])
# Acme Supply Co.**Invoice** INV-20431 · Oct 14, 2026 | Item | Qty | Unit | Amount ||---|---:|---:|---:|| Thermal paper rolls | 12 | 4.50 | 54.00 || Barcode labels 4×6 | 4 | 18.25 | 73.00 || Shipping | 1 | 12.00 | 12.00 || **Total** | | | **139.00** | - [x] Net 30- [ ] Due on receipt Barcode (Code 128): INV-20431Handwritten: Paid 10/22 – JMSignature: Authorized signature

Read anything. Verify everything.

When a policyholder claims a stolen or damaged TV, laptop, or appliance, the proof of ownership is usually a photo of the rating label. Veryfi’s Document to Markdown API turns that photo into markdown and decodes every barcode on it: QR, PDF417, EAN, UPC, and Code 128. The Vault splits the decoded payload and looks for each value in the printed text. The factory writes the model, serial number, and build date into the code. Changing the printed digits takes a minute in a photo editor. Re-encoding the QR to match is the step that gets skipped, and that is where the claim gets flagged with barcode_code_missing_in_ocr.

  1. Step 1 · Convert Photo to markdown POST the label photo to /parse. Every printed line comes back as markdown, with bounding boxes when details is true.
  2. Step 2 · Decode Read every barcode QR, PDF417, EAN, UPC, Code 128. The payload comes back exactly as the factory encoded it.
  3. Step 3 · Reconcile Match it to the print Each decoded value is searched in the markdown text. A miss is flagged and the claim goes to review instead of payout.
The Vault (by Veryfi)

Mismatch. 1 of 4 values match the print.

Decoded QRK-55XR8A,6552936,10/25,12715711

FieldQR codeMarkdown text
ModelK-55XR8AK-55XR8A
Serial65529366554868
Build date2025/102026/02
Product code12715711Not printed

The QR carries serial 6552936 and an October 2025 build date. The printed label reads 6554868 and 2026/02, and the product code is not printed at all. Route to special investigations. barcode_code_missing_in_ocr

Reconciled. 1 of 4 values match the printed label. Powered by veryfi AI
Easy to Use RESTful APIs
import requests
url = "https://api.veryfi.com/api/v8/partner/parse"
headers = {
'CLIENT-ID': '<CLIENT_ID>',
'AUTHORIZATION': 'apikey <USERNAME>:<API_KEY>'
}
payload = {'file_url': 'https://cdn.example.com/invoice.pdf', 'details': True}
response = requests.post(url, headers=headers, json=payload)
print(response.json()['markdown'])
Or use Veryfi SDK
import veryfi
veryfi_client = veryfi.Client(client_id, client_secret, username, api_key)
payload = {'file_url': 'https://cdn.example.com/invoice.pdf', 'details': True}
document_result = veryfi_client._request("POST", "/parse", payload)
print(document_result['markdown'])

Built for Developers Shipping LLM Apps

One API call turns any document into clean, LLM-ready Markdown, with every line traced back to its position on the page. Tables, checkboxes, handwriting and barcodes come through intact, across 100+ languages and 23 file formats. Drop the output straight into your RAG pipeline, vector database, or LangChain workflows. No preprocessing, no format conversion.

Day-1 Ready: send a file, get Markdown back in seconds
SDKs & code samples in Python, Node.js, PHP, C#, Java, Go and more
Document to Markdown API docs + FAQs that make sense
Human support from experts at HQ in Silicon Valley

Try It

Document to Markdown API Demo

Veryfi vs. generic PDF parsers for RAG and LLMs

Most parsers turn a PDF into text. Veryfi reads any document, and it goes deepest on the ones where mistakes cost money — invoices, receipts, bank statements, checks, and tax forms. Then it tells you whether to trust what it read. The Document to Markdown API returns LLM-ready markdown with bounding boxes, decodes barcodes so you can check them against the print, splits combined PDFs, and runs fraud and GenAI detection in the same call path.

Generic parsers Veryfi

Generic document parsers compared with the Veryfi Document to Markdown API
11 things to compare Generic parsers Text out Turn the page into text and stop there. Veryfi Read and checked Read the page, then tell you whether to trust it.
What goes in
Built for General documents: reports, papers, contracts Any document, with deep specialization in financial onesContracts, medical forms, insurance claims, packing slips, and more — plus invoices, receipts, bank statements, checks, and tax forms, where mistakes cost money.
File types Mostly PDF and images. Email, spreadsheets, and HEIC photos often need converting first. 23 formats, no conversionIncluding PDF, JPG, HEIC, DOCX, XLSX, CSV, EML, HTML, and ZIP. No preprocessing.
Languages Varies 100+
What comes back
Output Markdown, sometimes JSON Markdown with bounding boxes, plus structured fieldsBounding boxes come back when details is on. Structured fields come from the same platform.
Page elements Text, tables, and figures Each element goes to a specialized modelA layout model detects tables, checkboxes, logos, barcodes, handwriting, signatures, and multi-column layouts, then routes each one to the model built for it.
Evidence Text with no link back to where it sat on the page Every answer traces back to the pageEach answer is tied to its exact position, so a reviewer or an LLM can check it against the source.
Barcodes and QR codes Usually read as printed text or ignored Decoded, so you can check them against the printQR, PDF417, EAN, UPC, and Code 128.
Multi-document files One file in, one output out Split and classifiedA 50-page combined PDF comes back as individual documents, each one classified.
Trust and production
Fraud and authenticity Not typically included Fraud detection and a GenAI detector in the same API
Security Varies SOC 2 Type II, HIPAA, GDPR, and CCPAWe sign BAAs. Every API call is logged and timestamped.
Deployment and uptime Usually shared cloud only. SLA varies by vendor. Cloud, hybrid, or on-premise, with a 99.995% uptime SLARuns on dedicated NVIDIA DGX, not shared cloud GPUs.

SOC 2 Type II · Live

Global Bank-Grade Security & Compliance

Veryfi SOC 2 Type II compliant Certified seal

SOC 2 Type II

CERT · VERIFIED

Certified. GDPR, CCPA, and ITAR compliant.

HIPAA Compliance

HIPAA · BAA

We sign BAAs. PHI handled under HIPAA safeguards.

99.995% Uptime SLA

SLA · SAMPLED

Dedicated NVIDIA DGX — not shared cloud GPUs.

Deployment Flexibility

REGION · READY

Cloud API, hybrid, or on-premise when required.

GDPR

GDPR · READY

EU data protection. Lawful processing and subject rights.

Audit Trail

API · LOGGED

Every API call logged and timestamped for regulators.

Built for the banks that can’t afford “good enough.”

Frequently Asked Questions

  • What is LLM-ready Markdown?

    LLM-ready Markdown is document text converted into clean, structured Markdown that a large language model can read reliably. Headings, tables, lists and checkboxes keep their structure instead of being flattened into plain text. This gives LLMs and RAG pipelines better context, cleaner chunks and more accurate answers.

  • How do I convert a PDF to Markdown for an LLM or RAG pipeline?

    Send the file to the Veryfi Document to Markdown API with a single POST request to /api/v8/partner/parse. You can upload the file directly, pass a URL, send base64 data or point to an S3 path. The response contains a markdown field you can chunk, embed and load straight into your vector database. See the API docs for code samples.

  • Does it keep tables, checkboxes, handwriting and signatures?

    Yes. A layout model detects tables, checkboxes, logos, barcodes, handwriting, signatures and multi-column text on every page, then sends each element to a specialized model. Tables come back as Markdown tables, and checkboxes come back as checked or unchecked list items. Handwriting is transcribed, and signatures are detected.

  • What file formats are supported?

    23 formats, with no conversion needed: PDF, JPG, JPEG, PNG, HEIC, HEIF, WEBP, AVIF, GIF, BMP, DOC, DOCX, ODT, RTF, TXT, XLS, XLSX, CSV, EML, HTML, HTM, OFD and ZIP. Files can be up to 20 MB, with a minimum size of 0.25 KB. The rate limit is 20 requests per second.

  • Can it read barcodes and QR codes?

    Yes. Veryfi decodes QR, PDF417, EAN, UPC and Code 128 barcodes and returns the payload exactly as it was encoded. You can then compare the decoded values against the printed text to catch altered documents, as shown in the insurance claim example above.

  • What happens if one PDF contains several documents?

    The API automatically splits combined PDFs where one document ends and the next begins, then classifies each piece. A 50-page file with invoices, receipts and bank statements comes back as separate, labeled documents, with no manual separation.

  • Is there fraud detection?

    Yes. Veryfi runs AI-powered fraud detection and a GenAI detector in the same API, flagging tampered, altered or AI-generated documents before they reach your workflow. Learn more about fraud detection.

  • Is it secure enough for financial, medical and insurance documents?

    Yes. Veryfi is SOC 2 Type II certified and compliant with HIPAA, GDPR, CCPA and ITAR. We sign BAAs, and every API call is logged and timestamped. You can deploy in the cloud, hybrid or on-premise, with a 99.995% uptime SLA on dedicated NVIDIA DGX infrastructure.

  • Can I trace the Markdown back to the original page?

    Yes. Set details to true and every line comes back with bounding boxes showing exactly where it sits on the page. Reviewers, or the LLM itself, can check any answer against the source document. The response also includes OCR confidence scores and blur detection for each page.

  • Can I talk to a person?

    Of course. Email support@veryfi.com for technical help, or sales@veryfi.com to talk to an industry expert.