Skip to content
Get started

Files

List files
files.list(FileListParams**kwargs) -> SyncCursorIDPage[File]
GET/v1/files
Upload a file
files.upload(FileUploadParams**kwargs) -> File
POST/v1/files
Delete a file
files.delete(strfile_id)
DELETE/v1/files/{file_id}
Get file metadata
files.retrieve(strfile_id) -> File
GET/v1/files/{file_id}
ModelsExpand Collapse
class File:

Response representing an uploaded file.

This is returned from POST (upload), GET (retrieve), and list endpoints.

id: str

The unique identifier for this file.

content_type: str

The MIME type of the file.

maxLength255
created_at: datetime

The timestamp when the file was uploaded.

formatdate-time
file_name: str

The original filename of the uploaded file.

maxLength255
size: int

The size of the file in bytes.

minimum0
object: Optional[Literal["file"]]

The object type, which is always 'file'.