Skip to content
Runtime

Vercel Sandbox vs CodeSandbox SDK pricing, sizes and limits

Runtime Cloud (withruntime.com) runs the job for 70% less than either. CodeSandbox bills a fixed VM by the minute.

Estimated compute cost2 vCPUs · 4 GiB · 60 s a run · 20 CPU-seconds busy

70% less than Vercel Sandbox74% less than CodeSandbox

1,000

Compute only, at list rates checked 25 October 2026 (Vercel Sandbox pricing, Together: CodeSandbox SDK). Plan fees, network, taxes and free credits are left out. The worked example below shows the arithmetic.

Which is better, Vercel Sandbox or CodeSandbox?

It depends on run length and machine size. For agents that mostly wait, Runtime bills measured CPU by the second, for a sandbox of any shape. The job below costs $0.64, against $2.48 on CodeSandbox and $2.12 on Vercel. Pick Vercel Sandbox if your app is on Vercel, or if you need thousands of sandboxes running in parallel. Pick CodeSandbox for very large machines, up to 64 cores and 128 GB.

At a glance

Vercel's figures are at the rates of its default iad1 region. CodeSandbox's come from Together's documentation of the CodeSandbox SDK, which Together now lists as deprecated in favor of its together-sandbox SDK. CodeSandbox is a Together company.

Vercel Sandbox CodeSandbox SDK Runtime
Isolation Firecracker microVM, own kernel Firecracker microVM Firecracker microVM, own kernel
CPU $0.128 per active CPU-hour By VM size: Nano (2 cores, 4 GB) is $0.1486 an hour $0.025 per vCPU-hour of measured CPU, with a small floor
Memory $0.0212 per provisioned GB-hour; 2 GB per vCPU Inside the VM size $0.0075 per reserved GiB-hour
Billing step Memory in 1-minute minimum increments Each VM's runtime rounded up to the minute By the second
Largest machine 8 vCPUs and 16 GB on Pro; 32 and 64 GB on Enterprise 64 cores and 128 GB Up to 16 vCPUs and 64 GiB paid, chosen apart
Plan fee Hobby allowance free; usage beyond it needs Pro Build free with 10 VMs running at the same time; Scale $170 a month None; prepaid credit from $10
At once 10 on Hobby, 10,000 on Pro 10 on Build, 250 on Scale 4 without credit; 100 paid; more on request
Snapshots, forks The filesystem; processes start again Memory snapshot and restore Files, memory and running processes

Which one bills less for short runs?

Neither rival bills a run of a few seconds by the second. CodeSandbox rounds each VM's runtime up to the next minute, so a 10-second run is billed as 60. Vercel bills active CPU as used, but provisioned memory in 1-minute minimum increments. A 10-second run still pays a minute of memory: $0.00141 for 4 GB.

Runtime bills both CPU and memory by the second. A 10-second run of a 2 vCPU, 4 GiB sandbox that keeps one CPU busy throughout costs about $0.00007 in CPU and $0.00008 in memory.

For whole-minute runs, the comparison turns on how busy the code is. CodeSandbox's Nano costs the same whether its cores are busy or idle. Vercel's bill grows with CPU use, and it passes CodeSandbox's at about 30 CPU-seconds per one-minute run of a 2 vCPU sandbox. With both CPUs busy the whole minute, Vercel costs more than twice as much.

Which scales further?

CodeSandbox's VMs go up to 64 cores and 128 GB, far above Vercel's 8 vCPUs and 16 GB on Pro. Vercel runs more at the same time: 10,000 on Pro, against 250 on CodeSandbox's $170-a-month Scale plan and 10 on its free Build plan. A paid Runtime account runs 100 sandboxes at the same time with no plan fee, and the limit is raised on request.

Every Runtime sandbox gets the shape you ask for, and files move in and out with one call each:

TypeScriptimport { Sandbox } from "withruntime";await using sbx = await Sandbox.create();await sbx.files.write("/workspace/main.py", "print(sum(range(10)))\n");const run = await sbx.exec("python3 /workspace/main.py", { check: true });console.log(run.stdout); // 45

Cost for the same job

1,000 runs of a 2 vCPU sandbox with 4 GiB, 4 GB on Vercel, and a CodeSandbox Nano VM, 10 credits an hour at $0.01486 a credit. Each run lasts 60 seconds and keeps the CPU busy for 20 CPU-seconds: an agent that mostly waits for a model.

Vercel$2.12
CPU
1,000 × 20 s / 3,600 × $0.128
$0.71
Memory
1,000 × 60 s / 3,600 × 4 × $0.0212
$1.41
CodeSandbox$2.48
Size
1,000 × 60 s / 3,600 × $0.1486
$2.48
Runtime$0.64
CPU
1,000 × 20 s / 3,600 × $0.025
$0.14
Memory
1,000 × 60 s / 3,600 × 4 × $0.0075
$0.50

At 100,000 runs a month, the cost is $212.44 on Vercel, $247.67 on CodeSandbox and $63.89 on Runtime. With both CPUs busy for the whole minute, it is $1.33 on Runtime, against $5.68 on Vercel and $2.48 on CodeSandbox. Runtime is cheaper however busy the sandbox is. Each run here is a whole minute, so neither rival's rounding adds anything. Plan fees, creations, storage, network and free allowances are left out.

Which one to pick

  • Pick Vercel Sandbox if your app is on Vercel, or you need thousands of sandboxes running in parallel in a region you choose.
  • Pick CodeSandbox for very large machines, up to 64 cores and 128 GB.
  • Pick Runtime for per-second billing of measured CPU, any shape, 100 sandboxes running at the same time with no plan fee, and forks that keep memory and running processes.

Switch from either one

From Vercel Sandbox, change one import. There is no Vercel project or token to carry over:

TypeScriptimport { Sandbox } from "withruntime/vercel"; // was: from "@vercel/sandbox"
Pythonfrom withruntime.vercel import sandbox  # was: from vercel import sandbox

From the CodeSandbox SDK, map creating a VM, running commands, reading and writing files, and shutting down with the table in migration. A memory snapshot becomes snapshot() or pause().

Or give your coding agent the one instruction in migration. It switches the project on a branch, tests it on the free usage and reports the monthly saving. From Vercel, credit you add within 30 days of signing up is matched, up to $1,000 in total. The full side-by-sides are Runtime vs Vercel Sandbox and Runtime vs CodeSandbox.

Runtime Cloud

Runtime runs the same job for 70% less than Vercel and 74% less than CodeSandbox. 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox cost $2.12 on Vercel, $2.48 on CodeSandbox and $0.64 on Runtime. Runtime bills measured CPU by the second, with no one-minute minimum. It lets you pick any shape rather than a fixed size. Rates checked 25 October 2026.

Sign in with npx withruntime login and start on the free usage. The migration guide maps Vercel Sandbox and CodeSandbox calls.

Sources

Vercel Sandbox pricing rechecked 25 October 2026; the rest checked 25 October 2026.

Facts on this page were checked on 26 October 2026.

Keep comparing.

100 free hoursin your first 30 days.

of a 1 GB machine

  • No credit card
  • Four sandboxes at once, 2 vCPU and 4 GiB each
  • Then prepaid credit from $10, no plan fee
Start free, no card
Start free, no card