Skip to main content
You need a Plus, Pro, or Enterprise plan and at least $0.25 in your wallet.

Create an API key

In account settings, create an API key with the scope sandbox (or all) and the permission read_write. Store it as PXXL_API_KEY.
A read key can list and inspect sandboxes but can’t create, run commands, or change anything.

Create a sandbox and run a command

Serve a preview

Anything listening on $PORT (3000) inside the sandbox is served at the sandbox’s previewUrl. Start your server in the background so exec returns:

Copy files in and out

Files up to 2 MB, text or binary:
In code, sandbox.files.write(path, bytes) and sandbox.files.read(path, { binary: true }) (Python: binary=True) do the same.

Save a snapshot

Installed something you’ll want again? Snapshot the sandbox and start the next one from it. The home directory and /workspace come back; running processes don’t.
See snapshots.

Clean up

A sandbox pauses itself after autoStopMinutes of inactivity (60 by default), and a paused sandbox costs nothing. Delete it when you no longer need /workspace:
See pricing and limits.