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

python
from opencomputer import Snapshots snapshots = Snapshots() # or with explicit config: snapshots = Snapshots(api_key="...", api_url="...")
body api_keystr
API key (falls back to OPENCOMPUTER_API_KEY env var)
body api_urlstr
API URL (falls back to OPENCOMPUTER_API_URL env var)

await snapshots.create(name, image, on_build_logs=None)

Create a pre-built snapshot. HTTP API →
body namestrrequired
Unique snapshot name
body imageImagerequired
Declarative image definition
body on_build_logsCallable[[str], None]
Build log streaming callback
Returns: dict

await snapshots.list()

HTTP API → — Returns: list[dict]

await snapshots.get(name)

body namestrrequired
Snapshot name
Returns: dict

await snapshots.delete(name)

Delete a snapshot. Existing sandboxes are not affected. HTTP API →
Returns: None

SnapshotInfo

Snapshot methods return dicts with these fields:
SnapshotInfo fields
python
{ "id": str, # Unique snapshot identifier "name": str, # Snapshot name "status": str, # "building" | "ready" | "failed" "contentHash": str, # SHA-256 hash of the image manifest "checkpointId": str, # Linked checkpoint ID "manifest": dict, # The declarative image manifest "createdAt": str, # ISO 8601 creation timestamp "lastUsedAt": str, # ISO 8601 last usage timestamp }