Skip to content

Snapshot and terminate a sandbox

POST
/v1/sandbox/{sandboxID}/snapshot/pause

Create a named snapshot from a running sandbox, then terminate the source sandbox after the snapshot is stored. The snapshot can later be restored via the resume endpoint.

sandboxID
required
string

Unique sandbox identifier.

object
name

Optional snapshot name. If omitted, Leap0 generates one.

string
Example
workspace-warm

Snapshot created and sandbox terminated.

object
id
required

Unique snapshot identifier.

string
Example
snap-abc123
name
required

Snapshot name.

string
Example
workspace-warm
template_id
required

Template the snapshot was created from.

string
vcpu
required

Number of virtual CPUs stored with the snapshot.

integer
>= 1
memory_mib
required

Memory stored with the snapshot, in MiB.

integer format: int64
>= 1
disk_mib
required

Writable disk size stored with the snapshot, in MiB.

integer format: int64
>= 1
state
required

The sandbox state after the snapshot-pause operation completes.

string
Allowed values: paused
network_policy

Network egress policy for a sandbox. When omitted, defaults to allow-all.

object
mode
required

Policy mode. allow-all permits all egress, deny-all blocks all egress, custom uses the allow/deny lists.

string
Allowed values: allow-all deny-all custom
allow_domains

Domain names to allow outbound access to (custom mode only).

Array<string>
<= 50 items
allow_cidrs

CIDR ranges to allow outbound access to (custom mode only).

Array<string>
<= 10 items
transforms

Per-domain request transforms, such as credential brokering.

Array<object>
<= 20 items

A per-domain request transform rule for credential brokering or header manipulation.

object
domain
required

Domain pattern to match (e.g. api.openai.com).

string
inject_headers

Headers to inject into matching requests.

object
key
additional properties
string
strip_headers

Header names to strip from matching requests.

Array<string>
created_at
required

ISO 8601 timestamp of when the snapshot was created.

string format: date-time

Bad request – validation error.

object
message
required

Summary message, e.g. “Invalid request”.

string
errors
required
Array<object>
object
field
required

JSON field name that failed validation (e.g. “path”, “command”).

string
error
required

Human-readable description of the validation failure.

string

Unauthorized – invalid or missing API key.

object
message
required

Human-readable error message.

string

Resource not found.

object
message
required

Human-readable error message.

string

Conflict - sandbox is not running, or the snapshot name already exists or is being created.

object
message
required

Human-readable error message.

string