Create new sandbox
Create a Linux sandbox or a macOS sandbox with beta access enabled for your team.
Authorizations
Body
- Image launch
- Snapshot restore
- macOS disk launch (Beta)
Provide exactly one start source: imageName (with optional imageId), snapshotName (Linux, with optional snapshotId), or diskId (macOS). macOS is in beta; contact info@hyperbrowser.ai to enable it for your team. Set runtimeClass to macos and use region us for Mac launches. CPU and memory can be set for image launches and macOS disk launches; memory snapshots restore their original resources. Mac disk resizing is not supported.
Image name to launch from (base image such as node, python, default, or a custom image). For macOS beta, use macos-base with runtimeClass macos; each image launch creates a new writable disk.
Sandbox runtime. Ordinary requests default to firecracker (Linux); GPU requests select gvisor-cpu. Set macos explicitly for a Mac sandbox. macOS is in beta; contact info@hyperbrowser.ai to enable it for your team.
firecracker, gvisor-cpu, macos Existing persistent Mac disk to boot. Requires runtimeClass macos. Use instead of imageName or snapshotName. The disk must be ready and detached; each disk can run in only one sandbox at a time.
Pin a specific image revision. Requires imageName.
Linux memory snapshot name to restore from. macOS uses diskId instead.
Pin a specific snapshot revision. Requires snapshotName.
Region to run the session in. The asia-south region is only available on Enterprise and Select plans. Get in touch at https://calendly.com/shri-hyperbrowser/demo.
us, us-central, us-west, us-east, asia-south, europe-west Enable recording. For macOS, captures an HLS desktop recording available in the dashboard Recording tab.
Ports to expose at launch.
Volume mounts, keyed by absolute mount path inside the sandbox. Shared volume mounts are not supported by macOS.
vCPU count for image launches or macOS disk launches. macOS requires at least 2 vCPUs; available sizes depend on your plan and host capacity.
1 <= x <= 32Memory in MiB for image launches or macOS disk launches. macOS requires at least 4096 MiB, in multiples of 1024 MiB.
512 <= x <= 262144Disk size in MiB (image launches only). For macOS, omit this field to use the source disk size; resizing is not supported.
2048 <= x <= 32768Maximum sandbox lifetime in minutes, measured from VM start.
x <= 1440Outbound internet access policy.
Outbound allow rules (IPv4 address, CIDR range, or domain). macOS supports IPv4 addresses and CIDRs only.
Outbound deny rules (IPv4 address or CIDR range). macOS supports IPv4 addresses and CIDRs only.
Secrets to set as environment variables for the image's startup command only, merged over vault's variables; they aren't added to the sandbox's default environment. Supported for image launches of images that have a startup command; otherwise you get 400 SECRET_STARTUP_UNSUPPORTED (to run your own command with secrets, use POST /api/sandbox/{id}/processes). Requires secrets to be enabled for your team; please contact support to enable them (otherwise 403 SECRETS_FEATURE_DISABLED), and, for restricted API keys, the secrets.use scope. If the startup command can't be started, the sandbox is stopped and you get the host's error with its own code, such as 422 SECRET_VALUE_INVALID or 501 SECRET_TOTP_UNSUPPORTED, with retryable true for 5xx statuses since a new sandbox may run on another host. You get 502 SECRET_STARTUP_FAILED instead (with causeCode when the host gave one) when the host couldn't be reached, the command may have started, or stopping the sandbox couldn't be confirmed, and 422 SECRET_STARTUP_COMMAND_FAILED with exitCode when the command exits with 126 or 127 right after starting. SECRET_STARTUP_FAILED and SECRET_STARTUP_COMMAND_FAILED include sandboxId when stopping the sandbox couldn't be confirmed, so you can stop it yourself.
Name of a vault whose variables to set for the image's startup command, before secrets. The same rules as secrets apply, and together with secrets and onePassword they set at most 32 variables.
^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$1Password fields to set as environment variables for the image's startup command, read from 1Password when it starts. The same rules as secrets apply. If 1Password can't provide a value, the sandbox is stopped and you get 422 SECRET_ONEPASSWORD_REFERENCE_FAILED or SECRET_ONEPASSWORD_AUTH_FAILED, 429 SECRET_ONEPASSWORD_RATE_LIMITED, or 502 or 503 SECRET_ONEPASSWORD_FAILED; all but the 422s are retryable.
Response
Sandbox created
Current sandbox lifecycle status. macOS can report stopping while disk changes are being saved and the VM is being released.
active, stopping, closed, close-error, error Region to run the session in. The asia-south region is only available on Enterprise and Select plans. Get in touch at https://calendly.com/shri-hyperbrowser/demo.
us, us-central, us-west, us-east, asia-south, europe-west Connection details for the sandbox runtime API (process execution, files, terminals).
Runtime selected for this sandbox.
firecracker, gvisor-cpu, macos Persistent disk ID, present for macOS sandboxes. Reuse it after the disk is ready and detached.
Present for macOS. True when the sandbox is active and its runtime is ready for commands. If false, fetch the sandbox again and check status before retrying.
Start timestamp in epoch milliseconds.
End timestamp in epoch milliseconds.
Effective outbound network policy for a sandbox.
Dashboard URL for this sandbox.
Total runtime in milliseconds (0 while running).
Sandbox runtime session token (24h TTL). Null when the sandbox is unavailable.
Each variable the startup command received. Present only when you passed secrets, vault or onePassword.