Note: The sandbox is paused while the snapshot is being created. Snapshots are persistent and remain available even after the source sandbox is deleted.
Snapshot
Create Snapshot
Last modified on August 5, 2026
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import os
from novita_sandbox import Novita
novita = Novita(api_key=os.getenv("NOVITA_API_KEY", ""))
sandbox = novita.sandbox.create("base")
# Prepare state you want to preserve
sandbox.commands.run("pip install requests")
# Capture the current state (the sandbox is paused during this)
snapshot = sandbox.create_snapshot()
print("Snapshot ID:", snapshot.snapshot_id)
sandbox.kill()
import { Novita } from 'novita-sandbox'
const novita = new Novita({
apiKey: process.env.NOVITA_API_KEY || '',
})
const sandbox = await novita.sandbox.create('base')
// Prepare state you want to preserve
await sandbox.commands.run('pip install requests')
// Capture the current state (the sandbox is paused during this)
const snapshot = await sandbox.createSnapshot()
console.log('Snapshot ID:', snapshot.snapshotId)
await sandbox.kill()
import os
from novita_sandbox import Novita
novita = Novita(api_key=os.getenv("NOVITA_API_KEY", ""))
snapshot_id = "<sandboxID>"
snapshot = novita.sandbox.create_snapshot(sandbox_id=snapshot_id)
print("Snapshot ID:", snapshot.snapshot_id)
import { Novita } from 'novita-sandbox'
const novita = new Novita({
apiKey: process.env.NOVITA_API_KEY || '',
})
const sandboxId = '<sandboxID>'
const snapshot = await novita.sandbox.createSnapshot(sandboxId)
console.log('Snapshot ID:', snapshot.snapshotId)