Create a sandbox
POST /v1/sandbox/
Create a new sandbox from a template. The sandbox will start booting immediately. A maximum of 3 sandboxes per organization is enforced.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
Name of the template to create the sandbox from.
Example
my-templateEnvironment variables to set in the sandbox.
object
Number of virtual CPUs.
Example
2Memory in MiB. Must be an even number.
Example
1024Sandbox timeout in minutes. Defaults to 5 if not provided.
Example
10Automatically pause the sandbox into a snapshot when it reaches its timeout.
Network egress policy for a sandbox. When omitted, defaults to allow-all.
object
Policy mode. allow-all permits all egress, deny-all blocks all egress, custom uses the allow/deny lists.
Domain names to allow outbound access to (custom mode only).
CIDR ranges to allow outbound access to (custom mode only).
Per-domain request transforms, such as credential brokering.
A per-domain request transform rule for credential brokering or header manipulation.
object
Domain pattern to match (e.g. api.openai.com).
Headers to inject into matching requests.
object
Header names to strip from matching requests.
Responses
Section titled “ Responses ”Sandbox created successfully.
object
Unique sandbox identifier.
Example
sbx-abc123Template the sandbox was created from.
Number of virtual CPUs assigned to the sandbox.
Memory assigned to the sandbox, in MiB.
Writable disk size assigned to the sandbox, in MiB.
Current state of the sandbox.
Whether the sandbox is configured to auto-pause on timeout.
Network egress policy for a sandbox. When omitted, defaults to allow-all.
object
Policy mode. allow-all permits all egress, deny-all blocks all egress, custom uses the allow/deny lists.
Domain names to allow outbound access to (custom mode only).
CIDR ranges to allow outbound access to (custom mode only).
Per-domain request transforms, such as credential brokering.
A per-domain request transform rule for credential brokering or header manipulation.
object
Domain pattern to match (e.g. api.openai.com).
Headers to inject into matching requests.
object
Header names to strip from matching requests.
ISO 8601 timestamp of when the sandbox was created.
Validation error.
object
Summary message, e.g. “Invalid request”.
object
JSON field name that failed validation (e.g. “path”, “command”).
Human-readable description of the validation failure.
Unauthorized – invalid or missing API key.
object
Human-readable error message.
Conflict – sandbox limit reached.
object
Human-readable error message.