Skip to content
Framework Docs

Files

Upload File
client.Files.New(ctx, params) (*FileNewResponse, error)
POST/api/v1/beta/files
Query Files
Deprecated
client.Files.Query(ctx, params) (*FileQueryResponse, error)
POST/api/v1/beta/files/query
List Files
client.Files.List(ctx, query) (*PaginatedCursor[FileListResponse], error)
GET/api/v1/beta/files
Delete File
client.Files.Delete(ctx, fileID, body) error
DELETE/api/v1/beta/files/{file_id}
Read File Content
client.Files.Get(ctx, fileID, query) (*PresignedURL, error)
GET/api/v1/beta/files/{file_id}/content
ModelsExpand Collapse
type File struct{…}

Schema for a file.

ID string

Unique identifier

formatuuid
Name string
ProjectID string

The ID of the project that the file belongs to

formatuuid
CreatedAt Timeoptional

Creation datetime

formatdate-time
DataSourceID stringoptional

The ID of the data source that the file belongs to

formatuuid
ExpiresAt Timeoptional

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

formatdate-time
ExternalFileID stringoptional

The ID of the file in the external system

FileSize int64optional

Size of the file in bytes

minimum0
FileType stringoptional

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

maxLength3000
minLength1
LastModifiedAt Timeoptional

The last modified time of the file

formatdate-time
PermissionInfo map[string, FilePermissionInfoUnion]optional

Permission information for the file

One of the following:
type FilePermissionInfoMap map[string, any]
type FilePermissionInfoArray []any
string
float64
bool
Purpose stringoptional

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

ResourceInfo map[string, FileResourceInfoUnion]optional

Resource information for the file

One of the following:
type FileResourceInfoMap map[string, any]
type FileResourceInfoArray []any
string
float64
bool
UpdatedAt Timeoptional

Update datetime

formatdate-time
type PresignedURL struct{…}

Schema for a presigned URL.

ExpiresAt Time

The time at which the presigned URL expires

formatdate-time
URL string

A presigned URL for IO operations against a private file

minLength1
formaturi
FormFields map[string, string]optional

Form fields for a presigned POST request