Overview

Allternit Cloud Sandboxes run untrusted code in isolated virtual machines instead of the host process. Organization admins define sandbox templates that describe the runtime, source code, environment, and resource limits. A template can then be launched as a sandbox instance. A separate lower-level /sandbox/* execution API is also available for ad-hoc code execution.

Base URLs

Templates and instances are managed under the organization-scoped admin prefix:
The ad-hoc execution API is mounted at:
Local development:

Sandbox templates

Sandbox templates are scoped to an organization and can only be managed by organization owners or admins.

Endpoints

Template schema

Create a template

Response (HTTP 201):

List templates

Response:

Sandbox instances

Launching an instance runs the template source inside the sandbox runtime and records the result.

Endpoints

Launch an instance

Response (HTTP 201):

Instance schema

Stop an instance

Response:

Sandbox execution API

For ad-hoc execution, the /sandbox/* routes run code directly without creating a template or instance.

Endpoints

Execute code

Response:

Streaming execution

The stream emits one SSE event per output line and ends with a done event:

Error codes