Skip to main content
Illustration of the Parse use case.
Parse converts a document to structured Markdown without storing or indexing it. By default the call is synchronous: send a file, get Markdown back immediately. For larger documents, an async mode queues the job and lets you poll for the result. Use Parse when you want the text content of a document for your own purposes: feeding it to an LLM, storing it in your database, displaying it in a UI, or pre-processing it before ingestion. Nothing is saved on LightOn’s side.
If you want the document to be searchable, use Files instead: it ingests and indexes the document permanently. The full schema for POST /api/v3/parse is in the API reference.

Parse a document

From a local file:
Or from a publicly reachable URL:
file (multipart) and document (JSON URL) are mutually exclusive: pass one or the other.

What comes back

The response includes the parsed Markdown, broken out per page, along with metadata about the original document:
result.pages is an array, one entry per page, each with a 1-based index and the markdown for that page. Headings, lists, tables, and code blocks are preserved where the source document supports them. Concatenate the per-page markdown (in index order) to reconstruct the full document.

Large documents: async mode

Sync mode is capped at 20 MB / 15 pages. For larger documents, set options.async = true. The call returns 202 immediately with a parse_<token> job id instead of blocking, and you poll GET /api/v3/parse/{id} until the job reaches a terminal status.
For multipart uploads, pass options as a JSON-encoded form field: -F 'options={"async":true}'. The polling response uses the same envelope as the sync result: result, usage, completed_at, and processing_time_ms are null while the job is in flight and populated once status is completed. On terminal failure, status is failed and an error block describes the cause.
Recommended polling cadence: every 1s for the first 10s, then every 5s, capped at 30s. Stop once status is completed or failed. The SDK handles this for you when you pass wait=True; drop it and call job.poll() yourself if you need to react to each status change.

Supported formats and limits

Formats: .pdf, .png, .jpg, .jpeg, .pptx, .ppt, .odp, .docx, .odt, .doc, .html To make a document searchable rather than just converting it once, ingest it with Files and retrieve relevant sections with Search.

Common errors