Before you can search, your documents need to be in LightOn. Uploading a file triggers an ingestion pipeline that parses the content, splits it into chunks, generates embeddings, and indexes everything. The whole process typically takes a few seconds for a standard PDF. Ingestion is asynchronous — the upload returns immediately with aDocumentation Index
Fetch the complete documentation index at: https://developers.lighton.ai/llms.txt
Use this file to discover all available pages before exploring further.
pending status, and you poll GET /api/v3/files/{id} for completion.
Upload a file
Send the file asmultipart/form-data with the destination workspace_id:
upload_session_uuid you can use later to find every file uploaded in the same batch.
Wait for indexing to complete
PollGET /api/v3/files/{id} until status reaches embedded:
status field moves through these stages:
| Status | What’s happening |
|---|---|
pending | Queued for processing |
parsing | Extracting text from the document |
parsing_failed | Parsing failed — see status_detail |
embedding | Generating vector embeddings |
embedding_failed | Embedding failed — see status_detail |
embedded | Indexed and ready to search |
updating | Re-indexing in progress |
fail | Generic failure — see status_detail |
status_vision tracks the same lifecycle for vision/image embeddings: pending, processing, embedded, fail, or - (not available for this file).
Organising documents with tags and titles
Add a human-readable title and assign tag IDs at upload time. Tags can be sent as a JSON-encoded array string or as repeated form fields with the same name.207 (multi-status) with a message explaining which tags were rejected.
To replace tags after upload, PATCH /api/v3/files/{id} with a new tags array — it replaces all existing tags, manual and auto-assigned. Send [0] (sentinel) to remove every tag when using multipart format. To add tags without touching existing ones, POST /api/v3/files/{id}/tags.
Tracking documents from external systems
If you’re ingesting documents from a third-party system (ServiceNow, Confluence, SharePoint, etc.), store the source identifier inexternal_metadata. This lets you find the LightOn file later given only the external ID, and surface the original URL in your UI.
external_id is required when creating; doc_type and additional_metadata are optional. When sent via multipart/form-data, the whole external_metadata value must be a JSON string.
Retrieve it later by external ID:
Listing and filtering your documents
GET /api/v3/files supports rich filtering. A few common patterns:
include_details=true to receive the signature (TLSH hash for duplicate detection) and parser fields on each result.
For schema-driven filtering, the attribute and content_type query parameters support facet filters with operators (=, >, <, * prefix, |/, for OR). See the API reference for the full DSL.
Deleting files
Single delete:204 No Content on success. Files in synced (datasource-managed) workspaces cannot be deleted manually — the API returns 400.
Common errors
| Status | Cause |
|---|---|
400 | Validation error, unsupported file type, or synced-workspace constraint |
401 | Missing or invalid API key |
403 | Permission denied (no upload/delete rights) |
404 | File does not exist or is not accessible |
429 | Too many concurrent uploads for this session |