CodeSandbox SDK vs Fly.io Machines
Both run Firecracker microVMs, but they are built for different jobs. CodeSandbox SDK is a sandbox API whose VMs hibernate with their memory and fork from a warm state, while Fly.io Machines are the building block of an app hosting platform that boots your own image in 17 regions.
The companies and products
CodeSandbox SDK
CodeSandbox SDK is an API from CodeSandbox, now a Together AI company, that starts sandboxed development VMs on the same infrastructure as the CodeSandbox editor.
Each sandbox is a Firecracker microVM built from a template or any Dockerfile. When it goes idle it hibernates with a memory snapshot, and it resumes or forks from that snapshot in seconds. You drive it from a TypeScript SDK through terminals, commands, files and HTTPS hosts. Together's docs now call it the legacy offering and point new users to its successor, the together-sandbox SDK.
Fly.io Machines
Fly.io is an app hosting platform, and Machines are the microVMs underneath it that you can also start and stop through a REST API.
A Fly Machine boots your Docker image as a Firecracker microVM on Fly's own servers, in one of 17 regions. You pick a shared or performance CPU preset, attach at most one Volume for data that must last, and Fly Proxy can stop, suspend and wake Machines as traffic comes and goes. It is built for teams that host web apps and services worldwide; it is not a sandbox product, so this page compares the parts that overlap with agent work.
Which use cases each one fits
For each use case, Battleships prices every sandbox provider on the same workload and sorts them from the cheapest monthly bill up. “46th cheapest of 345” means 45 of the other 344 providers run that workload, with every feature it needs, for less. “With limits” means the provider runs it but misses something, so it is listed after every full match. Open a use case for its whole ranking and what each provider misses.
| Use case and its workload | CodeSandbox SDK: price rank | Fly.io Machines: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month Neither fits fully: CodeSandbox SDK has no SSH or /dev/kvm, and a Fly Machine's root disk resets, while boat has both plus a disk that stays. | 178th of 367, with limits $1,939 a month | 92nd of 367, with limits $836 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB | 215th of 366, with limits $2,478 a month | 125th of 366, with limits $816 a month | 5th cheapest of 366 $657 a month |
| Code interpreter bursts 100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month CodeSandbox SDK fits short code runs fully, with VMs that wake from a memory snapshot; Fly is cheaper here but its shared CPU is a compromise. | 46th cheapest of 345 $642 a month | 75th of 345, with limits $94 a month | 186th of 345, with limits $2,000 a month |
| Sandboxes for your users 300 at once · 2 vCPU / 4 GB · 30,000 sessions of 23 min a month Both can give each user a VM; CodeSandbox SDK caps Scale at 250 at once, and Fly's API creates about one Machine per second per app. | 140th of 361, with limits $1,707 a month | 69th of 361, with limits $600 a month | Cheapest of 361 $209 a month |
| RL rollouts 1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month CodeSandbox SDK's memory forks let rollouts branch from one warm state, while Fly is far cheaper and can clone Machines without their disk. | 348th of 360, with limits $3,861 a month | 48th of 360, with limits $2,838 a month | 34th of 360, with limits $2,000 a month |
| Agent evals 250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month | 64th cheapest of 364 $1,335 a month | 117th of 364, with limits $457 a month | 10th cheapest of 364 $200 a month |
| CI runners 40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month CodeSandbox SDK fits CI fully; on Fly a busy build drains a shared vCPU's burst balance unless you pay for performance CPUs. | 92nd cheapest of 377 $860 a month | 152nd of 377, with limits $288 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB A dev box that runs all month is cheaper on Fly than on CodeSandbox SDK, but only files on its one Volume survive a restart. | 310th of 368, with limits $240 a month | 118th of 368, with limits $53 a month | 18th cheapest of 368 $26 a month |
| Computer-use agents 50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month Neither has a desktop built in; boat streams a 60fps desktop with Chromium and computer use in every sandbox. | 206th of 369, with limits $691 a month | 95th of 369, with limits $173 a month | 6th cheapest of 369 $200 a month |
| Browser-use agents 50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month | 251st of 367, with limits $443 a month | 160th of 367, with limits $90 a month | 7th cheapest of 367 $200 a month |
| Scraping & bots (startup scale) 50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month | 281st of 346, with limits $508 a month | 161st of 346, with limits $67 a month | 6th cheapest of 346 $90 a month |
| Mass scraping & bots (undetectable) 1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month Fly ranks higher than both others here, since it can spread scrapers across 17 regions and bill only the seconds they run. | 193rd of 338, with limits $7,390 a month | 44th of 338, with limits $1,232 a month | 71st of 338, with limits $1,800 a month |
| Parallel red teaming 200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month | 240th of 360, with limits $326 a month | 118th of 360, with limits $63 a month | 2nd cheapest of 360 $200 a month |
| GPU eval jobs 10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month | Can't run it | Can't run it | Can't run it |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Can't run it | Can't run it | Can't run it |
Key features
| Feature | CodeSandbox SDK | Fly.io Machines | boat |
|---|---|---|---|
| Kind of product | Sandbox API for code runs and dev VMs, now called legacy by Together | App hosting platform; Machines are its VM building block | Agent sandbox: a full VM per agent, ready to use |
| Isolation | Firecracker microVM with its own kernel | Firecracker microVM with its own kernel, on Fly's own servers | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| Files after a stop | Disk kept through hibernation; hibernated VMs are archived after about 7 days | Root file system is ephemeral; one Volume per Machine, billed for its full size around the clock | The whole disk is kept, saved every minute and on stop; a stopped sandbox costs nothing |
| Pause and memory | Hibernates with a memory snapshot; resumes with processes still running | Suspend keeps memory for Machines up to 2GB; dropped on deploy or host move | Resume reboots from disk (no memory snapshots) |
| Fork | Fork a hibernated sandbox from its snapshot, or a running one sharing its memory | Clone copies a Machine's config; a cloned Volume starts empty | Fork a running sandbox with its disk |
| Wake on request | An HTTP request to a host wakes a hibernated VM | Fly Proxy stops or suspends idle Machines and wakes them on traffic | No; you start and stop sandboxes through the API |
| Docker, systemd and nested virtualization | Docker and root, built from any Dockerfile; /dev/kvm not documented | Root and Docker you install yourself; Fly's own init, no systemd; no /dev/kvm | Docker, root, systemd and /dev/kvm on every machine |
| Shell access | Terminals, commands and files through the SDK; no SSH | SSH into a Machine | SSH, plus exec and files over the API |
| Reaching the sandbox | HTTPS host per port, public by default; no raw TCP or public IP | Public HTTPS and TCP through Fly Proxy, Anycast IPs, custom domains, private network | HTTPS URLs for up to 50 ports, token-protected by default; raw TCP; dedicated IPv6 or IPv4 |
| Desktop and computer use | No desktop; a headless Chromium template | None built in; you add a desktop and browser to your own image | Linux desktop streamed at 60fps, Chromium, computer use and browser control |
| Coding agents | Run your own agent through the command API | None built in; you install and run agents yourself | Claude Code, Codex and others preinstalled, with a prompt, steer and events API |
| Keeping keys out of the sandbox | Secrets passed in as environment variables | Secrets as environment variables; Fly's open-source tokenizer proxy you deploy yourself | Credentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out |
| CPU | 2 to 16 cores self-serve, up to 64 cores and 128 GB on Enterprise | Shared vCPUs guarantee 6.25% of a core plus bursts; performance vCPUs cost more | One CPU class, up to 16 vCPU / 32 GB, with no baseline quota or burst balance |
| Regions | A country hint steers scheduling, but placement is not guaranteed | 17 regions on six continents | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | CodeSandbox SDK | Fly.io Machines | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Yes | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Not published | No | Yes |
| Desktop GUI | No | No | Yes |
| Browser | No | No | Yes |
| Computer-use API | No | No | Yes |
| SSH | No | Yes | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | Yes | Yes | Yes |
| Automatic snapshots | Yes | Yes | Yes |
| Fork/clone | Yes | Yes | Yes |
| Live fork (no pause) | Yes | Yes | Yes |
| Memory fork | Yes | No | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | Yes | Yes | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | Yes | Yes |
| Public IPv4 | No | Yes | No |
| Egress allowlist | No | Yes | No |
| Secret proxy | No | No | Yes |
| Secret proxy for any API | No | No | Yes |
| Preinstalled agents | No | No | Yes |
| Agent harness API | No | No | Yes |
| MCP server | No | Yes | No |
| GPU | No | No | No |
| Windows | No | No | No |
| Arm64 | No | No | No |
| Self-hosting | No | No | No |
| BYOC | No | No | No |
| Open source | No | Yes | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Not published | No | Yes |
| Usage per sandbox (API) | No | No | Yes |
| Audit logs | Not published | Not published | No |
| SSO | Yes | No | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | No | Yes | No |
| EU data residency | No | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
There is no comparable CPU measurement for CodeSandbox SDK or Fly.io Machines; neither was part of the StarSling hpc-sandbox-benchmarks run. boat did 26.69 runs per second on that Node.js test at 4 vCPU / 8 GB, on dedicated AMD Ryzen 9 9950X hosts. On Fly, results would depend on whether you pick shared vCPUs, which guarantee 6.25% of a core, or performance vCPUs.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. CodeSandbox SDK and Fly.io Machines have no published run in this suite yet, so there is no like-for-like number to compare.
Pricing in five scenarios
Each bill is priced from the providers' public price lists by the open Battleships engine, with the cheapest plan that runs the scenario.
| Scenario | CodeSandbox SDK, a month | Fly.io Machines, a month | boat, a month |
|---|---|---|---|
| One coding agent, workdays 4 vCPU / 8 GB, 50 GB disk, 8 hours a day, 22 days a month, files kept between days | $193 · Scale | $15 · Pay As You Go · with limits | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $341 · Scale | $36 · Pay As You Go · with limits | $26 · $20/mo |
| 50 agents in parallel 50 machines of 4 vCPU / 8 GB at once, 8-hour sessions, 1,100 sessions a month, Docker inside | $2,500 · Scale | $487 · Pay As You Go · with limits | $317 · $20/mo × 3 seats |
| Sandboxes for your users 2 vCPU / 4 GB, 30,000 sessions of 10 minutes a month, up to 300 at once | $815 · Scale · with limits | $110 · Pay As You Go · with limits | $200 · $100/mo × 2 seats |
| 1,000 short jobs at once 2 vCPU / 4 GB, 1,000 at once, 3 minutes each, 200,000 jobs a month | $1,632 · Scale · with limits | $232 · Pay As You Go · with limits | $2,000 · $2000/mo · with limits |
CodeSandbox SDK: You buy VM credits and each size burns a fixed number per hour, billed per started minute while the VM runs, including idle time before it hibernates. The Scale plan adds a $170 monthly platform fee that is not usage credit.
Fly.io Machines: Fly bills each Machine per second while it runs, by CPU preset and memory, with no plan fee, and Volumes bill for their full size all month. The figures here use shared vCPUs bought in 1-year reservation blocks, the lowest rate Fly sells.
Fly.io Machines: Plans start at $20 a month, and the whole fee is usage credit spent per second on running sandboxes. A stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
CodeSandbox SDK's Scale plan allows 250 VMs at once, so 300 user sandboxes or 1,000 jobs at once need Enterprise, and its price for disk beyond 20 GB and for egress is not published. Fly is marked a compromise in every scenario: its lowest figures need a 1-year commitment and use shared vCPUs that are throttled above 6.25% of each core. For 1,000 short jobs at once none of the three fits, and boat queues starts even on the $2,000 plan.
| Scenario | CodeSandbox SDK | Fly.io Machines | boat |
|---|---|---|---|
| One coding agent, workdays |
|
| None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel |
|
| None that bite |
| Sandboxes for your users |
|
| None that bite |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use CodeSandbox SDK when
you run previews or code runs that sleep between visits, wake on the next HTTP request with their memory intact, or fork from a warm state, and you are fine building on what Together now calls its legacy SDK.
- Memory hibernation and wake on request. For runs used in short bursts: an idle VM sleeps with its memory and wakes on the next HTTP request.
- Forks from a warm state. For rollouts or test variants: fork a running or hibernated sandbox with its memory instead of booting again.
- A sandbox API, not a hosting kit. For teams that want sandboxes from any Dockerfile with a TypeScript SDK for terminals, commands, files and hosts.
Use Fly.io Machines when
you host web apps or light services that must run near users around the world, sleep between requests and wake on traffic.
- 17 regions worldwide. For work that must sit near users outside Europe, from the US to Sydney and Johannesburg.
- A full app platform. For hosting whole products: raw TCP, Anycast IPs, custom domains, private networking and port-level network policies.
- Per-second billing with no plan fee. For light services that mostly wait, cheap shared vCPUs billed per second, with no monthly platform fee.
Where boat fits
If what you are really running is coding agents that work for hours, both leave gaps you have to fill yourself. CodeSandbox SDK has no SSH, desktop or /dev/kvm, and Fly gives you an empty microVM whose root disk resets. boat gives each agent a full VM with those built in.
A whole machine with KVM and systemd
Android emulators and nested VMs need /dev/kvm, which neither CodeSandbox SDK nor Fly offers. Fly also has no systemd, and CodeSandbox SDK has no SSH, so tools that expect a normal Linux box need rewiring.
A disk that keeps everything
On Fly anything outside the one Volume can vanish on a restart, and the Volume bills for its full size around the clock. boat keeps the whole disk, saved every minute, and a stopped sandbox costs nothing.
Agents, desktop and keys built in
On both you build the agent harness, browser and desktop yourself, and keys sit in environment variables an agent can read. boat ships coding agents, a 60fps desktop and a credentials proxy; on Fly the tokenizer is yours to run.
Use boat when your agents do real work for hours: installs, builds, Docker and emulators on a full VM whose disk survives every stop, with a desktop, coding agents and a keys proxy built in. Compare it one to one: boat vs CodeSandbox SDK and boat vs Fly.io Machines.
Questions people ask
Is CodeSandbox SDK cheaper than Fly.io Machines?
No, Fly costs less in every scenario here, though it never fully fits. One agent on workdays is $193 a month on CodeSandbox SDK and $15 on Fly, and 50 agents in parallel are $2,500 against $487. Fly's figures use shared vCPUs on a 1-year reservation, which get throttled under steady load.
Which is faster, CodeSandbox SDK or Fly.io Machines?
Neither has a comparable CPU measurement, so there is no fair speed ratio. On Fly, speed depends on the CPU class: shared vCPUs guarantee 6.25% of a core, while performance vCPUs get the full core.
Can CodeSandbox SDK and Fly.io Machines run Docker?
Yes. CodeSandbox SDK builds sandboxes from any Dockerfile and runs Docker inside, and you can install Docker in a Fly Machine yourself. Neither offers /dev/kvm for nested VMs or Android emulators, which boat has on every machine.
Do they keep my files when a sandbox stops?
CodeSandbox SDK keeps the disk through hibernation, and archives hibernated VMs after about 7 days. A Fly Machine's root file system is ephemeral, so only its one Volume lasts. boat keeps the whole disk, saved every minute and on stop.
Is CodeSandbox SDK still maintained?
CodeSandbox is now part of Together AI. Together's docs call the CodeSandbox-based SDK deprecated and name together-sandbox as its successor, while self-serve sign-up still runs through CodeSandbox.
Is boat SOC 2 compliant?
SOC 2 is in progress. We're open about where we stand: live status at status.ascii.dev and our data retention policy at docs.boat.dev/data-retention.
Try boat
Install the CLI, then run boat new.
7-day free trial
More comparisons
- boat vs CodeSandbox SDK
- boat vs Fly.io Machines
- E2B vs CodeSandbox SDK
- Daytona vs CodeSandbox SDK
- Modal vs CodeSandbox SDK
- Vercel Sandbox vs CodeSandbox SDK
- Cloudflare Sandbox vs CodeSandbox SDK
- Blaxel vs CodeSandbox SDK
- Runloop vs CodeSandbox SDK
- Tensorlake vs CodeSandbox SDK
- Morph Cloud vs CodeSandbox SDK
- CodeSandbox SDK vs Northflank