Skip to main content
POST
/
files
/
export
Export File from Computer
curl --request POST \
  --url https://www.orgo.ai/api/files/export \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "desktopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "path": "Desktop/results.txt"
}
'
{
  "success": true,
  "file": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "filename": "<string>",
    "size_bytes": 123,
    "content_type": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "desktop_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "url": "<string>"
}
Export a file from a computer’s filesystem. This allows you to pull files created inside the VM (like results, screenshots, or generated content) and get a download URL.
The computer must be in a running state to export files.

Path Formats

The path parameter accepts several formats:
FormatExample
Relative to homeDesktop/results.txt
Absolute path/home/user/Desktop/results.txt
With tilde~/Desktop/results.txt

Security

Files can only be exported from within /home/user. Attempting to access paths outside this directory will return a 403 error.

Example

curl -X POST https://www.orgo.ai/api/files/export \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"desktopId": "8823f0ff-f4bc-4ab2-833e-40d82c10b505", "path": "Desktop/results.txt"}'

Response

{
  "success": true,
  "file": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "filename": "results.txt",
    "size_bytes": 1024,
    "content_type": "text/plain",
    "created_at": "2024-01-15T10:30:00Z",
    "desktop_id": "8823f0ff-f4bc-4ab2-833e-40d82c10b505",
    "project_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  "url": "https://fly.storage.tigris.dev/bucket/..."
}

Authorizations

Authorization
string
header
required

API key authentication. Format: sk_live_...

Body

application/json
desktopId
string<uuid>
required

Computer ID to export the file from

path
string
required

Path to the file on the computer (e.g., 'Desktop/results.txt' or '/home/user/Desktop/results.txt')

Example:

"Desktop/results.txt"

Response

File exported successfully

success
boolean
file
object
url
string

Signed download URL (expires in 1 hour)