Skip to main content
POST
/
api
/
v3
/
files
curl --request POST \
  --url https://paradigm.lighton.ai/api/v3/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=(binary file data)' \
  --form workspace_id=42
{
  "id": 12345,
  "filename": "document.pdf",
  "workspace": {
    "id": 42,
    "name": "My Workspace",
    "workspace_type": "custom"
  },
  "summaries": [],
  "title": "document",
  "extension": "pdf",
  "status": "pending",
  "status_vision": null,
  "uploaded_at": "2025-03-01T10:30:00Z",
  "updated_at": "2025-03-01T10:30:00Z",
  "total_pages": 0,
  "tags": [],
  "upload_session_uuid": "550e8400-e29b-41d4-a716-446655440000",
  "message": "File queued for processing"
}

Authorizations

Authorization
string
header
required

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

Body

Request serializer for POST /api/v3/files endpoint.

Phase 1 Implementation - Core Parameters:

  • file: The file to upload (required)
  • filename: Custom filename (optional, defaults to uploaded filename)
  • title: Custom title for the document (optional)
  • workspace_id: Workspace ID where the document will be stored (required)
  • parser: Pipeline to use for ingestion processing (optional)

Changes from V2:

  • Removed: collection_type (workspace_id is now the source of truth)
  • Removed: collection (derived automatically from workspace_id)
  • Simplified: workspace_id is now required and is the single source of truth

Phase 2 (Deferred):

  • chunk_size, chunk_overlap
  • OCR configuration parameters
  • These may be reorganized into nested configuration objects
file
string<uri>
required

The file to upload (binary data)

workspace_id
integer
required

Workspace where the document will be stored.

filename
string

Custom filename (defaults to uploaded filename if not provided)

Maximum string length: 255
title
string

Custom title for the document. If not provided, defaults to filename without extension.

Maximum string length: 255
parser
string

Pipeline to use for ingestion processing for this specific file.

Maximum string length: 255
tags
integer[]

List of tag IDs to assign to the document on creation.

Response

File queued for processing successfully

id
integer
required
filename
string
required

Filename of the document

workspace
object
required

Workspace the document belongs to

summaries
object[]
required

Document summaries (all languages)

extension
string
required

File extension of the document

uploaded_at
string<date-time>
required
updated_at
string<date-time>
required
total_pages
integer
required

Total number of pages

tags
object[]
required

List of tags associated with the document

upload_session_uuid
string<uuid> | null
required

Upload session UUID associated with this document

message
string
required

Status message about the file upload

title
string | null
Maximum string length: 255
status
enum<string>
  • pending - Pending
  • parsing - Parsing
  • parsing_failed - Parsing Failed
  • embedding - Embedding
  • embedding_failed - Embedding Failed
  • embedded - Embedded
  • fail - Fail
  • updating - Updating
Available options:
pending,
parsing,
parsing_failed,
embedding,
embedding_failed,
embedded,
fail,
updating
status_vision
enum<string>
  • pending - Pending
  • processing - Processing
  • embedded - Embedded
  • fail - Fail
  • - - Not available
Available options:
pending,
processing,
embedded,
fail,
-