# Modal Sandbox alternatives: agent sandboxes ranked by cost Runtime is the cheapest Modal Sandbox alternative at 84% less, and it isolates with a microVM kernel instead of gVisor. **For sandbox work, Runtime costs 84% less than Modal and gives each sandbox a kernel of its own.** The reference job, 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox, is $0.64 on Runtime and $3.97 on Modal; over 100,000 runs a month the gap is $333. Modal bills the CPU a sandbox asked for even while it idles, and Runtime bills the CPU it spent. Rates checked 23 September 2026. ## Why do teams move sandboxes off Modal? Modal is a platform for functions, GPUs and jobs, and its sandboxes follow the same rules. For agent code that mostly waits, those rules cost money: - **The request is the bill.** Modal charges whichever is higher, the CPU and memory requested or the amount used. A sandbox cannot use more than it requested, so in practice you pay for the request for the whole run. Runtime has no request to size: it measures use, with a floor of a twentieth of a vCPU. - **Rates are per physical core.** $0.1419 per core-hour buys 2 vCPUs, about $0.071 per vCPU-hour, nearly three times Runtime's $0.025. Memory is $0.0240 per GiB-hour against $0.0075. - **gVisor, not a separate kernel.** Modal's sandboxes run under gVisor, a user-space kernel that intercepts system calls. Runtime's run in Firecracker microVMs, each with its own Linux kernel behind hardware virtualization. - **An App comes first.** Called from outside Modal, a sandbox needs a Modal App to belong to. `Sandbox.create()` on Runtime needs nothing set up. - **Plans shape the account.** Modal's pricing page, read on 25 September 2026, gives Starter 3 seats and 100 containers at once, and Team costs $250 a month. Runtime has no plan: credit from $10 and room for 100 sandboxes at once on a paid account. ## Which alternatives are cheapest? Thirteen providers, one workload: 1,000 runs at 60 seconds each on 2 vCPU and 4 GiB, where the code keeps the CPU busy for only 20 CPU-seconds per run. On Modal that is one physical core, requested for the full minute, which puts it twelfth. [Pricing](/docs/pricing#published-rate-comparison) shows every row's sum; none of them counts plan fees, storage, network, credits or negotiated terms. | # | Provider | Isolation | CPU billed on | 1,000 runs | | --- | ------------------------------------------------------------- | ------------------------------------------ | --------------------------------------- | ---------: | | 1 | **Runtime** | Firecracker microVM, own kernel | Measured CPU, with a small floor | **$0.64** | | 2 | Northflank | microVMs for CPU work, gVisor for GPU work | Allocated vCPUs | $1.11 | | 3 | Cloudflare Sandbox (2 vCPU, 6 GiB, 12 GB disk) | A container in its own VM | Active CPU | $1.35 | | 4 | Fly Machines, `performance-2x` with 4 GB | Firecracker microVM | The machine's size while started | $1.44 | | 5 | Morph, 2 MCUs | Full virtual machines | The machine's size in MCUs | $1.67 | | 6 | Vercel Sandbox, `iad1` (4 GB) | Firecracker microVM, own kernel | Active CPU | $2.12 | | 7 | CodeSandbox SDK, a Nano VM | Firecracker microVM | The VM's size, by the minute rounded up | $2.48 | | 8 | E2B | Firecracker microVM, own kernel | Allocated vCPUs | $2.76 | | 9 | Daytona | Containers by default; VM class separate | Allocated vCPUs | $2.76 | | 10 | Blaxel (4 GB) | Lightweight virtual machines | Included with memory, active time | $2.76 | | 11 | Fly Sprites (4 GB in use) | Firecracker microVM | Measured CPU | $3.31 | | 12 | Modal Sandboxes (1 physical core) (the one you are replacing) | gVisor, a user-space kernel | Requested or used, whichever is higher | $3.97 | | 13 | Runloop, a `MEDIUM` devbox | microVM, with a container inside | Allocated CPUs while running | $5.33 | ## Cost for the same job Runtime and Modal, with E2B (an allocation-billed microVM) and Vercel (an active-CPU microVM) for reference: ``` 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 Modal CPU 1,000 × 60 s × 1 core × $0.00003942 = $2.37 Memory 1,000 × 60 s × 4 × $0.00000667 = $1.60 Total $3.97 E2B CPU 1,000 × 60 s / 3,600 × 2 × $0.0504 = $1.68 Memory 1,000 × 60 s / 3,600 × 4 × $0.0162 = $1.08 Total $2.76 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 ``` Push the load up so both CPUs are busy for the whole minute, and the four totals become $1.33 on Runtime, $3.97 on Modal, $2.76 on E2B and $5.68 on Vercel. Modal's line does not change, because the request was already billed in full. A smaller request lowers it, but also caps what the sandbox can use. At 100,000 runs a month, the waiting version is $63.89 on Runtime and $396.60 on Modal. ## What a Modal user gains from each alternative ### 1. Runtime: no request to size, a kernel per sandbox A Firecracker microVM for each sandbox, billed $0.025 per vCPU-hour of CPU actually used and $0.0075 per reserved GiB-hour. There is no App to create: one call returns a running sandbox. Pausing keeps memory and processes for 1 to 365 days, and forks start 1 to 10 running copies from one sandbox. ### 2. Northflank: allocation at the lowest list price Northflank bills what a sandbox holds, as Modal effectively does, but at $0.01667 per vCPU-hour and $0.00833 per GB-hour. It is cheaper than Runtime only when both CPUs run flat out, $1.11 to $1.33. GPU work runs under gVisor, as on Modal, and it can deploy into your own AWS, GCP or Azure account. ### 3. Cloudflare Sandbox: active CPU, but only from a Worker Charges start when the CPU works, at $0.072 per vCPU-hour, which suits waiting agents better than Modal's request billing. Memory is at least 3 GiB per vCPU, you call it from a Worker on the Workers Paid plan, and a sandbox asleep after 10 idle minutes has lost its files unless you saved them to R2. ### 4. Fly Machines: the whole VM for under half Modal's price A `performance-2x` with 4 GB costs $0.0861 an hour in `iad`, busy or idle, $1.44 for this job. Fly.io runs them in 18 regions; a volume is needed for files to outlast a Machine. ### 5. Morph: branching full machines Morph charges $0.05 per MCU-hour and needs 2 MCUs here. Its Infinibranch takes a running machine, memory and all, and branches it into hundreds of copies. ### 6. Vercel Sandbox: a microVM that bills active CPU $0.128 per active CPU-hour and $0.0212 per GB-hour in `iad1`. For this waiting job it costs $2.12, under Modal; with the CPUs busy it climbs to $5.68, above. It covers 19 regions and 10,000 concurrent sandboxes on Pro. ### 7. CodeSandbox SDK: fixed sizes, minute billing A Nano VM with 2 cores and 4 GB is $0.1486 an hour in credits, rounded up to the minute. The free Build plan runs 10 VMs at once, and Scale lifts that for $170 a month. ### 8. E2B: microVMs billed by allocation $0.0504 per allocated vCPU-hour and $0.0162 per GiB-hour, so $2.76 whether the code works or waits. Hobby sessions last an hour and Pro, at $150 a month, allows 24. The runtime is open source under Apache-2.0. ### 9. Daytona: GPUs outside Modal If GPUs are what holds you to Modal, Daytona sells GPU sandboxes too, plus Windows machines and regions in the US and the EU. Its rates match E2B's, and its default sandbox is a container. ### 10. Blaxel: pay for active memory only $0.0000115 per GB-second while a sandbox is active, with cores set by memory. Standby begins by itself when connections close, and a sandbox wakes in about 25 ms. ### 11. Fly Sprites: measured CPU from Fly.io $0.07 per measured CPU-hour and $0.04375 per GB-hour of memory in use, $3.31 for the job. A Sprite puts itself to sleep and keeps a 100 GB disk. ### 12. Runloop: the one dearer than Modal here $0.108 per CPU-hour, $0.0252 per GB-hour and a disk charge make $5.33. The reason to pick it is benchmark work: SWE-Bench and other public suites run on its devboxes. ## How to switch from Modal Modal's calls have direct counterparts. `modal.Sandbox.create(app=...)` turns into `Sandbox.create()`, `sb.exec(*args)` into `exec`, `Sandbox.from_name` into `Sandbox.getOrCreate(name)`, and `idle_timeout` into `idlePauseSeconds`. The App lookup disappears. Modal: ```python check import modal app = modal.App.lookup("my-app", create_if_missing=True) sb = modal.Sandbox.create(app=app) process = sb.exec("python3", "-c", "print(6 * 7)") print(process.stdout.read()) sb.terminate() ``` Runtime: ```python from withruntime import Sandbox with Sandbox.create(funding="trial") as box: print(box.exec("python3 -c 'print(6 * 7)'", check=True).stdout) ``` Rather not port it by hand? Give a coding agent the instruction in [migration](/docs/migrate), and it rewrites the Modal calls on a branch, proves them on the free trial and tells you the monthly saving. Running `npx withruntime switch --from modal` ahead of your first top-up gets that top-up matched in credit, up to $100. Related reading: [E2B vs Modal](/compare/e2b-vs-modal), [Daytona vs Modal](/compare/daytona-vs-modal), [Modal vs Vercel Sandbox](/compare/modal-vs-vercel-sandbox) and [Firecracker vs gVisor](/compare/firecracker-vs-gvisor). ## Sources Rival rates checked 23 September 2026. Modal's pricing page was read again on 25 September 2026 for its plans and limits. - [Modal pricing](https://modal.com/pricing) - [Cloudflare Containers pricing](https://developers.cloudflare.com/containers/pricing/) - [Together Code Sandbox](https://docs.together.ai/docs/together-code-sandbox) - [E2B pricing](https://e2b.dev/pricing) - [Runloop pricing](https://www.runloop.ai/pricing) - [Vercel Sandbox pricing](https://vercel.com/docs/sandbox/pricing) - [Northflank pricing](https://northflank.com/pricing) - [Daytona pricing](https://www.daytona.io/pricing) - [Fly.io pricing](https://fly.io/pricing/) - [Morph Cloud pricing](https://cloud.morph.so/web/pricing) - [Blaxel pricing](https://blaxel.ai/pricing) - Runtime [pricing](/docs/pricing) and the [Modal comparison](/docs/modal-sandbox-alternative) Facts on this page were checked on 25 September 2026.