Which is better, Fly Sprites or CodeSandbox?
It depends on how busy and how large the machine is. For agents that mostly wait on a model, Runtime has the lowest bill: $0.64 for 1,000 one-minute runs, against $2.40 on Sprites and $2.48 on CodeSandbox. Runtime meters CPU at a lower rate, because it bills per second. Pick Fly Sprites for a 100 GB disk that costs little while asleep and takes filesystem checkpoints in about a second. Pick CodeSandbox for large fixed VMs, up to 64 cores and 128 GB, or for 250 VMs running concurrently on its Scale plan.
At a glance
CodeSandbox's figures come from Together's documentation of the CodeSandbox SDK. CodeSandbox is a Together company.
| Fly Sprites | CodeSandbox SDK | Runtime | |
|---|---|---|---|
| Isolation | Firecracker microVM | Firecracker microVM | Firecracker microVM, own kernel |
| CPU | $0.0385 per CPU-hour of measured CPU | Inside a fixed VM size | $0.025 per vCPU-hour of measured CPU, with a small floor |
| Memory | $0.021875 per GB-hour of memory in use, managed by Fly | Set by the size: Nano has 2 cores and 4 GB, $0.1486 an hour | $0.0075 per reserved GiB-hour |
| Billing unit | Usage while awake | By the minute, rounded up | By the second |
| Disk | 100 GB, billed on what you use | Inside the VM | Included while running |
| Plan fee | None required; optional monthly plans | Build plan free with 10 VMs concurrently; Scale $170 per month for 250 | None; prepaid credit from $10 |
| Free start | $30 of trial credit | The free Build plan | 100 free hours of a 1 GB machine in the first 30 days, no card |
| State | Disk kept; memory kept in a warm pause, dropped when cold | Memory snapshot and restore at any point | Pause, snapshot and fork keep files, memory and processes |
Is paying for what you use cheaper than a fixed size?
Not at every load. Sprites meter both CPU and memory, but the memory meter is $0.021875 per GB-hour. A Sprite holding 4 GB pays $2.19 per 1,000 runs for its memory alone, close to the $2.48 a CodeSandbox Nano VM, with 2 cores and 4 GB, pays for everything. With both CPUs busy, the Sprite costs more: $3.47 on Sprites against the same $2.48 on CodeSandbox, whose price does not change with the work.
The gap opens when a Sprite uses little memory. At 1 GB in use, the same 1,000 runs cost $0.76 on Sprites, against $1.24 on a CodeSandbox Pico VM (2 cores, 1 GB, 5 credits an hour). Runtime, with 1 GiB reserved, costs $0.26 for the same runs.
So the answer depends on the price of each meter, not only on whether the provider meters usage. Runtime measures CPU at $0.025 a vCPU-hour and reserves memory at $0.0075 per GiB-hour, below both other providers at every size in this page.
Cost for the same job
1,000 runs of a 2 vCPU, 4 GiB sandbox. Each run lasts 60 seconds and keeps the CPU busy for 20 CPU-seconds: an agent that mostly waits for a model. The Sprite is assumed to use all 4 GB for the whole minute. The CodeSandbox VM is a Nano, which costs 10 credits an hour at $0.01486 per credit.
- CPU
- 1,000 × 20 s / 3,600 × $0.0385
- $0.21
- Memory
- 1,000 × 90 s / 3,600 × 4 × $0.021875
- $2.19
- Size
- 1,000 × 60 s / 3,600 × $0.1486
- $2.48
- 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 per month, that is $240.14 on Sprites, $247.67 on CodeSandbox and $63.89 on Runtime. With both CPUs busy for the whole minute, it is $1.33 on Runtime against $3.47 on Sprites and $2.48 on CodeSandbox, so Runtime is cheaper however busy the sandbox is. The Sprite figure includes the 30 seconds or so that a Sprite stays awake and billed after its run. Plan fees, storage, network and free credits are left out.
Which one to pick
- Pick Fly Sprites for a long-lived computer an agent returns to, with a 100 GB disk that costs little while it sleeps and filesystem checkpoints that take about a second.
- Pick CodeSandbox for large fixed VMs, up to 64 cores and 128 GB, or for 250 VMs running concurrently on its Scale plan.
- Pick Runtime for the lowest price of the three at this size, busy or waiting, memory sized to the job, per-second billing, and pause that keeps memory while you have credit.
Runtime Cloud
Runtime runs the same job for 73% less than Sprites and 74% less than CodeSandbox. 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox cost $2.40 on Fly Sprites, $2.48 on CodeSandbox and $0.64 on Runtime. Runtime meters CPU like Sprites, at 35% below the rate, and bills per second where CodeSandbox rounds up to the minute. Rates checked 25 October 2026.
Every sandbox is a Firecracker microVM, and a pause keeps its memory. Start on the free usage with npx withruntime login. See the migration guide to move existing code.
Switch from either one
From Sprites, client.createSprite(name) becomes Sandbox.create() and
sprite.execFile(cmd, args) becomes exec([cmd, ...args]). From
CodeSandbox, create a sandbox where you would start a VM, and set its memory
directly instead of picking a size tier:
TypeScriptimport { Runtime } from "withruntime";const runtime = new Runtime();const sbx = await runtime.sandboxes.create({ vcpu: 2, memoryMiB: 1024 });try { await sbx.files.write("/workspace/invoice.py", "print(sum([125, 250, 375]))\n"); const run = await sbx.exec(["python3", "/workspace/invoice.py"]); console.log(run.stdout);} finally { await sbx.stop();}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. npx withruntime compare --from fly (or --from codesandbox)
prices what you ran at the old provider's rates. Credit you add within 30 days of signing up is matched, up to $1,000 in total. The full comparisons are
Runtime vs Fly.io and
Runtime vs CodeSandbox. The
sandbox cost calculator prices other
sizes.
Sources
Rates checked 25 October 2026; the Sprites, Sprites lifecycle and Together pages read 26 October 2026.
- Fly.io pricing, Sprites, Sprites lifecycle
- Together: CodeSandbox SDK, CodeSandbox SDK pricing
- Runtime pricing
Facts on this page were checked on 26 October 2026.