Skip to main content
POST
/
api
/
v2
/
files
Upload a document
curl --request POST \
  --url https://paradigm.lighton.ai/api/v2/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=<string>'
{
  "id": 1,
  "object": "list",
  "bytes": 20032,
  "created_at": 1631533200,
  "filename": "document.pdf",
  "purpose": "documents",
  "status": "embedded"
}

Documentation Index

Fetch the complete documentation index at: https://docs.lighton.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data

Request serializer for file upload.

file
string<uri>
required
title
string | null
Maximum string length: 255
filename
string | null
Maximum string length: 512
collection
integer | null
owner
integer
write-only

Owner of the file (optional)

company
integer
write-only

Company to associate the file with (optional)

content
string | null
file_type
string | null
Maximum string length: 30
collection_type
enum<string>

Type of collection to store the file in (private, company, or workspace)

  • private - private
  • company - company
  • workspace - workspace
Available options:
private,
company,
workspace
workspace_id
integer
write-only

Workspace ID when collection_type is 'workspace'

chunk_size
integer

Size of chunks for document processing (optional)

chunk_overlap
number<double>

Overlap between chunks (optional)

external_metadata
object

Additional external metadata for the document (optional)

OCR_AGENT
string

OCR agent to use for processing (optional)

OCR_COMPLETE_DOC_TABLE_EXTRACTION
boolean | null

Enable complete document table extraction (optional)

OCR_HI_RES_MODEL_NAME
string

High resolution OCR model name (optional)

OCR_STRATEGY
string

OCR processing strategy (optional)

OCR_TIMEOUT
integer

OCR processing timeout in seconds (optional)

OCR_URL
string

OCR service URL (optional)

IS_VISUAL_INGESTION_ON
boolean | null

Enable visual ingestion processing (optional)

DEFAULT_PIPELINE
string

Default processing pipeline to use (optional)

Response

201 - application/json

Response serializer for file upload results.

id
integer
required

Unique identifier for the uploaded file

object
string
required
read-only

Object type, always 'file'

bytes
integer
required
read-only

Size of the file in bytes

created_at
integer
required
read-only

Unix timestamp of when the file was created

filename
string
required
read-only

Original filename of the uploaded file

purpose
string
required
read-only

Purpose of the file, always 'documents'

status
string
required
read-only

Processing status of the file