Skip to content
Get started

Files

Upload File
files.create(FileCreateParams**kwargs) -> FileCreateResponse
POST/api/v1/beta/files
Query Files
Deprecated
files.query(FileQueryParams**kwargs) -> FileQueryResponse
POST/api/v1/beta/files/query
List Files
files.list(FileListParams**kwargs) -> SyncPaginatedCursor[FileListResponse]
GET/api/v1/beta/files
Delete File
files.delete(strfile_id, FileDeleteParams**kwargs)
DELETE/api/v1/beta/files/{file_id}
Read File Content
files.get(strfile_id, FileGetParams**kwargs) -> PresignedURL
GET/api/v1/beta/files/{file_id}/content
ModelsExpand Collapse
class File:

Schema for a file.

id: str

Unique identifier

formatuuid
name: str
project_id: str

The ID of the project that the file belongs to

formatuuid
created_at: Optional[datetime]

Creation datetime

formatdate-time
data_source_id: Optional[str]

The ID of the data source that the file belongs to

formatuuid
expires_at: Optional[datetime]

The expiration date for the file. Files past this date can be deleted.

formatdate-time
external_file_id: Optional[str]

The ID of the file in the external system

file_size: Optional[int]

Size of the file in bytes

minimum0
file_type: Optional[str]

File type (e.g. pdf, docx, etc.)

maxLength3000
minLength1
last_modified_at: Optional[datetime]

The last modified time of the file

formatdate-time
permission_info: Optional[Dict[str, Union[Dict[str, object], List[object], str, 3 more]]]

Permission information for the file

Accepts one of the following:
Dict[str, object]
List[object]
str
float
bool
purpose: Optional[str]

The intended purpose of the file (e.g., 'user_data', 'parse', 'extract', 'split', 'classify')

resource_info: Optional[Dict[str, Union[Dict[str, object], List[object], str, 3 more]]]

Resource information for the file

Accepts one of the following:
Dict[str, object]
List[object]
str
float
bool
updated_at: Optional[datetime]

Update datetime

formatdate-time
class FileCreate:

Schema for creating a file.

name: str

Name that will be used for created file. If possible, always include the file extension in the name.

maxLength3000
minLength1
data_source_id: Optional[str]

The ID of the data source that the file belongs to

formatuuid
external_file_id: Optional[str]

The ID of the file in the external system

file_size: Optional[int]

Size of the file in bytes

minimum0
last_modified_at: Optional[datetime]

The last modified time of the file

formatdate-time
permission_info: Optional[Dict[str, Union[Dict[str, object], List[object], str, 3 more]]]

Permission information for the file

Accepts one of the following:
Dict[str, object]
List[object]
str
float
bool
resource_info: Optional[Dict[str, Union[Dict[str, object], List[object], str, 3 more]]]

Resource information for the file

Accepts one of the following:
Dict[str, object]
List[object]
str
float
bool
storage_type: Optional[Union[Literal["ephemeral", "permanent"], str, null]]

Storage type for the file. Valid values: 'Ephemeral', 'Permanent' (no expiration). If not specified, defaults to permanent storage.

Accepts one of the following:
Literal["ephemeral", "permanent"]

Storage type for the file. Valid values: 'Ephemeral', 'Permanent' (no expiration). If not specified, defaults to permanent storage.

Accepts one of the following:
"ephemeral"
"permanent"
str
class PresignedURL:

Schema for a presigned URL.

expires_at: datetime

The time at which the presigned URL expires

formatdate-time
url: str

A presigned URL for IO operations against a private file

minLength1
formaturi
form_fields: Optional[Dict[str, str]]

Form fields for a presigned POST request