#SANDBOXES

A Linux machine.By API, by the second.

An isolated Ubuntu machine you start, use and stop. Run code an agent wrote, build a project, preview a web app or drive a browser.

#WHAT YOU GET

Three sizes

2 vCPU and 4 GB, 4 vCPU and 8 GB, or 8 vCPU and 16 GB. The machine is private to the sandbox: it cannot see your Zavu account or your other sandboxes.

Commands and files

Run a shell command and get its exit code and output back, or start it in the background. Read and write files up to 5 MiB.

Ports, SSH and a desktop

Give a port an HTTPS URL, connect over SSH with your own key, or open the machine's screen or its browser in a tab.

Copies and snapshots

Copy a sandbox with its disk, or save the disk under a name and start new sandboxes from it. A snapshot can be shared with another team.

Saved environments

Named sets of environment variables, stored encrypted, to start a sandbox with by name.

It stops by itself

After a timeout you set, one hour by default. A stopped sandbox keeps its disk for 14 days and can be resumed.

#START, RUN, STOP

import Zavudev from "@zavudev/sdk"

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY })

const { sandbox } = await zavu.sandboxes.create({
  size: "default",
  timeoutSeconds: 1800,
})

// No need to wait for "running": calls made while it starts wait for it.
await zavu.sandboxes.files.write(sandbox.id, {
  path: "main.py",
  content: "print(2 + 2)\n",
})

const { result } = await zavu.sandboxes.commands.run(sandbox.id, {
  command: "python3 main.py",
})
console.log(result?.exitCode, result?.stdout) // 0 "4\n"

// Billing ends here. The disk is kept 14 days.
await zavu.sandboxes.stop(sandbox.id)

#WHAT IT COSTS

  1. 01

    Per second, while it runs

    $0.0225, $0.045 or $0.09 an hour by size, with a one-minute minimum per run, plus $0.01 each time one is created, resumed or copied.

  2. 02

    Nothing while stopped

    Billing ends when you call stop. The disk stays for 14 days at no charge.

  3. 03

    $0.07 a day per snapshot

    A saved snapshot is charged per started day while you keep it. A team keeps up to 20.

#BEFORE YOU BUILD ON IT

  • Sandboxes need a paid plan. On Free, creating or resuming one is refused with 402 paid_plan_required.
  • They need a live API key. A test-mode key can read, stop and delete sandboxes, but cannot start one or run commands.
  • A team runs up to 10 sandboxes at once and starts up to 200 a day. Creates, resumes and copies each count as a start.
  • Usage is billed from your prepaid balance. A running sandbox is stopped when the balance or your monthly spend cap no longer covers 15 more minutes of it.
  • A foreground command waits up to 120 seconds. Run anything longer in the background and poll it.
  • An ephemeral sandbox never saves its disk: stopping it erases everything, and it cannot be resumed or copied.

Start one for about a cent.

The quickstart creates a machine, runs a file on it and stops it.

Sandboxes: Linux machines by API | Zavu | Zavu