Skip to content

Files

Upload File
POST/api/v1/beta/files
Query Files
Deprecated
POST/api/v1/beta/files/query
List Files
GET/api/v1/beta/files
Delete File
DELETE/api/v1/beta/files/{file_id}
Read File Content
GET/api/v1/beta/files/{file_id}/content
ModelsExpand Collapse
File = object { id, name, project_id, 11 more }

Schema for a file.

id: string

Unique identifier

formatuuid
name: string
project_id: string

The ID of the project that the file belongs to

formatuuid
created_at: optional string

Creation datetime

formatdate-time
data_source_id: optional string

The ID of the data source that the file belongs to

formatuuid
expires_at: optional string

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

formatdate-time
external_file_id: optional string

The ID of the file in the external system

file_size: optional number

Size of the file in bytes

minimum0
file_type: optional string

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

maxLength3000
minLength1
last_modified_at: optional string

The last modified time of the file

formatdate-time
permission_info: optional map[map[unknown] or array of unknown or string or 2 more]

Permission information for the file

One of the following:
map[unknown]
array of unknown
string
number
boolean
purpose: optional string

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

resource_info: optional map[map[unknown] or array of unknown or string or 2 more]

Resource information for the file

One of the following:
map[unknown]
array of unknown
string
number
boolean
updated_at: optional string

Update datetime

formatdate-time
PresignedURL = object { expires_at, url, form_fields }

Schema for a presigned URL.

expires_at: string

The time at which the presigned URL expires

formatdate-time
url: string

A presigned URL for IO operations against a private file

minLength1
formaturi
form_fields: optional map[string]

Form fields for a presigned POST request

FileCreateResponse = object { id, name, project_id, 5 more }

An uploaded file.

id: string

Unique file identifier

name: string

File name including extension

maxLength3000
minLength1
project_id: string

Project this file belongs to

formatuuid
expires_at: optional string

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

formatdate-time
external_file_id: optional string

Optional ID for correlating with an external system

file_type: optional string

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

maxLength3000
minLength1
last_modified_at: optional string

When the file was last modified (ISO 8601)

formatdate-time
purpose: optional string

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

FileQueryResponse = object { items, next_page_token, total_size }

Paginated list of files.

items: array of object { id, name, project_id, 5 more }

The list of items.

id: string

Unique file identifier

name: string

File name including extension

maxLength3000
minLength1
project_id: string

Project this file belongs to

formatuuid
expires_at: optional string

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

formatdate-time
external_file_id: optional string

Optional ID for correlating with an external system

file_type: optional string

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

maxLength3000
minLength1
last_modified_at: optional string

When the file was last modified (ISO 8601)

formatdate-time
purpose: optional string

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

next_page_token: optional string

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 number

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.

FileListResponse = object { id, name, project_id, 5 more }

An uploaded file.

id: string

Unique file identifier

name: string

File name including extension

maxLength3000
minLength1
project_id: string

Project this file belongs to

formatuuid
expires_at: optional string

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

formatdate-time
external_file_id: optional string

Optional ID for correlating with an external system

file_type: optional string

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

maxLength3000
minLength1
last_modified_at: optional string

When the file was last modified (ISO 8601)

formatdate-time
purpose: optional string

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