curl --request POST \
--url https://paradigm.lighton.ai/api/v3/ocr \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'file=(binary)'{
"model": "LightOnOCR",
"total_pages": 3,
"pages_parsed": [
1,
2,
3
],
"processing_time_ms": 4520,
"enable_antilooping": true,
"sampling_params": {
"temperature": 0.2,
"max_tokens": 5888,
"repetition_penalty": null
},
"pages": [
{
"index": 1,
"markdown": "# Invoice\n\n| Item | Qty | Price |\n|---|---|---|\n| Widget A | 10 | $5.00 |"
},
{
"index": 2,
"markdown": "## Terms and Conditions\n\nPayment is due within 30 days..."
},
{
"index": 3,
"markdown": "## Appendix\n\n![Figure 1: Sales chart summary]"
}
]
}Parse a document to Markdown via VLM
Deprecated: Use the v3 parse endpoint instead.
Upload a file for synchronous OCR processing. This endpoint is intended for lightweight, low-volume document parsing and returns results inline in the response.
For large documents, high-throughput workloads, or asynchronous processing, use the /files endpoints, which are optimized for those use cases.
Supported file types: .pdf, .png, .jpg, .jpeg, .pptx, .ppt, .odp, .docx, .odt, .doc, .html
A maximum of 16 pages are processed per request. For documents exceeding this limit, split the content across multiple sequential calls using the pages parameter (e.g., pages="1-16" for the first call, pages="17-32" for the second).
Concurrency limit: Only one OCR request per user can run at a time. A second concurrent request will be rejected with a 429 status.
curl --request POST \
--url https://paradigm.lighton.ai/api/v3/ocr \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'file=(binary)'{
"model": "LightOnOCR",
"total_pages": 3,
"pages_parsed": [
1,
2,
3
],
"processing_time_ms": 4520,
"enable_antilooping": true,
"sampling_params": {
"temperature": 0.2,
"max_tokens": 5888,
"repetition_penalty": null
},
"pages": [
{
"index": 1,
"markdown": "# Invoice\n\n| Item | Qty | Price |\n|---|---|---|\n| Widget A | 10 | $5.00 |"
},
{
"index": 2,
"markdown": "## Terms and Conditions\n\nPayment is due within 30 days..."
},
{
"index": 3,
"markdown": "## Appendix\n\n![Figure 1: Sales chart summary]"
}
]
}Authorizations
Body
Page range to parse. Accepted formats: "all" (default), a single page "3", a range "1-5", comma-separated pages "1,3,7", or mixed "2-4,8". Duplicates are ignored. Maximum 16 pages per request — using "all" on a document exceeding this limit returns 400. For larger documents, paginate with sequential range calls.