Create a sandbox
Provision a new isolated execution environment
POST
Provision a new isolated execution environment with configurable resource limits and security controls.
Path parameters
namespace
type: string
requiredThe namespace (user or organization) to create the sandbox in.
Body parameters
language
type: string
requiredRuntime language for the sandbox (e.g., python, node, rust, go).
image
type: string
Container image override. If omitted, Outpost uses a default image for the specified language.
mode
type: string
Execution mode. ephemeral resets to a clean state after each exec. stateful preserves filesystem and installed packages between executions.
default: ephemeral
resource_limits
type: object
Resource caps for the sandbox.
resource_limits.memory_mb
type: integer
Memory limit in megabytes.
resource_limits.cpu_cores
type: number
CPU core limit.
resource_limits.timeout_ms
type: integer
Maximum execution time in milliseconds.
resource_limits.disk_mb
type: integer
Disk limit in megabytes.
resource_limits.gpu
type: string
GPU allocation (e.g., T4:1).
env
type: array
Environment variables as [KEY, VALUE] pairs. For example, [["PYTHONPATH", "/app"]].
working_dir
type: string
Working directory inside the sandbox.
disk_size_gb
type: integer
Persistent disk size in GB.
ports
type: object[]
Port mappings to expose from the sandbox.
ports[].guest_port
type: integer
Port inside the sandbox.
ports[].host_port
type: integer
Port on the host. Auto-assigned if omitted.
ports[].protocol
type: string
tcp or udp.
default: tcp
security
type: object
Security configuration for the sandbox.
security.seccomp_enabled
type: boolean
Enable seccomp syscall filtering.
security.jailer_enabled
type: boolean
Enable Firecracker microVM isolation. Recommended for untrusted or AI-generated code.
security.user
type: string
Run the sandbox process as this user.
security.preset
type: string
Named security preset.
health_check
type: object
Health check configuration.
health_check.interval_secs
type: integer
Interval between health checks in seconds.
health_check.timeout_secs
type: integer
Health check timeout in seconds.
health_check.retries
type: integer
Number of retries before marking unhealthy.
Previous → Delete a fleet
Next List sandboxes →