Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Snapshots

Standalone class — not a property on Sandbox.

Constructor

typescript
import { Snapshots } from "@opencomputer/sdk"; const snapshots = new Snapshots(); // or with explicit config: const snapshots = new Snapshots({ apiKey: "...", apiUrl: "..." });
body apiKeystring
API key (falls back to OPENCOMPUTER_API_KEY env var)
body apiUrlstring
API URL (falls back to OPENCOMPUTER_API_URL env var)

snapshots.create(opts)

Create a pre-built snapshot from a declarative image. HTTP API →
body namestringrequired
Unique snapshot name
body imageImagerequired
Declarative image definition
body onBuildLogs(log: string) => void
Build log streaming callback
Returns: Promise<SnapshotInfo>

snapshots.list()

List all snapshots. HTTP API →
Returns: Promise<SnapshotInfo[]>

snapshots.get(name)

Get a snapshot by name. HTTP API →
body namestringrequired
Snapshot name
Returns: Promise<SnapshotInfo>

snapshots.delete(name)

Delete a snapshot. Existing sandboxes created from it are not affected. HTTP API →
body namestringrequired
Snapshot name
Returns: Promise<void>

Types

SnapshotInfo
typescript
interface SnapshotInfo { id: string; name: string; status: string; // "building" | "ready" | "failed" contentHash: string; checkpointId: string; manifest: object; createdAt: string; lastUsedAt: string; }