Parse a document to Markdown
Changed onConvert 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.
Request
- Base URLhttps://api.lighton.ai
- URLhttps://api.lighton.ai/api/v3/parse
- AuthHTTP bearer
Request body
Response
Sync parse — document parsed successfully.
Changes
- breaking
added required request body
- info
api operation id
api_v3_parse_createwas added - info
the endpoint scheme security
bearerAuthwas added to the API - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the success response with the status
- info
added the success response with the status
- breaking