Skip to main content
POST
/
api
/
sandboxes
/
{id}
/
files
/
upload-url
Generate Upload URL
curl --request POST \
  --url https://app.opencomputer.dev/api/sandboxes/{id}/files/upload-url \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "path": "<string>",
  "expiresIn": 123
}
'
{
  "url": "https://app.opencomputer.dev/api/sandboxes/sb-xxx/files/upload?path=%2Fapp%2Finput.csv&expires=1773906434&signature=abc123",
  "expiresAt": "2025-01-01T01:00:00Z"
}
Generates a signed URL for uploading a file without an API key. See Signed URLs for usage guide.
id
string
required
Sandbox ID
path
string
required
Absolute path for the destination file
expiresIn
number
default:"3600"
URL lifetime in seconds (max: 86400)
{
  "url": "https://app.opencomputer.dev/api/sandboxes/sb-xxx/files/upload?path=%2Fapp%2Finput.csv&expires=1773906434&signature=abc123",
  "expiresAt": "2025-01-01T01:00:00Z"
}