# Runtime vs Vercel Sandbox Runtime runs Firecracker microVMs and bills active CPU, like Vercel Sandbox. For an agent that mostly waits on a model, it costs **70% less**. **The saving:** 1,000 one-minute runs of a 2 vCPU sandbox with 4 GiB cost **$0.64 on Runtime and $2.12 on Vercel**. At 100,000 runs a month, that is $63.89 against $212.44, **$149 a month saved**. Your Vercel Sandbox code keeps working. Change one import. Comparing more than two providers? [Vercel Sandbox alternatives](/compare/vercel-sandbox-alternatives) ranks the other providers by the cost of the same job. ## Where Runtime is better - **80% cheaper CPU.** Active CPU costs $0.025 an hour on Runtime and $0.128 on Vercel. Memory costs 65% less. Busier jobs save more. With both CPUs busy the whole minute, the example job costs $1.33 on Runtime and $5.68 on Vercel. - **It pauses itself when idle.** After 300 seconds with no request, command, connection, traffic or CPU use, a Runtime sandbox pauses. While paused, it pays only paused storage, $0.08 per GB (10⁹ bytes) a month. The next request wakes it. Its processes keep running. - **A written uptime promise.** Paid accounts get 99% API uptime a month, measured from outside. If a month falls short, 10% of that month's charges is returned as credit automatically ([Uptime Promise](/legal/sla)). - **Memory survives a pause.** A paused Runtime sandbox wakes with its processes still running, kept while you have credit. A stopped Vercel sandbox keeps its filesystem, and its processes start again. - **Forks keep memory too.** A Runtime fork copies a running sandbox with its memory and running processes. A Vercel snapshot or fork captures the filesystem, so processes start again. - **Private ports by default.** A Runtime preview gives a port an HTTPS address that needs a token unless you make it public. Vercel's exposed ports are reachable at a public URL. - **No platform to join.** Runtime needs no hosting plan, team or project. Prepaid credit from $10 is the whole account. - **A one-line switch.** `withruntime/vercel` runs code written for Vercel Sandbox's SDK, in JavaScript and Python: commands, files, ports, snapshots and persistent sandboxes, with no Vercel project or token. Credit you add within 30 days of signing up is matched, up to $1,000 in total. - **Single sign-on included.** SAML or OIDC sign-in, SCIM, roles and an audit log come with every Runtime account ([single sign-on](./single-sign-on)). Vercel sells SAML single sign-on as an add-on for Pro teams and keeps directory sync for Enterprise. - **Your agent sets itself up.** It runs `npx withruntime sandboxes run -- ...`, shows you a link, and starts once you approve in the browser. No API key goes into a prompt or a config file. The [MCP server](./mcp) reuses the same connection. **Also included:** a code interpreter, network allow and deny lists, secrets the sandbox never sees, custom images, volumes backed up daily, a Linux desktop, metrics, webhooks, OpenTelemetry export, S3, R2 and GCS bucket mounts, and identity tokens for AWS and Google Cloud. Paid accounts add custom domains, TCP ports, dedicated outbound addresses and WireGuard private networks. See [products](./products). ## At a glance Vercel's figures come from its public pricing and documentation, checked 25 October 2026, at the rates of its default `iad1` region. | | Runtime | Vercel Sandbox | | ---------------- | --------------------------------------------------------------------------- | ---------------------------------------------------- | | Isolation | Firecracker microVM, own kernel | Firecracker microVM, own kernel | | CPU billing | $0.025 per active vCPU-hour, with a small floor | $0.128 per active CPU-hour | | Memory billing | $0.0075 per reserved GiB-hour | $0.0212 per provisioned GB-hour | | Plan | None; prepaid credit from $10 | Hobby allowance free; usage beyond it needs Pro | | Free start | 100 free hours of a 1 GB machine in the first 30 days, no card | 5 active CPU-hours and 420 GB-hours a month on Hobby | | Session length | No time limit: runs while it works, pauses itself after 300 seconds idle | 45 minutes on Hobby, 24 hours on Pro | | Stop and resume | Pause keeps files, memory and processes | Stop keeps the filesystem; processes start again | | Snapshots, forks | Files, memory and running processes | The filesystem | | Port URLs | Private with a token by default | Public | ## Cost for the same job Take 1,000 runs of a 2 vCPU sandbox with 4 GiB on Runtime and 4 GB on Vercel, which gives 2 GB per vCPU. Each run lasts 60 seconds and keeps the CPU busy for 20 CPU-seconds. This is an agent that spends most of its time waiting for a model. ``` Runtime CPU 1,000 × 20 s / 3,600 × $0.025 = $0.14 Memory 1,000 × 60 s / 3,600 × 4 × $0.0075 = $0.50 Total $0.64 Vercel CPU 1,000 × 20 s / 3,600 × $0.128 = $0.71 Memory 1,000 × 60 s / 3,600 × 4 × $0.0212 = $1.41 Total $2.12 ``` - **Saving:** 70%, or $1.49 per 1,000 runs. - **Per month:** at 100,000 runs, $63.89 on Runtime against $212.44 on Vercel. - **Busier work:** with both CPUs busy for the whole minute, $1.33 on Runtime against $5.68 on Vercel, a 77% saving. A GiB is about 7% larger than a GB, so Runtime's memory figure covers slightly more. Creations, network, storage, plan fees, taxes and free allowances are excluded from both. On Runtime, inbound traffic is free. Each account's first 100 GiB out a month is free, then $0.02 per GB (10⁹ bytes). See [pricing](./pricing) for Runtime's terms. ## How to switch Give your coding agent the one instruction in [migration](./migrate). It replaces the Vercel calls on a branch, tests them on the free usage, and tells you what you save each month. Your old code stays on the main branch until you merge. ### Change one import Runtime's SDK runs code written for Vercel Sandbox's SDK. Change the import and set `RUNTIME_API_KEY`, or run `npx withruntime login` once: ```ts no-run import { Sandbox } from "withruntime/vercel"; // was: from "@vercel/sandbox" ``` ```python no-run from withruntime.vercel import sandbox # was: from vercel import sandbox ``` Sandboxes get Vercel's defaults: 2 vCPUs with 2048 MiB each, a 5-minute timeout, and persistence. So `stop()` pauses a sandbox, and the next call or `Sandbox.get({ name })` wakes it. Ports listed at create get public addresses. `domain(port)` returns the address for that port. Sandboxes use the free usage first, then prepaid credit. With no timeout, a sandbox has no time limit: it runs while it works. A timeout over an hour works too. The sandbox object moves Runtime's hour-long limit on toward it while your program runs. Users and groups (`createUser`, `asUser`) and list filters, sorting and cursors work as on Vercel. A call Runtime handles differently, such as Drives or other regions, throws `NotSupportedError` before anything happens. It names what to use instead. `VERCEL.md` in the package lists every mapping. ### Or port the calls Vercel Sandbox: ```js import { Sandbox } from "@vercel/sandbox"; const sandbox = await Sandbox.create(); const command = await sandbox.runCommand("echo", ["hello"]); console.log(await command.stdout()); await sandbox.stop(); ``` Runtime: ```ts import { Sandbox } from "withruntime"; const box = await Sandbox.create(); try { console.log((await box.exec("echo hello", { check: true })).stdout); } finally { await box.stop(); } ``` ## When Vercel Sandbox may fit better - **Regions and scale.** Vercel runs sandboxes in 19 regions, with up to 10,000 concurrent sandboxes on Pro. Runtime runs in one US region. - **Your app already lives on Vercel.** Sandboxes then share its account, billing and observability. ## Sources Checked 23 September 2026; single sign-on and the firewall checked 27 September 2026. - [Vercel Sandbox pricing and quotas](https://vercel.com/docs/sandbox/pricing) - [Vercel SAML single sign-on](https://vercel.com/docs/saml) - [Vercel Sandbox firewall](https://vercel.com/docs/sandbox/concepts/firewall) - [Understanding Vercel Sandboxes](https://vercel.com/docs/sandbox/concepts) - Runtime [pricing](./pricing), [security](./security) and [products](./products)