Developers
Upload a document
POST a file as multipart form data. PNG, JPG, PDF up to 10 MB.
Single document
curl -X POST https://api.mahadocr.com/v1/documents/upload \
-H "X-MahadDoc-API-Key: mk_live_YOUR_KEY" \
-F "[email protected]"
# 202 Accepted
# { "id": "DOC_831d6b45e154", "status": "processing" }Optionally pass doc_type (passport, id_card, visa, invoice, receipt, cv, contract) to skip type detection. Leave it out and the type is detected for you.
Batch upload
Quota for the whole batch is checked before anything is processed.
curl -X POST https://api.mahadocr.com/v1/documents/batch \
-H "X-MahadDoc-API-Key: mk_live_YOUR_KEY" \
-F "[email protected]" -F "[email protected]"Limits
- PNG, JPG, PDF only — anything else returns 422 unsupported_file
- Maximum 10 MB per file — larger returns 413
- PDFs are parsed up to 5 pages per upload
- Identical files already processed return the cached result at no engine cost