English
Get started

Agent Sandboxes Billed by the second

Billed by the second, and nothing for starting

Four meters, each counted by the second, and no fee for making a sandbox. A SMALL sandbox costs $0.018 an hour while it runs and $0.0054 while it is paused.

The four meters of per-second billing

  • Running: its size’s hourly price, by the second. Each run is rounded up to a whole second and counts 10 seconds at least, unless the server ended it: out of memory or disk, a restart of its machine, an unpaid workspace, a new size.
  • Paused: 30% of that price, by the whole second, with no minimum.
  • Stopped: $0.03 per GiB a month of what its disk holds of its own in object storage, never empty space and never the template’s files.
  • Volumes: $0.20 per GiB a month of their whole size.

Templates are not billed: your plan bounds how much they hold. The disk of a running or paused sandbox is part of its size’s price, never billed apart. A second counts at one size only, and pausing and waking never turns running time into cheaper time, nor counts a second twice.

SizevCPUs · memory · diskRunning, an hourPaused, an hour
SMALL2 · 4 GiB · 10 GiB$0.018$0.0054
DEFAULT4 · 8 GiB · 20 GiB$0.036$0.0108
LARGE8 · 16 GiB · 40 GiB$0.072$0.0216
XLARGE16 · 32 GiB · 80 GiB$0.144$0.0432

A SMALL sandbox running costs $0.000005 a second, and the shortest charge there is, a run of 10 seconds, costs $0.00005.

How the seconds are counted

The sandbox’s own server counts its seconds, as each change happens, from the moment its VM’s vCPUs are let run; the panel prices them to a billionth of a dollar, every minute for running and paused sandboxes and every hour for stored disks and volumes. get_sandbox shows a sandbox’s seconds and what it cost so far, in usage, and list_usage gives a row per UTC day, meter and size.

from pethost.sandboxes import Sandboxes, SandboxSettings, Size

sandboxes = Sandboxes()  # reads PETHOST_TOKEN
sandbox = sandboxes.create_sandbox("base", settings=SandboxSettings(size=Size.SMALL))
sandboxes.run_command(sandbox.sandbox_id, command="python3 -c 'print(6 * 7)'")
sandboxes.stop_sandbox(sandbox.sandbox_id)  # its run ends here: 10 seconds at least

usage = sandboxes.get_sandbox(sandbox.sandbox_id).usage
print(usage.running_seconds, usage.paused_seconds, usage.cost_micros)  # cost in millionths

# The workspace's last 30 days: a row per UTC day, meter and size.
for row in sandboxes.list_usage().rows:
    print(row.day, row.meter.name, row.size.name, round(row.unit_hours, 3), row.cost_micros)
pethost sandbox new --name demo --size small
pethost sandbox run demo -- python3 -c 'print(6 * 7)'
pethost sandbox stop demo   # its run ends here: 10 seconds at least
pethost sandbox show demo   # its state, size and usage
pethost sandbox workspace   # the plan's limits and what is used

Starts are free

Creating a sandbox, forking one (each copy) and starting a stopped one cost nothing. Your plan bounds how many come in any minute, hour and day: 36, 360 and 1,200 on the $20 plan, up to 270, 3,600 and 14,400 on the $2,000 plan. A start past a bound is refused (RESOURCE_EXHAUSTED with LimitReached), saying which window is full and when the call fits again. Waking a paused sandbox is never a start.

Plans and the balance

A plan’s monthly price is usage it includes: $20, $100, $500 or $2,000 a month, plus VAT. The $20 plan’s usage is 1,111 hours of a SMALL sandbox running, or 3,704 paused. Past it your balance pays, topped up with $10 to $1,000 at a time, which never expires. With both spent, running and paused sandboxes are stopped and nothing new starts, but nothing is deleted, and stored disks and volumes go on counting; a payment lifts it within seconds. It all begins with a trial: 7 days with $1 of usage and 4 vCPUs, sizes up to DEFAULT, a card required.

Two months, worked

An agent with one SMALL sandbox, working 2 hours a day and paused for the other 22: 60 hours running at $0.018 and 660 paused at $0.0054 make $4.64 of usage in a 30-day month, so the $20 plan covers about four such agents.

An eval fleet of 1,000 SMALL sandboxes a day, 60 seconds each: 500 sandbox-hours, $9.00 of usage a month, with no start fees, inside the $20 plan, whose 20 vCPUs run 10 SMALL sandboxes at once. The billing docs work through more cases.

How it compares

For 2 vCPU and 4 GiB, as their pages read on 21 November 2026: E2B bills $0.1656 an hour, by the second. boat.dev bills $0.018, as we do, and $0.03 to $0.07 a start past the starts its plan includes. Vercel Sandbox bills memory in 1-minute minimum increments and CPU only while it is busy, and Modal bills the larger of what a sandbox requested and what it used.

Read the docs

Questions

Is there a minimum charge with per-second billing?

10 seconds per run: $0.00005 for a SMALL sandbox. Paused seconds, stored disks and volumes have no minimum.

What do starts cost?

Nothing, within your plan’s starts per minute, hour and day.

Is the disk billed?

Running or paused, the disk is part of the size’s price. Stopped, only the bytes of its own in object storage count, at $0.03 per GiB a month.

What happens when the included usage runs out?

Your balance pays. With no balance left, running and paused sandboxes are stopped and none starts until a payment comes; nothing is deleted.

Related

Give your agent a computer in 0.15 s

Start the free trial