Files
Files Bash makes, and files you hand it.
GET/v1/filesFiles, each with its task and conversation: one user's (user_id) or the company's own Bash's, one task's outputs (task_id), or one conversation's, its tasks' outputs (conversation_id).
source picks what you handed Bash (upload) or what Bash made (output).
Request6 fields
Query
limitintegerHow many items per page, 1 to 100. Default 20.
- Type
integer
cursorstringWhere to go on from: the next_cursor of the page before, unchanged. Absent: the first page.
- Type
string
user_idstringOne user's files, by your id for them. Absent: your company's own Bash's.
- Type
string
task_idstringWhat one task made (task_...): outputs only.
- Type
string
conversation_idstringOne conversation's files, from all its tasks (conv_...).
- Type
string
source"upload" | "output"Only uploads or only outputs. Default: outputs with task_id or conversation_id, uploads without.
- Type
"upload" | "output"
Answers 2002 fields
dataobject[]The items on this page.
idstringThe file (file_...): hand it to an ask as an attachment.
- Example
file_2nq
object"file"Always file.
- Type
"file"
user_idstring | nullYour id for its user; null on your company's own Bash.
- Type
string | null
filenamestring | nullThe file's name; null when it has none.
- Example
itinerary.pdf
mime_typestring | nullIts type, such as application/pdf; null when unknown.
- Type
string | null
size_bytesinteger | nullIts size, in bytes; null when unknown.
- Type
integer | null
source"upload" | "output"upload: a file you handed Bash. output: a file Bash made.
- Type
"upload" | "output"
task_idstring | nullThe task it belongs to (task_...): the one that made it, or used it; null when none did.
- Type
string | null
conversation_idstring | nullThe conversation of its task (conv_...); null for a file no task touched.
- Type
string | null
created_atstringWhen it was made or uploaded, as an ISO 8601 time.
- Type
string
next_cursorstring | nullSend it as cursor for the next page; null on the last page.
- Type
string | null
const files = await vestra.files.list();files = vestra.files.list()vestra files# Upload a file. Send it for one user as multipart form data, with one part named file, up to 10 MB.curl "$VESTRA_BASE_URL/v1/files?user_id=traveller-42" \ -H "Authorization: Bearer $VESTRA_API_KEY" \ -F "file=@ticket.pdf" # Download what Bash made. List one conversation's files (its tasks' outputs), or one task's.curl "$VESTRA_BASE_URL/v1/files?conversation_id=conv_8f2k" \ -H "Authorization: Bearer $VESTRA_API_KEY" # Get one file. The response has a download link that works for a short while.curl "$VESTRA_BASE_URL/v1/files/file_2kq" \ -H "Authorization: Bearer $VESTRA_API_KEY"{ "method": "tools/call", "params": { "name": "files", "arguments": { "user": "traveller-42", "conversation": "conv_8f2k" } }}