# CodeSandbox vs Runloop: pricing, isolation and limits CodeSandbox bills a fixed VM size per minute; Runloop bills a devbox's CPU, memory and disk per hour. A 2 CPU, 4 GB job: $2.48 vs $5.33. **Runtime costs 74% less than CodeSandbox and 88% less than Runloop for this job, and its image builds are free.** 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox are $2.48 on CodeSandbox, $5.33 on Runloop and $0.64 on Runtime. Neither rival meters the CPU a run actually spends; Runtime does, second by second. Rates checked 23 September 2026. ## At a glance CodeSandbox's figures are from Together's documentation of the CodeSandbox SDK; CodeSandbox is a Together company. | | CodeSandbox SDK | Runloop | Runtime | | --------------------- | ------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------- | | Isolation | Firecracker microVM | microVM, with a container inside | Firecracker microVM, own kernel, every sandbox | | How size is billed | Credits per VM size, $0.01486 a credit | $0.108 per CPU-hour, $0.0252 per GB-hour, disk per GB-hour | $0.025 per vCPU-hour of measured CPU, with a small floor | | 2 CPU, 4 GB, an hour | $0.1486 (Nano, 10 credits) | $0.3195 (`MEDIUM`, with 8 GB disk) | $0.03125 waiting, $0.08 fully busy | | Billing step | By the minute, rounded up | While initializing, running, suspending or resuming | By the second, no one-minute minimum | | Prepared environments | Templates from a snapshot, made with the CLI | Blueprints; a build is $0.252 an hour | Custom images; building is free | | Idle | Hibernate and resume | Suspend keeps the disk; processes restart; Pro plan | Pause keeps files, memory and processes, 1 to 365 days | | Plan fee | Build free; Scale $170 a month | Basic free; Pro $250 a month plus usage | None; prepaid credit from $10 | | Free start | The free Build plan, 10 VMs at once; 250 on Scale | $50 of credit, no card; 3 devboxes running at once | 50 sandbox hours, no card; eight at once | ## What does a 2 CPU, 4 GB machine cost an hour? The two price the same shape very differently. - **CodeSandbox Nano**, 2 cores and 4 GB, is 10 credits an hour at $0.01486 a credit: $0.1486. Each VM's time is rounded up to the next minute. - **Runloop `MEDIUM`**, 2 CPUs, 4 GB and 8 GB of disk, is listed at $0.3195 an hour: $0.216 for CPU, $0.1008 for memory and the rest for disk. Compute is billed only while the devbox is initializing, running, suspending or resuming. So Runloop costs a little over twice as much as CodeSandbox for a machine that runs the whole hour. Runtime charges $0.08 for that hour with both CPUs busy and $0.03125 while the sandbox waits on a model, since only measured CPU is billed above a floor of a twentieth of a vCPU. ## Cost for the same job Now as a job: 1,000 runs of 60 seconds, a Nano VM on CodeSandbox, a `MEDIUM` devbox on Runloop and 2 vCPU with 4 GiB on Runtime. In each run the code is busy for 20 CPU-seconds and waits out the rest, as an agent does between model calls. ``` CodeSandbox Size 1,000 × 60 s / 3,600 × $0.1486 = $2.48 Runloop CPU 1,000 × 60 s / 3,600 × 2 × $0.108 = $3.60 Memory 1,000 × 60 s / 3,600 × 4 × $0.0252 = $1.68 Disk 1,000 × 60 s / 3,600 × 8 × $0.00034236 = $0.05 Total $5.33 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 ``` Scaled to 100,000 runs a month: $247.67 on CodeSandbox, $532.56 on Runloop, $63.89 on Runtime. If both CPUs are busy for the whole minute, the job costs $1.33 on Runtime, $2.48 on CodeSandbox and $5.33 on Runloop, the two rivals unchanged because they bill the machine rather than the work. The totals omit plan fees, blueprint builds, idle storage, network, taxes and free credit. ## Which one to pick - **CodeSandbox** when people, not only agents, use the environments: it is built for browser-based development, clones quickly from memory snapshots, and offers fixed machines as large as 64 cores and 128 GB. - **Runloop** when the product is benchmarking agents. It runs SWE-Bench and other public suites, builds custom ones from your data, can be deployed into your own cloud account, and states SOC 2, HIPAA and GDPR readiness. - **Runtime** when you want a Firecracker microVM per sandbox at 74% below CodeSandbox and 88% below Runloop, image builds at no charge, a pause that keeps memory and running processes, and no plan fee. It runs benchmarks as well; see [agent evals and SWE-bench](/use-cases/agent-evals-and-swe-bench). ## Porting templates and blueprints There is no compatibility import for either SDK, but the calls line up one to one ([map the calls](/docs/migrate#map-the-calls)). What each calls a template or a blueprint, Runtime calls a custom image: build it once, then start sandboxes from it: ```ts check import { Runtime } from "withruntime"; const runtime = new Runtime(); await runtime.images.build({ name: "data", recipe: { pip: ["pandas"], apt: ["jq"] } }); await using sbx = await runtime.sandboxes.create({ image: "data" }); console.log((await sbx.exec("python3 -c 'import pandas; print(pandas.__version__)'")).stdout); ``` ```python check from withruntime import Runtime runtime = Runtime() image = runtime.images.build(name="data", recipe={"pip": ["pandas"], "apt": ["jq"]}) with runtime.sandboxes.create(image=image["id"]) as sbx: print(sbx.exec("python3 -c 'import pandas; print(pandas.__version__)'").stdout) ``` An image can also start from a Dockerfile ([custom images](/docs/images)). To see the saving on your own usage first, `npx withruntime compare --from runloop` or `--from codesandbox` reprices what you ran at the old rates, and the [migration](/docs/migrate) instruction lets a coding agent do the port on a branch against the free trial. Details: [Runtime vs CodeSandbox](/docs/codesandbox-alternative), [Runtime vs Runloop](/docs/runloop-alternative). ## Sources Rates checked 23 September 2026. Together's Code Sandbox documentation, Runloop's pricing page and its devbox sizes reread 25 September 2026. - [Together Code Sandbox](https://docs.together.ai/docs/together-code-sandbox), [CodeSandbox SDK pricing](https://codesandbox.io/docs/sdk/pricing) - [Runloop pricing](https://www.runloop.ai/pricing), [Devbox sizes](https://docs.runloop.ai/docs/devboxes/configuration/sizes), [Devbox lifecycle](https://docs.runloop.ai/docs/devboxes/lifecycle) - Runtime [pricing](/docs/pricing) and [custom images](/docs/images) Facts on this page were checked on 25 September 2026.