Skip to main content
A snapshot captures a sandbox’s disk state at a point in time. It’s identified by its own snapshot_id, tied back to the source_sandbox_id it was taken from — but its identity outlives that source: you can delete the sandbox that produced a snapshot and keep the snapshot. See Snapshots for the full concept.
To start a new sandbox from a snapshot, pass its id to create (snapshot in the SDKs and API, snapshot on the MCP sandbox_create tool). To clone a running sandbox directly, use fork.

Create a snapshot

The source sandbox must be running — suspended, failed, or already-deleted sandboxes are rejected rather than snapshotted.
The SDKs accept (or auto-generate) an idempotency key for create, so a retried call returns the same snapshot identity rather than minting a second one. If the source sandbox isn’t running, the SDKs raise/throw a specific error rather than a generic failure — a suspended source raises SandboxSuspendedError, a failed one SandboxFailedError, a deleted one SandboxNotFoundError/SandboxDeletedError.

Delete a snapshot

Delete is idempotent — calling it again on an already-deleted snapshot is a local no-op, not an error.
Because a snapshot’s identity outlives its source sandbox, you can delete a snapshot’s source sandbox first and its snapshot later — the two are independent decisions.

Snapshots

Sandboxes

Snapshot CLI reference