VM Snapshots
Capture and manage disk and full (memory+disk) snapshots.
Snapshots capture a running sandbox's state under a project-unique name. A disk snapshot captures the filesystem and can seed new sandboxes anywhere; a full snapshot also captures memory and resumes processes, but is pinned to its home region. Capture is asynchronous — the snapshot starts pending and becomes ready or failed. See the VM Snapshots guide.
POST /vms/:id/snapshots
Capture a snapshot of a running sandbox. The sandbox keeps running; capture happens with a brief pause-copy-resume on its host.
Request
| Field | Type | Required / default | Description |
|---|---|---|---|
name | string | required | Project-unique snapshot name. |
kind | string | "disk" | "disk" (filesystem) or "full" (memory + disk). |
Errors
404— unknown sandbox id or another project's sandbox.409— sandbox notrunning; sandbox not yet placed on a host; sandbox has no image manifest to snapshot from; or the snapshot name already exists.
GET /snapshots
List the project's snapshots, newest first, with cursor pagination (limit default 100, max 200; cursor from a previous next_cursor).
Statuses: pending → ready | failed (error explains a failure). no_changes is true when the sandbox had no writes since its parent — the snapshot then reuses the parent manifest. The artifact_ref / fc_version / cpu_marker / mem_bytes / runner_id fields are populated for full snapshots.
GET /snapshots/:id
Fetch one snapshot by its UUID, with optional long-polling.
| Query param | Type | Default | Description |
|---|---|---|---|
wait | string | — | Block until this status or a terminal one (ready, failed) is reached. Typically wait=ready. |
timeout_ms | int | 30000 | Max wait, clamped to [0, 60000]. Timeout returns the current state with 200. |
The response is a single snapshot object with the same fields as the list items above.
Errors
404— unknown id or another project's snapshot.
DELETE /snapshots/:id
Delete a snapshot. Deletion is refused while other snapshots descend from this one (they were captured on top of its manifest) — delete the descendants first.
Errors
404— unknown id or another project's snapshot.409— other snapshots descend from this one.
Restoring
Create a new sandbox from a snapshot by passing a snapshot source as the image on POST /vms:
- The snapshot must be
ready(409otherwise;404if the name is unknown). - Disk snapshots restore in any region — on first cross-region use the artifact is replicated, and the create returns
409("replicating…; retry shortly") until the replica is ready. - Full snapshots are region-pinned: restoring outside the home region fails with
400. A full restore resumes the captured memory, and reuses the source sandbox's attached secrets.