Per-second pricing for agent code
An agent that runs generated code starts a sandbox, runs a few commands, reads the output and carries on, often in under a minute. At that length the billing unit decides the cost, because hourly rounding would charge a full hour for every task. Sandboxes built for agents are nearly all priced per second on vCPU and memory, so what is left to compare is startup, idle time and session limits. rent.dev's own sandboxes are priced per second from one prepaid balance, on the memory they hold plus the CPU they use.
rent.dev: one API for the sandboxes and GPU pods an agent needs.
What a task costs, by its length
| Sandbox | Billed by | Agent loop, 30 min | Interactive, 30 min | Workspace, 4 h | Rate read |
|---|---|---|---|---|---|
| rent.dev | rent.dev | $0.0452 | $0.0828 | $0.4640 | |
| Northflank cloud | Northflank | $0.0346 | $0.0346 | $0.2765 | 2026-11-11 |
| Cloudflare containers | Cloudflare | $0.0452 | $0.0740 | $0.4193 | 2026-11-11 |
| Fly.io sprites | Fly.io | $0.0508 | $0.0662 | $0.4374 | 2026-11-11 |
| Vercel sandbox | Vercel | $0.0552 | $0.1064 | $0.5440 | 2026-11-11 |
| Modal sandbox | Modal | $0.0569 | $0.0835 | $0.4977 | 2026-11-11 |
| Daytona sandbox | Daytona | $0.0828 | $0.0828 | $0.6624 | 2026-11-11 |
| E2B sandbox | E2B | $0.0828 | $0.0828 | $0.6624 | 2026-11-11 |
Questions
- Which sandboxes bill per second?
- Most sandbox platforms built for code execution meter per second on vCPU and memory, and some add a fee per sandbox or a plan fee. Some container platforms bill per minute, or bill a whole instance whether or not the sandbox inside it is busy. rent.dev's own sandboxes are metered per second, and a sandbox started on another vendor's key is billed by that vendor on its own terms.
- How does per-second pricing work for agent code execution?
- Each sandbox is metered from create to stop. A task costs its length times the per-second rate for its CPU and memory, plus any fee per creation, so an agent that ends each sandbox as soon as its task finishes, rather than waiting for the timeout, pays only for the seconds it used. On rent.dev, a hold for the most a sandbox could cost is taken from the balance at start, and the unused part returns when it stops. On rent.dev's price board, generated 2026-11-14, rent.dev's own sandboxes price a 30 min agent loop task at $0.0452, a 30 min interactive task at $0.0828 and a 4 h workspace task at $0.4640, each on 2 vCPU and 4 GiB.
- How does startup time affect sandbox and GPU costs?
- Seconds spent booting are usually billed, and they repeat on every start. For sandboxes, a prebuilt template keeps startup short, while installing packages at the start of each task adds both time and cost. For GPUs the effect is larger: pulling a multi-gigabyte image and loading model weights can take minutes at GPU rates, so keep images lean, cache weights on a volume, and reuse one running pod for a batch of jobs.
- What timeout should a sandbox for agent code have?
- Long enough for the task and no longer, since the timeout is what stops a sandbox nobody closed. A few minutes suits a single tool call; an agent that edits and tests a project needs longer. rent.dev sandboxes default to five minutes, take a longer timeout at create, and can be extended while they run.