Search is how your application answers questions from documents. Send a query in plain language, get back ranked passages from across your corpus — no SQL, no keyword matching, no index tuning. Under the hood LightOn runs a hybrid pipeline: vector search for meaning, lexical search for exact terms, then a reranker that scores every candidate against the full query and returns the best results.Documentation Index
Fetch the complete documentation index at: https://developers.lighton.ai/llms.txt
Use this file to discover all available pages before exploring further.
Your first search
If you’ve already uploaded documents, this is all you need:Scoping to a subset of documents
When you want to limit search to a specific team’s workspace, a handful of files, or a tagged collection, use one of the three scoping parameters.file_id is mutually exclusive with workspace_id and tag_id — workspace_id and tag_id can be combined.
- By workspace
- By file
- By tag
Best for multi-tenant products where each customer or team has their own workspace.
Reading the response
Each result contains four objects:content— the matched passage text.nullfor vision-mode chunks.score—retrieval(always present) andreranking(null whenskip_rerank=true).source— where the chunk came from:file_id,filename,title,mime_type,page_start/page_end,total_pages,tags, andexternal_metadatafor connector-imported files.workspace— the workspace the document belongs to.
Tuning result count and latency
max_results (default 10, range 1–50) controls how many ranked chunks come back.
For lower latency, set skip_rerank: true. You lose the reranker’s quality boost but the pipeline becomes a straight hybrid lookup, and score.reranking will be null.
Searching images and diagrams
Switch to vision mode to search documents by their visual content — useful for scanned pages, slide decks, architecture diagrams, or any document where the meaning is in the layout rather than the words.status_vision: "embedded"). With include_image: true, each result includes an image.b64_content field with the page rendered as a base64 image. In text mode, the image is fetched from the vision chunk covering the chunk’s start page — empty string if no vision index exists for that page.
Common errors
| Status | Cause |
|---|---|
400 | Request body is not parsable JSON |
403 | None of the provided filters resolve to authorized resources |
422 | Validation error — e.g. file_id combined with workspace_id/tag_id, or max_results out of range |
429 | Rate limit exceeded |
500 | Unexpected server error |