curl --request POST \
--url https://api.lighton.ai/api/v3/parse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document": "https://example.com/invoice.pdf"
}
'{
"id": "parse_0196e4b2a3c14d5e8f7a9b2c1d0e3f4a",
"status": "completed",
"created_at": "2026-03-31T10:00:00+00:00",
"completed_at": "2026-03-31T10:00:03+00:00",
"processing_time_ms": 2840,
"document": {
"filename": "invoice.pdf",
"page_count": 3,
"file_size_bytes": 245120,
"mime_type": "application/pdf"
},
"result": {
"pages": [
{
"index": 1,
"markdown": "# Invoice\n\nInvoice Number: INV-2026-001\nDate: March 15, 2026"
},
{
"index": 2,
"markdown": "## Terms\n\nPayment is due within 30 days..."
},
{
"index": 3,
"markdown": "## Appendix\n\nLine items continued..."
}
]
},
"usage": {
"pages_processed": 3
}
}Parse
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.
POST
/
api
/
v3
/
parse
curl --request POST \
--url https://api.lighton.ai/api/v3/parse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document": "https://example.com/invoice.pdf"
}
'{
"id": "parse_0196e4b2a3c14d5e8f7a9b2c1d0e3f4a",
"status": "completed",
"created_at": "2026-03-31T10:00:00+00:00",
"completed_at": "2026-03-31T10:00:03+00:00",
"processing_time_ms": 2840,
"document": {
"filename": "invoice.pdf",
"page_count": 3,
"file_size_bytes": 245120,
"mime_type": "application/pdf"
},
"result": {
"pages": [
{
"index": 1,
"markdown": "# Invoice\n\nInvoice Number: INV-2026-001\nDate: March 15, 2026"
},
{
"index": 2,
"markdown": "## Terms\n\nPayment is due within 30 days..."
},
{
"index": 3,
"markdown": "## Appendix\n\nLine items continued..."
}
]
},
"usage": {
"pages_processed": 3
}
}Authorizations
Body
application/jsonmultipart/form-data
Response
Sync parse — document parsed successfully.
Synchronous POST /api/v3/parse response — the parse completed inline.