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

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

Get File

threadId
string
required
The thread identifier
path
string
required
File path (e.g., attachments/photo.jpg)
thumbnail
boolean
Return image thumbnail instead of full file
format
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

threadId
string
required
The thread identifier
path
string
required
File path to write
data
string
Base64-encoded file data
mimeType
string
MIME type of the file
metadata
object
Optional custom metadata
width
number
Image width in pixels (for images)
height
number
Image height in pixels (for images)
thumbnail
string
Base64-encoded thumbnail for images
type
string
Set to "directory" to create a directory
location
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

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

FileRecord Schema