Which is better, Vercel Sandbox or Fly Machines?
It depends on whether you want a sandbox service or VMs you manage. For agents that mostly wait on a model, Runtime is a sandbox API whose pause and forks keep memory. The job below costs $0.64 there, against $1.53 on a Fly Machine and $2.12 on Vercel. Pick Vercel Sandbox if the app lives on Vercel, with up to 10,000 sandboxes running in parallel on Pro. Pick Fly Machines for general VMs of up to 128 GB, with volumes and Managed Postgres beside them.
At a glance
Both rivals are priced in Ashburn: Vercel's default iad1 region and Fly's
iad.
| Vercel Sandbox | Fly Machines | Runtime | |
|---|---|---|---|
| Isolation | Firecracker microVM, own kernel | Firecracker microVM | Firecracker microVM, own kernel |
| What it is | A sandbox API for untrusted code | General-purpose VMs, run through the Machines API and flyctl |
A sandbox API for agent code |
| CPU | $0.128 per active CPU-hour | By size while started: performance-2x with 4 GB, $0.0916704 an hour |
$0.025 per vCPU-hour of measured CPU, with a small floor |
| Memory | $0.0212 per provisioned GB-hour | Included in the size; more at $6 per GB a month | $0.0075 per reserved GiB-hour |
| Largest size | 8 vCPUs and 16 GB on Pro; 32 and 64 GB on Enterprise | 16 performance vCPUs and 128 GB | Up to 16 vCPUs and 64 GiB paid, chosen apart |
| Plan fee | Hobby allowance free; usage beyond it needs Pro | None; pay as you go | None; prepaid credit from $10 |
| When idle | Stop keeps the filesystem; processes start again | Root disk is temporary; volumes keep files, suspend keeps memory | Pause keeps files, memory and processes while you have credit |
| Regions | 19 | 17 | One US region |
Is a Fly Machine cheaper than Vercel Sandbox?
At this size, yes, for almost any job. A performance-2x Machine costs
$0.0916704 an hour however busy it is. Vercel's memory alone, 4 GB at $0.0212 a
GB-hour, is $0.0848 an hour. By the time a Vercel sandbox has paid for its
memory, it has nearly paid for the whole Machine. Vercel costs more as soon as a
one-minute run uses about 3 CPU-seconds. With both CPUs busy, it costs almost four times as much.
A Machine's performance vCPUs are whole cores kept for it. A shared-cpu-2x
Machine with 4 GB costs about $0.59 for the same 1,000 runs. Its shared
vCPUs are guaranteed 6.25% of a core each, with a small burst allowance, so a
new one would not fit 20 CPU-seconds into the minute.
What the Machine does not give you is a sandbox API. You create and destroy
Machines yourself through the Machines API. You also add a volume if files must
outlive the Machine's temporary root disk. Runtime and Vercel create a sandbox
in one call. Runtime's default CPU is shared and billed as measured.
cpu: "reserved" keeps every vCPU for the sandbox, as a performance Machine
does.
TypeScriptimport { Runtime } from "withruntime";const runtime = new Runtime();const box = await runtime.sandboxes.create({ vcpu: 2, memoryMiB: 4096, timeoutSeconds: 120, onLeaseEnd: "stop", // gone when the job ends, like a destroyed Machine});try { await box.files.write("/workspace/invoice.py", "print(sum([125, 250, 375]))\n"); console.log((await box.exec(["python3", "/workspace/invoice.py"], { check: true })).stdout);} finally { await box.stop();}Cost for the same job
The job behind the headline: 1,000 runs, 60 seconds each, 20 CPU-seconds of
work, on 2 vCPU with 4 GiB (4 GB on Vercel), against a performance-2x
Machine with 4 GB.
- CPU
- 1,000 × 20 s / 3,600 × $0.128
- $0.71
- Memory
- 1,000 × 60 s / 3,600 × 4 × $0.0212
- $1.41
- Size
- 1,000 × 60 s / 3,600 × $0.0916704
- $1.53
- CPU
- 1,000 × 20 s / 3,600 × $0.025
- $0.14
- Memory
- 1,000 × 60 s / 3,600 × 4 × $0.0075
- $0.50
For a month of 100,000 runs, the totals are $212.44 on Vercel, $152.78 on Machines and $63.89 on Runtime. With both CPUs busy for the whole minute, it is $1.33 on Runtime, $5.68 on Vercel and $1.53 on Machines. The Machine is priced as destroyed at the end of each run. Plan fees, creation charges, storage, network and free allowances do not appear in the totals.
Which one to pick
- Vercel Sandbox, when the application already lives on Vercel and the sandboxes should share its account. Pro allows up to 10,000 running at the same time.
- Fly Machines, when you want general-purpose VMs and are happy to manage them, need sizes up to 128 GB, or want volumes and Managed Postgres next to them.
- Runtime, when you want a sandbox API rather than raw VMs. It is priced 58% under a Machine and 70% under Vercel, with pause and forks that carry memory and running processes.
Moving to Runtime
Vercel Sandbox code keeps its shape with a new import, and no longer needs a Vercel project or token:
TypeScriptimport { Sandbox } from "withruntime/vercel"; // was: from "@vercel/sandbox"Pythonfrom withruntime.vercel import sandbox # was: from vercel import sandboxOn Fly, the usual pattern is one Machine created per job through the Machines API. Swap each of those for a Runtime sandbox created for the job and stopped at the end, as the sample above does. Commands, files and teardown follow map the calls.
Credit you add within 30 days of signing up is matched, up to $1,000 in total. A coding agent can run the whole port from the single instruction in migration, on a branch and on the free usage. Detail: Runtime vs Vercel Sandbox, Runtime vs Fly.io.
Runtime Cloud
A Fly Machine undercuts Vercel on this job, and Runtime undercuts both: by 58% against the Machine and 70% against Vercel. 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox cost $2.12 on Vercel, $1.53 on a Fly Machine and $0.64 on Runtime. Runtime meters CPU as Vercel does. Its CPU rate is 80% below Vercel's, and its memory rate 65% below. Rates checked 25 October 2026.
To start, npx withruntime login opens the free usage. Code on Vercel Sandbox
or the Machines API moves with the migration guide.
Sources
Fly.io prices checked 25 October 2026.
Vercel Sandbox pricing rechecked 25 October 2026; the rest checked 25 October 2026.
- Vercel Sandbox pricing, Understanding Vercel Sandboxes
- Fly.io pricing, Machine CPU performance, Machine suspend and resume, Fly Volumes, Fly.io regions
- Runtime pricing
Facts on this page were checked on 26 October 2026.