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, "created_at": "2025-03-01T10:30:00Z", "updated_at": "2025-03-01T10:30:00Z", "total_pages": 0, "tags": [], "created_by": { "id": 42, "first_name": "Jane", "last_name": "Doe", "username": "jdoe" }, "upload_session_uuid": "550e8400-e29b-41d4-a716-446655440000", "external_metadata": null, "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)
  • name: 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

Ingestion pipeline to use. Only 'v2.2.1' is accepted. If omitted, the platform default is used.

Maximum string length: 255
tags
integer[]

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

external_metadata
object

External source metadata for documents ingested from third-party systems. Provide as a JSON object with external_id (required), doc_type (optional), and additional_metadata (optional JSON object).

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

created_at
string<date-time>
required

Creation date of the resource

updated_at
string<date-time>
required
total_pages
integer
required

Total number of pages

tags
object[]
required

List of tags associated with the document

created_by
object
required

User who created the file. Null when the file was created by the system.

upload_session_uuid
string<uuid> | null
required

Upload session UUID associated with this document

external_metadata
object
required

External document metadata

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,
-