Create a new sandbox
Authorizations
API key passed as Bearer token
Headers
Reuse the same key to safely retry the same create, reusable snapshot create, fork, upload create/complete, or agent deployment create operation without duplicating work.
Body
Durable reusable snapshot ID to restore into a fresh sandbox. When provided, sizing, template, environment, filesystem, and VM egress policy are taken from the snapshot; each create idempotency key creates at most one child sandbox and the snapshot remains reusable for additional create requests.
Optional custom template warm-pool selector for sandbox create. V1 requires an explicit id for prefer and require modes; bypass may omit id to force cold create.
Template name or Docker image
x >= 1x >= 1Minimum rootfs size in MiB. On cold create the rootfs is grown to this size before boot. For snapshot-backed templates the disk size is fixed at build time, so disk_mb must not exceed the template's built-in size (rebuild the template with a larger disk_mb instead). Omit to use the default headroom. Not permitted with snapshot_id.
512 <= x <= 131072Sandbox auto-destroy timeout in milliseconds
destroy, hibernate When true, a hibernated sandbox is automatically resumed when a
command, file, PTY, desktop, or proxy route targets its original
sandbox ID. Requires timeout_action: hibernate or
lifecycle.on_timeout: pause.
Arbitrary user-supplied metadata attached to the sandbox; stored verbatim (any JSON object), deliberately open.
When false, the sandbox has no network connectivity.
Optional default working directory for sandbox commands. Must be an absolute sandbox path that stays within the sandbox root. Accepted values are normalized before persistence, and reserved runtime paths under /workspace/.nullspace are rejected. When omitted, commands inherit the template default workdir; the standard agent-oriented templates default to /workspace. Clients may send an explicit null, which is treated the same as omitting the field.
Create-time shared-volume mount requests. ref is the canonical selector and accepts either an exact volume name or a volume id. On snapshot resume and fork, shared mounts are remounted with fresh internal leases before the new sandbox becomes ready; that storage remount does not make VM memory or mutable rootfs state portable across incompatible runtime hosts.
8Response
Sandbox created
"sb_a1b2c3d4"
creating, running, paused, destroyed, error Sandbox metadata. Attached volume state is exposed under volume_attachments in request order. Free-form user-supplied object stored verbatim; deliberately open.
Alias of timeout_at for clients that expect an expiry timestamp field.
destroy, hibernate Normalized default working directory for this sandbox when one was configured.
Opaque token returned at create time. Send it as x-nullspace-traffic-access-token when network.allow_public_traffic is false.
Create-time warm-pool checkout result. Omitted when create did not consider a warm pool.