Files
The Files API allows you to upload, download, and manage files within the secure virtual machines (sandboxes) of your deployments. This is essential for providing your AI agents with input data or retrieving the results of their work.List files
Retrieve a list of all files currently tracked for a specific deployment.GET /api/files?deploymentId={deploymentId}
Response (200)
Uploading Files (Two-Step Process)
To upload a file, you first request a pre-signed S3 URL, upload the file directly to S3, and then record the successful upload in the database.1. Request Pre-signed URL
POST /api/files/presign
Body
PUT request to the uploadUrl with your file’s binary data.
2. Record Upload Completion
Once the S3 upload succeeds, notify the API so the file becomes available to the sandbox.POST /api/files/record
Body
Download a file
Get a short-lived presigned URL to download a specific file.GET /api/files/download?fileId={fileId}
Response (200)
Sync files into a sandbox
Copies files from S3 into the live sandbox’s Desktop directory. Use this to load input data before the agent starts working.POST /api/deployments/{id}/files/sync
Body
The sandbox must be in
running state before calling sync. Files are placed at /home/user/Desktop/ inside the sandbox.Pull files from a sandbox
Extracts files from the sandbox Desktop back to S3, making them available for download.POST /api/deployments/{id}/files/pull
Body
GET /api/files/download.