Skip to content
Discord

Files

Upload File To Folder
client.folders.files.upload(stringfolderID, FileUploadParams { file, duplicate_handling, name } params, RequestOptionsoptions?): FileUploadResponse { id, source_id, chunks_embedded, 13 more }
POST/v1/folders/{folder_id}/upload
List Files For Folder
client.folders.files.list(stringfolderID, FileListParams { after, before, include_content, 3 more } query?, RequestOptionsoptions?): ArrayPage<FileListResponse { id, source_id, chunks_embedded, 13 more } >
GET/v1/folders/{folder_id}/files
Retrieve File
client.folders.files.retrieve(stringfileID, FileRetrieveParams { folder_id, include_content } params, RequestOptionsoptions?): FileRetrieveResponse { id, source_id, chunks_embedded, 13 more }
GET/v1/folders/{folder_id}/files/{file_id}
Delete File From Folder
client.folders.files.delete(stringfileID, FileDeleteParams { folder_id } params, RequestOptionsoptions?): void
DELETE/v1/folders/{folder_id}/{file_id}
ModelsExpand Collapse
FileUploadResponse { id, source_id, chunks_embedded, 13 more }

Representation of a single FileMetadata

id: string

The human-friendly ID of the File

Deprecatedsource_id: string

Deprecated: Use folder_id field instead. The unique identifier of the source associated with the document.

chunks_embedded?: number | null

Number of chunks that have been embedded.

content?: string | null

Optional full-text content of the file; only populated on demand due to its size.

created_at?: string | null

The creation date of the file.

formatdate-time
error_message?: string | null

Optional error message if the file failed processing.

file_creation_date?: string | null

The creation date of the file.

file_last_modified_date?: string | null

The last modified date of the file.

file_name?: string | null

The name of the file.

file_path?: string | null

The path to the file.

file_size?: number | null

The size of the file in bytes.

file_type?: string | null

The type of the file (MIME type).

original_file_name?: string | null

The original name of the file as uploaded.

processing_status?: "pending" | "parsing" | "embedding" | 2 more

The current processing status of the file (e.g. pending, parsing, embedding, completed, error).

One of the following:
"pending"
"parsing"
"embedding"
"completed"
"error"
total_chunks?: number | null

Total number of chunks for the file.

updated_at?: string | null

The update date of the file.

formatdate-time
FileListResponse { id, source_id, chunks_embedded, 13 more }

Representation of a single FileMetadata

id: string

The human-friendly ID of the File

Deprecatedsource_id: string

Deprecated: Use folder_id field instead. The unique identifier of the source associated with the document.

chunks_embedded?: number | null

Number of chunks that have been embedded.

content?: string | null

Optional full-text content of the file; only populated on demand due to its size.

created_at?: string | null

The creation date of the file.

formatdate-time
error_message?: string | null

Optional error message if the file failed processing.

file_creation_date?: string | null

The creation date of the file.

file_last_modified_date?: string | null

The last modified date of the file.

file_name?: string | null

The name of the file.

file_path?: string | null

The path to the file.

file_size?: number | null

The size of the file in bytes.

file_type?: string | null

The type of the file (MIME type).

original_file_name?: string | null

The original name of the file as uploaded.

processing_status?: "pending" | "parsing" | "embedding" | 2 more

The current processing status of the file (e.g. pending, parsing, embedding, completed, error).

One of the following:
"pending"
"parsing"
"embedding"
"completed"
"error"
total_chunks?: number | null

Total number of chunks for the file.

updated_at?: string | null

The update date of the file.

formatdate-time
FileRetrieveResponse { id, source_id, chunks_embedded, 13 more }

Representation of a single FileMetadata

id: string

The human-friendly ID of the File

Deprecatedsource_id: string

Deprecated: Use folder_id field instead. The unique identifier of the source associated with the document.

chunks_embedded?: number | null

Number of chunks that have been embedded.

content?: string | null

Optional full-text content of the file; only populated on demand due to its size.

created_at?: string | null

The creation date of the file.

formatdate-time
error_message?: string | null

Optional error message if the file failed processing.

file_creation_date?: string | null

The creation date of the file.

file_last_modified_date?: string | null

The last modified date of the file.

file_name?: string | null

The name of the file.

file_path?: string | null

The path to the file.

file_size?: number | null

The size of the file in bytes.

file_type?: string | null

The type of the file (MIME type).

original_file_name?: string | null

The original name of the file as uploaded.

processing_status?: "pending" | "parsing" | "embedding" | 2 more

The current processing status of the file (e.g. pending, parsing, embedding, completed, error).

One of the following:
"pending"
"parsing"
"embedding"
"completed"
"error"
total_chunks?: number | null

Total number of chunks for the file.

updated_at?: string | null

The update date of the file.

formatdate-time