Skip to main content
POST
/
api
/
v2
/
upload-session
/
{uuid}
Add a file to an upload session
curl --request POST \
  --url https://paradigm.lighton.ai/api/v2/upload-session/{uuid} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=<string>'
{
  "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "is_valid": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "documents": [
    {
      "id": 123,
      "title": "<string>",
      "collection": 123,
      "status": "pending",
      "updated_at": "2023-11-07T05:31:56Z",
      "workspace": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer token authentication

Path Parameters

uuid
string<uuid>
required

Body

multipart/form-data

Request serializer for file upload.

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

Owner of the file (optional)

company
integer

Company to associate the file with (optional)

content
string | null
file_type
any
collection_type
any

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

  • private - private
  • company - company
  • workspace - workspace
workspace_id
integer

Workspace ID when collection_type is 'workspace'

chunk_size
integer

Size of chunks for document processing (optional)

chunk_overlap
number

Overlap between chunks (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

No response body

Response serializer for upload session details.

uuid
string<uuid>
required

Unique identifier for the upload session

is_valid
boolean
required

Whether the upload session is currently valid and active

created_at
string<date-time>
required

Timestamp when the upload session was created

updated_at
string<date-time>
required

Timestamp when the upload session was last updated

documents
object[]
required

List of documents associated with this upload session

I