Skip to main content
File operations use sandbox-specific ingress, commonly seen as https://<sandbox-id-or-name>.sandbox.tensorlake.ai, derived from the sandbox’s ingress_endpoint.Named sandboxes can use the sandbox name in place of the ID in the proxy hostname. The file APIs documented here run on the management URL on port 9501, which always requires authentication. Unauthenticated proxy access applies only to exposed user ports.

Copy Files

tl sbx cp is file-only today. Directory copy workflows should use the Python SDK, TypeScript SDK, or the raw file API.

Read Files

Write Files

A write replaces the destination atomically. The previous content stays in place until the whole file is written.

File Permissions

Overwriting a file that the files API user owns keeps its read, write, and execute bits, so a script you update stays executable and a private file stays private. A new file, or a replacement for another user’s file, gets the default mode, normally 0644. To choose the permissions in the same request, pass mode to the HTTP API as octal text with a leading 0:
tl sbx cp and the SDK write_file methods don’t take a mode. To set one from them, run chmod after the write. See Write File for the full rules, including which sandboxes run a runtime that supports mode.

List Directory Contents

Delete Files

Organize Files

Best Practices

  • Use /workspace as the default directory for application files.
  • Use absolute paths to avoid ambiguity.
  • Use write_file / read_file for programmatic access.
  • Use tl sbx cp for single-file transfers.
  • Use the Python SDK, TypeScript SDK, or raw file API for directory-oriented workflows.

Learn More

Commands

Execute commands in sandboxes.

Snapshots

Save and restore sandbox filesystem, memory, and running processes.

Lifecycle

Sandbox states, resources, and timeouts.