Skip to content

PlatinumMicro-VM sandboxes for untrusted code, on machines you run

Each sandbox is its own Cloud Hypervisor VM on stock KVM. The isolation boundary is the hypervisor, not a container.

Install ​

bash
# on the control plane
curl -fsSL https://raw.githubusercontent.com/kortix-ai/platinum-sandbox/main/install.sh \
  | bash -s -- --domain api.example.com --email you@example.com

# on the sandbox host: the line the installer prints, plus this host's IP
curl -fsSL -H 'Authorization: Bearer htok_...' https://api.example.com/install.sh \
  | sudo bash -s -- htok_... https://api.example.com default default-1 10.0.0.6

Replace api.example.com with your own domain and point its DNS at the control plane first. The quick start walks through both machines and your first API key.

Create a sandbox ​

Both SDKs read PT_API_URL and PT_TOKEN.

ts
import { Platinum } from '@platinum-dev/sdk';

const sbx = await new Platinum().sandboxes.create({}, { waitForRunning: true });
console.log((await sbx.exec(['uname', '-r'])).stdout);  // the guest's own kernel
await sbx.delete();
python
from platinum import Platinum

sbx = Platinum().sandboxes.create(wait_for_running=True)
print(sbx.exec(["uname", "-r"]).stdout)  # the guest's own kernel
sbx.delete()

Quick start · Guides · Deployment