Skip to content

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

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

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

Update datetime

formatdate-time
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

class FileCreateResponse:

An uploaded file.

id: str

Unique file identifier

name: str

File name including extension

maxLength3000
minLength1
project_id: str

Project this file belongs to

formatuuid
expires_at: Optional[datetime]

When the file expires and may be automatically removed. Null means no expiration.

formatdate-time
external_file_id: Optional[str]

Optional ID for correlating with an external system

file_type: Optional[str]

File extension (pdf, docx, png, etc.)

maxLength3000
minLength1
last_modified_at: Optional[datetime]

When the file was last modified (ISO 8601)

formatdate-time
purpose: Optional[str]

How the file will be used: user_data, parse, extract, classify, split, sheet, or agent_app

class FileQueryResponse:

Paginated list of files.

items: List[Item]

The list of items.

id: str

Unique file identifier

name: str

File name including extension

maxLength3000
minLength1
project_id: str

Project this file belongs to

formatuuid
expires_at: Optional[datetime]

When the file expires and may be automatically removed. Null means no expiration.

formatdate-time
external_file_id: Optional[str]

Optional ID for correlating with an external system

file_type: Optional[str]

File extension (pdf, docx, png, etc.)

maxLength3000
minLength1
last_modified_at: Optional[datetime]

When the file was last modified (ISO 8601)

formatdate-time
purpose: Optional[str]

How the file will be used: user_data, parse, extract, classify, split, sheet, or agent_app

next_page_token: Optional[str]

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

total_size: Optional[int]

The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

class FileListResponse:

An uploaded file.

id: str

Unique file identifier

name: str

File name including extension

maxLength3000
minLength1
project_id: str

Project this file belongs to

formatuuid
expires_at: Optional[datetime]

When the file expires and may be automatically removed. Null means no expiration.

formatdate-time
external_file_id: Optional[str]

Optional ID for correlating with an external system

file_type: Optional[str]

File extension (pdf, docx, png, etc.)

maxLength3000
minLength1
last_modified_at: Optional[datetime]

When the file was last modified (ISO 8601)

formatdate-time
purpose: Optional[str]

How the file will be used: user_data, parse, extract, classify, split, sheet, or agent_app