Parse a document to Markdown
Convert a document into readable, structured Markdown content.
Accepts either a file upload (multipart/form-data) or a document URL (JSON body).
Sync mode (default)
Blocks until parsing completes and returns 200 with the full markdown result.
curl -X POST https://api.lighton.ai/api/v3/parse \
-H 'Authorization: Bearer $TOKEN' \
-F file=@invoice.pdf
Async mode (options.async = true)
Returns 202 immediately with a parse_<token> job id. Poll GET /api/v3/parse/{id} with that same id until status is completed or failed.
curl -X POST https://api.lighton.ai/api/v3/parse \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{"document": "https://example.com/report.pdf", "options": {"async": true}}'
For multipart uploads, pass options as a JSON-encoded form field: -F 'options={"async":true}'.
Supported file types: .pdf, .png, .jpg, .jpeg, .pptx, .ppt, .odp, .docx, .odt, .doc, .html
Sync limits: 20 MB file size, 15 pages.
Async limits: 100 MB file size, 1000 pages.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Response
Sync parse — document parsed successfully.