Fork Sandbox
Sandbox API
Fork Sandbox
Create a new sandbox from an existing sandbox’s snapshot, inheriting its filesystem.
POST
Fork Sandbox
Forks a sandbox: the new sandbox boots from a snapshot of the origin, so it
starts with the origin’s filesystem already in place. The two are independent
from that point on — writes in the fork are not visible to the origin, and the
origin keeps running.
Use this to branch an expensive setup (dependencies installed, dataset
downloaded, model warmed) into several parallel workers without repeating the
setup in each one.
The origin’s template and resources are inherited (they must match the
snapshot, or Firecracker rejects the restore), so
A fork requires an existing snapshot. Take one with
Create Snapshot first, or the request
fails with
404 no snapshot to fork from.template is ignored in the
request body. name falls back to the origin’s when omitted.
Everything else — timeout, metadata, envs, network, lifecycle,
security — is taken from this request, not copied from the origin. Fields
you can set at create time but which are not read here at all (vault_refs,
volumes, secure, resources) are simply ignored.
Path Parameters
string
required
The sandbox to fork from. Format:
sbx-<hex>.Query Parameters
string
Fork from a specific snapshot instead of the most recent usable one. The
snapshot must belong to this sandbox and to your account.
Body Parameters
All fields are optional in the sense that the request succeeds without them — but an omitted field means “unset on the fork”, not “copy the origin”.string
Name for the forked sandbox. Unlike Create — which derives the name from the
template — Fork honours this field.
integer
Auto-kill timeout in seconds, applied independently of the origin. It runs from
creation and is not extended by activity — running commands does not reset
it. Pass
0 to disable auto-kill.object
Environment variables for the fork. Replaces the origin’s, rather than merging.
object
Network policy for the fork. See Network Policy.
object
Security policy for the fork. See security policies.
object
Arbitrary string key/value pairs.
object
Lifecycle configuration for the fork, applied independently of the origin.
Response
Returns201 with the full sandbox object for the fork — the same shape as
Create Sandbox. sandbox_id is new; the origin
is unchanged.
Example
Response