Creating a Snapshot
- Python
- CLI
- HTTP
Create a snapshot from a running sandbox using For more control over the async operation, use
snapshot_and_wait():snapshot() and poll with get_snapshot():Restoring from a Snapshot
Create a new sandbox from a snapshot. The new sandbox inherits the image, resources, entrypoint, and secrets from the snapshot unless explicitly overridden.- Python
- CLI
- HTTP
Managing Snapshots
List Snapshots
- Python
- CLI
- HTTP
Get Snapshot Details
- Python
- CLI
- HTTP
SnapshotInfo object contains:
| Field | Type | Description |
|---|---|---|
snapshot_id | str | Unique snapshot identifier |
namespace | str | Namespace the snapshot belongs to |
sandbox_id | str | ID of the sandbox that was snapshotted |
base_image | str | Container image of the original sandbox |
status | SnapshotStatus | in_progress, completed, or failed |
error | str | None | Error message if the snapshot failed |
size_bytes | int | None | Size of the snapshot in bytes |
created_at | datetime | None | When the snapshot was created |
Delete a Snapshot
- Python
- CLI
- HTTP
snapshot_and_wait Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
sandbox_id | str | — | ID of the running sandbox to snapshot |
timeout | float | 300 | Max seconds to wait for completion |
poll_interval | float | 1.0 | Seconds between status polls |