Sandbox API

Cost model

What you pay for sandboxes, what stays on when idle, and how that compares to Daytona, E2B, Modal and Freestyle.

Two bills get mixed up all the time. Keep them separate:

KindWhen you payExamples
VariableOnly while a sandbox (or worker) is runningTrial pods, burst Harbor workers, CodeEdit exec pods
Fixed / idleEven when nobody is submitting jobsGateway, APIs, Redis, cluster fee, warm pools

Managed hosts (Daytona, E2B, …) usually have little or no fixed bill and a higher per-hour rate. We are the opposite: cheaper per hour, higher base. That is why low volume favours them and high volume favours us — see Where the models cross over.

Planning numbers only (us-central1 list prices, July 2026), not an invoice. Discounts and Spot change them — see Levers.

For how requests move through the system, see Architecture.

Agentic runs: the big cost is usually the model

Harbor and Agent jobs spend GCP compute on workers and trial pods, but for typical LLM agents the provider invoice (tokens) is much larger. Track that per job as cost_usd / Langfuse — this page is mostly platform compute.

Variable: one sandbox-hour

Autopilot bills what the pod requests, not how busy the CPU is. Default trial shape: 1 vCPU, 2 GiB RAM, 10 GiB ephemeral disk.

ComponentRequestRateCost / hour
vCPU1$0.0445$0.04450
Memory2 GiB$0.0049225 / GiB$0.00985
Ephemeral storage10 GiB$0.0001389 / GiB$0.00139
Total~$0.056

Billed per second. A measured Harbor trial on dev (~36s with warm image cache) is about $0.00056 of compute — roughly 1,800 trials per $1 of platform compute (before model spend).

Same shape at other providers

ProviderPer hourAlways-on (730 hrs)
This platform (Autopilot on-demand)~$0.056~$41
Freestyle~$0.066~$48
E2B~$0.083~$60
Daytona~$0.083~$61
Modal~$0.119~$87

We win on the hourly rate. We lose on the monthly base until volume is high — next section.

Notes:

  • E2B production rates usually need their ~$150/mo Pro plan (fixed cost).
  • Daytona gives the first 5 GiB storage free.
  • Vercel Sandbox bills active CPU, not wall time — not in this table.

Vs Daytona we are about 33% cheaper per sandbox-hour, mostly because their memory rate is much higher.

Fixed: what you pay when the queue is quiet

Approximate idle control plane on dev (pod requests × list rates + cluster fee). Burst workers and claimable pool are called out separately.

ComponentRole~$/month
BuildKit poolBuild task images once, reuse~$48
Gateway (2)Public edge~$9
Harbor API (2)Benchmark API~$9
Agent API (2)Agent Runtime API~$9
Harbor worker floor (2)Always-on consumers; scales 2→8 on queue~$10–18
CodeEdit APISync code runs~$13
Redis + docsQuota / static docs~$4
Cluster management feeGKE~$73
Idle control plane (order of magnitude)~$188

BuildKit is a large idle slice. It exists so Dockerfiles become cached images instead of rebuilding every trial.

Two different “warm” costs (easy to confuse)

WhatWhat it holdsDev today~CostEffect
Node warm placeholdersEmpty capacity on a gVisor node2 replicas~$10 each / moAvoids ~25s node scale-up; does not skip pod create
Claimable CodeEdit pool (RFC 0002)Ready exec podsOn, depth 8, Spot~$100/mo Spot (RFC priced depth 5 at ~$64; on-demand would be ~3×)Claim in ~200ms instead of ~6s create

Agent/Harbor trial pods are not on Spot. Spot reclaim mid-agent wastes model money and can break an eval. Spot is for idle disposable CodeEdit pool pods only.

Harbor workers are pay-for-use: floor 2 when idle on dev (so one long job does not block prompt-turn traffic on the shared queue), up to 8 when the queue is busy. See Architecture.

Where the models cross over

You earn back our fixed base from the cheaper hourly rate:

vs.Save / sandbox-hourFixed to recoverBreak-even
E2B (vs their Pro delta)~$0.027~$18~670 hrs/mo
Modal~$0.063~$168~2,700 hrs/mo
Daytona~$0.028~$168~6,100 hrs/mo
Freestyle~$0.010~$168~16,200 hrs/mo
Sandbox-hours / monthThis platformDaytonaE2B (+ Pro)Modal
1,000~$224~$83~$233~$119
10,000~$725~$833~$978~$1,190
50,000~$2,955~$4,167~$4,290~$5,950

Plain English: at low volume, managed hosts are cheaper on compute alone. We win on scale, plus tenancy, VPC, and running trials in your boundary — not on the fixed bill being small.

Speed: cold create vs claim

Creating a new gVisor pod on the request path is still ~5–6s (median measured on cold CodeEdit). That sits inside Daytona’s published cold path (5–120s). Their <90ms number is a warm-pool claim, not a fresh create.

PathWhat happensTypical time
CodeEdit claim (pool hit)Reuse a ready pod~200ms (dev)
CodeEdit / trial createNew Pod + gVisor boot~5–6s
Full Harbor trialCreate + agent + verifier~36s (startup is a small slice)

Node warm placeholders only help scheduling; they do not turn 6s into 200ms. The claimable pool does that for CodeEdit — and it is on for dev/preprod. Long-lived sessions (RFC 0001) amortise create across many execs into one sandbox.

For Agent/Harbor, accept is already fast (202); most wall time is the model and verifier, not pod start.

For the full boundary—provider prompt cache, reusable sessions, and why pass@k answers stay fresh—see Caching and reuse.

Levers (biggest first)

  1. Right-size task.toml requests — you pay for the request, not CPU %.
  2. Committed-use discounts — large cut on vCPU (and the fixed base).
  3. Keep task images cached — miss rebuilds cost BuildKit time and latency.
  4. Node warm placeholders — turn down if you do not care about first-request after idle (~$10/replica/mo).
  5. Claimable CodeEdit pool — Spot depth is latency bought with idle money; shrink depth or disable if CodeEdit is unused.
  6. Spot on trials?No for Agent/Harbor. Yes for idle CodeEdit pool pods (already the default on dev).

Not on this page

  • LLM / provider spend (usually dominates agentic jobs) — Langfuse / cost_usd
  • Network egress to model APIs
  • GPUs (not offered)
  • gVisor tax (already inside the pod request you are billed for)