Skip to main content
Each thread has isolated file storage accessible via these endpoints. Files are stored in the thread’s SQLite database with support for external references (URLs, S3, R2).

List Directory / Query Files

string
required
The thread identifier
boolean
Return storage statistics instead of file list
string
Full-text search pattern
string
Glob pattern for path matching (e.g., *.jpg)

Get File

string
required
The thread identifier
string
required
File path (e.g., attachments/photo.jpg)
boolean
Return image thumbnail instead of full file
string
Set to json to return metadata only
Returns binary file data with appropriate Content-Type header, or JSON metadata when format=json.

Write File

string
required
The thread identifier
string
required
File path to write
string
Base64-encoded file data
string
MIME type of the file
object
Optional custom metadata
number
Image width in pixels (for images)
number
Image height in pixels (for images)
string
Base64-encoded thumbnail for images
string
Set to "directory" to create a directory
string
External URL for linked files (instead of data)
Large files (>1.75MB) are automatically chunked server-side. No special client handling is required—just send a normal POST request with the binary data.

Delete File

string
required
The thread identifier
string
required
File or directory path to delete
Returns 204 No Content on success. Directories must be empty to delete.

FileRecord Schema