Skip to main content
Build a reusable sandbox environment in three steps: define the template, wait for the build to finish, then create sandboxes from it.

Create the template

Pass a base image via from and (optionally) a list of build steps that run inside the build VM.
Template.create returns once the template is registered and the first build is queued, not when the build is finished. Call waitUntilReady() (TS) / wait_until_ready() (Python) to block until the build reaches a terminal state.

Stream build logs

waitUntilReady accepts an onLog callback that receives each SSE event as the build runs.
On success, waitUntilReady returns the refreshed TemplateInfo with status = "ready". On failure, it raises BuildError with a machine-readable code (e.g. step_failed, image_pull_failed).

Create a sandbox from the template

Once ready, create sandboxes by passing the Template instance, the name, or the UUID.
The sandbox’s vCPU, memory, and disk size are inherited from the template; they cannot be overridden at sandbox creation (the snapshot dictates VM shape).