Sign in

Moving from Runloop

Updated

Use Prized sandboxes as a Runloop alternative: the Prized command for each Runloop devbox call, a short ported script, and what is not on Prized yet.

On this page5

Runloop is winding down, with support for existing customers through November 13, 2026 (Runloop's notice). To compare Prized with Tensorlake, Modal, Freestyle and the others first: Runloop alternatives.

1. Export an API key

A Runloop devbox becomes a Prized sandbox: a microVM that boots from a template, pauses with its processes running, and forks into live copies. Make a key with Sandboxes: Write on the API keys page, then export it:

export PRIZED_API_KEY=dcp_…

2. Swap each call

RunloopPrized
runloop.devbox.create()prized sandbox create --vcpu 2 --memory 4 --max-runtime 1h
devbox.cmd.exec(command)prized sandbox exec ID -- CMD
devbox.file.write(), file.read()prized sandbox cp ./app.py ID:app.py, and the reverse
devbox.suspend(), devbox.resume()prized sandbox pause ID --wait, prized sandbox resume ID
devbox.snapshot_disk(), then create_devbox()prized sandbox fork ID --count 3, live copies of a running or paused sandbox
devbox.shutdown()prized sandbox rm ID
devbox.get_tunnel_url(port)prized sandbox port ID PORT, an https URL for the port that takes your API key in the Prized-Key header (Preview a port)

Each command has an HTTP route that takes the same key (Sandbox API).

3. Port a script

The same steps in Python with requests:

prized_job.py
import os, time, requests

API = "https://api.prized.dev/api/v1"
s = requests.Session()
s.headers["Authorization"] = f"Bearer {os.environ['PRIZED_API_KEY']}"

def run(box, command):
    return s.post(f"{box['toolboxBase']}/process/execute", json={"command": command}, timeout=600)

def ready(sandbox_id):  # running, when it takes commands
    while (box := s.get(f"{API}/sandboxes/{sandbox_id}").json()["sandbox"])["state"] == "starting":
        time.sleep(1)
    return box

def delete(sandbox_id):  # a sandbox runs, and bills, until it is deleted
    for wait in (1, 2, 4, None):
        try:
            if s.delete(f"{API}/sandboxes/{sandbox_id}", timeout=30).status_code in (202, 404):  # 404: already gone
                return
        except requests.RequestException:
            pass
        if wait:
            time.sleep(wait)  # deleting twice is safe
    print(f"not deleted: {sandbox_id}")

box = ready(s.post(f"{API}/sandboxes", json={"template": "prized-base-v1", "resources": {"vcpu": 2, "memoryMb": 4096}, "maxRuntimeMin": 60}).json()["sandbox"]["id"])
ids = [box["id"]]
try:
    print(run(box, "python3 --version").json()["stdout"])
    s.post(f"{API}/sandboxes/{box['id']}/pause", params={"wait": "paused"})
    s.post(f"{API}/sandboxes/{box['id']}/resume", params={"wait": "running"})
    ids += [copy["id"] for copy in s.post(f"{API}/sandboxes/{box['id']}/fork", json={"count": 2}).json()["sandboxes"]]
finally:
    for sandbox_id in reversed(ids):  # copies first: a copy still starting fails without its parent
        delete(sandbox_id)

A failed command still answers 200, so read exitCode. Check what each delete answers too: retry a 5xx, since a sandbox left behind runs until its max run time. A fork answers 409 fork_capacity when the parent's machine is full; start a new sandbox and fork that (Fork).

Not on Prized yet

  • Custom images and root. Sandboxes start from three fixed templates without sudo. For a Dockerfile blueprint, create the sandbox from prized-docker-v1 (once the workspace has paid in) and build and run your image with Docker there (Run Docker and Compose in a sandbox), or set up one sandbox and fork it for each run; apt on the sandbox itself needs a box.
  • Long lives and saved snapshots. A sandbox runs up to 7 days at a time once the workspace has paid in (a resume restarts the clock, and you can extend it anytime); on the free tier it gets 60 minutes of running in all, then it is deleted. A fork copies a running or paused sandbox, not a saved snapshot.
  • Named shells, network policies, Agent Gateways, and Axons. For a shell, prized sandbox ssh ID opens one with your prized login, and a program opens one with any SSH client through SSH access, local port forwards (ssh -L) included.

Getting help moving

Email with what you run on Runloop, and we will help you map it.