CodeSandbox vs Northflank: pricing, isolation and limits
CodeSandbox sells fixed VM sizes by the minute; Northflank bills each vCPU and GB by the hour. A 2 vCPU, 4 GB job costs $2.48 against $1.11.
Runtime costs 74% less than CodeSandbox and 42% less than Northflank for a job that mostly waits. 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox come to $2.48 on CodeSandbox, $1.11 on Northflank and $0.64 on Runtime. The difference is what gets billed: a fixed VM size on CodeSandbox, allocated resources on Northflank, and on Runtime only the CPU the code uses, counted per second. Rates checked 23 September 2026.
Estimated compute cost
74% less than CodeSandbox42% less than Northflank
2 vCPUs · 4 GiB · 60 s a run · 20 CPU-seconds busy
Compute only, at list rates checked 23 September 2026 (Together Code Sandbox, Northflank pricing). Plan fees, network, taxes and free credits are left out. The worked example below shows the arithmetic.
At a glance
The CodeSandbox column comes from Together's CodeSandbox SDK documentation; Together owns CodeSandbox.
| CodeSandbox SDK | Northflank | Runtime | |
|---|---|---|---|
| Isolation | Firecracker microVM | Kata Containers and gVisor | Firecracker microVM, own kernel, every sandbox |
| How size is billed | Fixed sizes in credits, $0.01486 a credit | $0.01667 per vCPU-hour and $0.00833 per GB-hour | $0.025 per vCPU-hour of measured CPU, with a small floor |
| 2 vCPU, 4 GB, an hour | $0.1486 (Nano, 10 credits) | $0.0667 | $0.03125 waiting, $0.08 fully busy |
| Sizes | Pico (2 cores, 1 GB) to XLarge (64 cores, 128 GB) | Predefined compute plans, or custom plans on request | vCPUs and memory chosen apart |
| Billing step | By the minute, rounded up | Hourly rates, while the service runs | By the second, no one-minute minimum |
| At once | 10 VMs on Build, 250 on Scale | 10,000+ isolated workloads, as Northflank states | 100 on a paid account to start; eight on the trial |
| Plan fee | Build free; Scale $170 a month | None published for compute | None; prepaid credit from $10 |
| Free start | The free Build plan | 2 free services and 1 free database | 50 sandbox hours, no card |
Fixed sizes or per-resource rates: which costs less?
CodeSandbox sells a VM by its size. The size with 2 cores and 4 GB is Nano, for 10 credits an hour, $0.1486. Each VM's running time is rounded up to the next minute, so short tasks pay for a whole minute each. Northflank prices each vCPU and each GB separately, which comes to $0.0667 an hour for the same shape, under half of Nano.
The rounding matters most for short agent tasks. For 1,000 runs of 40 seconds each, CodeSandbox still bills 1,000 minutes, $2.48, while Northflank's rates give $0.74 for the 40 seconds and Runtime $0.47 with the same 20 CPU-seconds of work, since Runtime bills by the second and only the CPU used.
Cost for the same job
Now the full-minute case: 1,000 runs of 60 seconds on 2 vCPU and 4 GiB, which is a Nano VM on CodeSandbox and 4 GB on Northflank, with 20 CPU-seconds of work in each.
TextCodeSandbox Size 1,000 × 60 s / 3,600 × $0.1486 = $2.48Northflank CPU 1,000 × 60 s / 3,600 × 2 × $0.01667 = $0.556 Memory 1,000 × 60 s / 3,600 × 4 × $0.00833 = $0.555 Total $1.11Runtime 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.64Monthly, 100,000 runs cost $247.67 on CodeSandbox, $111.10 on Northflank and $63.89 on Runtime. With both CPUs busy for the whole minute, it is $1.11 on Northflank, $1.33 on Runtime and $2.48 on CodeSandbox; when every CPU works the whole time, an allocated rate as low as Northflank's is hard to beat. Plan fees, storage, network, taxes and free allowances are left out.
Which one to pick
| Main need | Choose |
|---|---|
| Browser dev environments, memory snapshots, VM clones under 3 s | CodeSandbox |
| A very large fixed machine, up to 64 cores and 128 GB | CodeSandbox |
| Long jobs with every CPU busy, or L4, A100 and H100 GPUs by the hour | Northflank |
| Sandboxes in your own cloud account next to your services | Northflank |
| Agents that wait on a model | Runtime |
The clone time is Together's own statement. For waiting agents Runtime is 74% below CodeSandbox and 42% below Northflank on the typical run, with a microVM per sandbox, pause and forks that keep memory, and no plan fee to unlock concurrency.
Moving to Runtime
Neither SDK has a compatibility import, but each call has a direct match (map the calls). Instead of picking from a list of sizes, you give each sandbox its own vCPUs, memory and disk:
TypeScriptimport { Runtime } from "withruntime";const runtime = new Runtime();const sbx = await runtime.sandboxes.create({ vcpu: 2, memoryMiB: 4096, timeoutSeconds: 900 });console.log((await sbx.exec(["python3", "-c", "print(6 * 7)"])).stdout);await sbx.stop();Pythonfrom withruntime import Runtimeruntime = Runtime()sbx = runtime.sandboxes.create(vcpu=2, memory_mib=4096, timeout_seconds=900)print(sbx.exec(["python3", "-c", "print(6 * 7)"]).stdout)sbx.stop()npx withruntime compare --from codesandbox or --from northflank reprices
what you already ran, and the cost calculator
prices any other shape. A coding agent can run the port from the one
instruction in migration, on a branch, on the free trial.
Longer comparisons: Runtime vs CodeSandbox,
Runtime vs Northflank.
Sources
Rates checked 23 September 2026. Together's Code Sandbox documentation, Northflank's pricing page and its sandbox page reread 25 September 2026.
- Together Code Sandbox, CodeSandbox SDK pricing
- Northflank pricing, Northflank sandboxes
- Runtime pricing
Facts on this page were checked on 25 September 2026.