Cloud quickstart¶
Private beta
Signups are invite-only. Request an invite. The SDKs are on PyPI and npm; you still need a dashboard API key to run anything. Source is on GitHub.
First Firecracker microVM from your laptop. About ten minutes if you already have an invite.
Guests ship python3, not python. sb.run("python -c '…'") exits 127.
1. Get an API key¶
- Sign in to the dashboard.
- API Keys → Create key.
- Scope full (read cannot create or exec). Copy
sk_live_…— shown once.
2. Install the SDK¶
3. Run it¶
Two ways. Same API.
Paste in a terminal¶
Sandbox() boots a real microVM (1 vCPU / 1 GB / 10 GB / base — fits the free quota), runs the command, prints stdout, destroys the VM. Compute billing stops at close().
Save a file, then run it¶
This is the form you want in a project. The with / finally block destroys the machine even if run() throws.
Save as hello.py:
4. More commands in the same sandbox¶
The VM stays up for the whole with / try block. Install once, run many times.
Always look at exit_code and stderr, not only stdout. A missing binary prints the error on stderr and a bare 127 — empty stdout with no message looks like the product returned nothing.
run() waits until the command finishes (default 120 s, max 24 hours). A build or a test suite: sb.run("npm test", timeout=3600) — long-running.
5. Without the SDK (cURL)¶
Create a machine in the dashboard, wait until it is running, then:
curl -sS -X POST "https://api.sistemo.io/v1/machines/$MACHINE_ID/execs" \
-H "Authorization: Bearer $SISTEMO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"exec_id":"hello-1","script":"uname -a","timeout_sec":120}'
# The command runs in the background. Its record says when it is done:
curl -sS "https://api.sistemo.io/v1/machines/$MACHINE_ID/execs/hello-1" \
-H "Authorization: Bearer $SISTEMO_API_KEY"
# → "state": "succeeded", "exit_code": 0
# Its output is a separate call, and `data` is base64:
curl -sS "https://api.sistemo.io/v1/machines/$MACHINE_ID/execs/hello-1/output?stream=stdout&offset=0" \
-H "Authorization: Bearer $SISTEMO_API_KEY" \
| python3 -c "import sys,json,base64; print(base64.b64decode(json.load(sys.stdin)['data']).decode(), end='')"
An exec_id is yours to choose and identifies one run: sending hello-1 again to the same machine answers 409. Use a new id per command.
See Exec.
What run() returns¶
| Field | Python | JS |
|---|---|---|
| Standard output | stdout | stdout |
| Standard error | stderr | stderr |
| Exit code | exit_code | exitCode |
| Success? | ok (exit_code == 0) | — |
Under the hood¶
| Step | Endpoint |
|---|---|
| Create | POST /v1/machines |
| Run | sb.run(...) → POST /v1/machines/{id}/execs (start + wait) |
| Destroy | DELETE /v1/machines/{id} |
Default shape is 1 vCPU / 1024 MB / 10 GB / base. Raising a default without raising the free quota 403s every first-time Sandbox().
Next¶
- Examples (Python) · Examples (JS)
- Images —
base·python·node·ai·debian13·ubuntu26.04 - Usage & billing · Cookbook