OptionalblockWhether to block all network access from the Sandbox.
OptionalcloudCloud provider to run the Sandbox on.
OptionalcloudMount points for CloudBucketMounts.
OptionalcommandSequence of program arguments for the main process. Default behavior is to sleep indefinitely until timeout or termination.
OptionalcpuReservation of physical CPU cores for the Sandbox, can be fractional.
OptionalcpuHard limit of physical CPU cores for the Sandbox, can be fractional.
OptionalcustomIf set, connections to this Sandbox will be subdomains of this domain rather than the default. This requires prior manual setup by Modal and is only available for Enterprise customers.
OptionalencryptedList of ports to tunnel into the Sandbox. Encrypted ports are tunneled with TLS.
OptionalenvEnvironment variables to set in the Sandbox.
OptionalexperimentalOptional experimental options.
OptionalgpuGPU reservation for the Sandbox (e.g. "A100", "T4:2", "A100-80GB:4").
Optionalh2List of encrypted ports to tunnel into the Sandbox, using HTTP/2.
OptionalidleThe amount of time in milliseconds that a Sandbox can be idle before being terminated.
OptionalinboundList of CIDRs allowed to connect inbound to the Sandbox (tunnels and connection tokens). If not set, all IPs are allowed. Cannot be used with blockNetwork.
OptionalincludeIf true, the sandbox will receive a MODAL_IDENTITY_TOKEN env var for OIDC-based auth (e.g. to AWS, GCP).
OptionalmemoryHard limit of memory in MiB.
OptionalmemoryReservation of memory in MiB.
OptionalnameOptional name for the Sandbox. Unique within an App.
OptionaloutboundList of CIDRs the Sandbox is allowed to access. If not set, all CIDRs are allowed. Cannot be used with blockNetwork.
OptionaloutboundList of domain names the Sandbox is allowed to access. Supports wildcard prefixes (*.example.com). Cannot be used with blockNetwork.
OptionalproxyReference to a Modal Proxy to use in front of this Sandbox.
OptionalptyEnable a PTY for the Sandbox entrypoint command. When enabled, all output (stdout and stderr from the process) is multiplexed into stdout, and the stderr stream is effectively empty.
OptionalreadinessProbe used to determine when the Sandbox has become ready.
OptionalregionsRegion(s) to run the Sandbox on.
OptionalsecretsSecrets to inject into the Sandbox as environment variables.
OptionaltagsTags to attach to the Sandbox. Filterable via client.sandboxes.list.
OptionaltimeoutMaximum lifetime of the Sandbox in milliseconds. Defaults to 5 minutes.
OptionalunencryptedList of ports to tunnel into the Sandbox without encryption.
OptionalverboseEnable verbose logging.
OptionalvolumesMount points for Modal Volumes.
OptionalworkdirWorking directory of the Sandbox.
Optional parameters for client.sandboxes.create().