Sandbox states
Create a sandbox
- Python
- TypeScript
Create with full options
- Python
- TypeScript
SandboxInfo model
TheSandboxInfo object is returned by create(), get(), and list().
Inspect a sandbox
- Python
- TypeScript
List sandboxes
- Python
- TypeScript
Connect to an existing sandbox
Useconnect() to reconnect to a running or paused sandbox from a different process or after a restart.
- Python
- TypeScript
Extend timeout
- Python
- TypeScript
Pause and resume
Pausing a sandbox preserves the full memory state and filesystem. No CPU is consumed while paused. The sandbox can be resumed instantly.- Python
- TypeScript
SandboxMetrics model
- Python
- TypeScript
Resource configuration
Resources (vCPUs, memory, disk) are fixed at the template level — they cannot be overridden per sandbox. Sending aresources field in Sandbox.create() is rejected with HTTP 400 "resources field is not supported; set resources at template level".
To run with different resource sizing, build or select a template with the desired allocation. See Templates.
Each sandbox receives its own copy-on-write rootfs derived from the template. Template-derived resources are also validated against your account tier on every create — requests exceeding
MaxVCPUs, MaxMemoryMB, or MaxStorageGiB return HTTP 403.Kill a sandbox
- Python
- TypeScript
Auto-injected environment variables
Every sandbox receives these environment variables automatically:Lifecycle configuration
on_timeout="pause", the sandbox is preserved rather than destroyed when it times out. Combined with auto_resume=True, the next SDK call automatically wakes it up.
Maximum runtime is 24 hours for Pro tier and 1 hour for the Base tier. Pausing resets the runtime window.