Skip to content

Restore a snapshot

POST
/v1/snapshot/resume

Create a new sandbox from a previously saved snapshot. The restored sandbox reuses the snapshot’s template, CPU, memory, and disk settings. timeout_min auto-pause behavior and network policy can be overridden at restore time.

object
snapshot_name
required

Name of the snapshot to restore.

string
Example
workspace-warm
timeout_min

Sandbox timeout in minutes. Defaults to 5 if not provided.

integer format: int64
>= 1 <= 480
Example
30
auto_pause

Enable auto-pause for the restored sandbox.

boolean
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>

Sandbox restored from snapshot successfully.

object
id
required

Unique sandbox identifier.

string
Example
sbx-abc123
template_id
required

Template the sandbox was created from.

string
vcpu
required

Number of virtual CPUs assigned to the sandbox.

integer
>= 1
memory_mib
required

Memory assigned to the sandbox, in MiB.

integer format: int64
>= 1
disk_mib
required

Writable disk size assigned to the sandbox, in MiB.

integer format: int64
>= 1
state
required

Current state of the sandbox.

string
Allowed values: starting running snapshotting paused unpausing deleting deleted
auto_pause
required

Whether the sandbox is configured to auto-pause on timeout.

boolean
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 sandbox 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

Too many requests - organization sandbox limit reached.

object
message
required

Human-readable error message.

string

Service unavailable - no runner capacity available.

object
message
required

Human-readable error message.

string