CodeSandbox SDK vs Fly.io Machines

Both run Firecracker microVMs, but they are built for different jobs. CodeSandbox SDK is a sandbox SDK: VMs hibernate with their memory, wake on an HTTP request and fork from a warm state. Fly.io Machines are the building block of an app hosting platform that you set up as a sandbox yourself; Fly sells Sprites separately for agent sandboxes.

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 call it the deprecated 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 and mount one Volume at a time for data that must last. Fly Proxy can stop, suspend and wake Machines as traffic comes and goes. Machines themselves are an app-hosting building block; for agent sandboxes Fly also sells Sprites (see boat vs Sprites), so this page compares only the Machines product.

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. “32nd cheapest of 365” means 31 of the other 364 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 workloadCodeSandbox SDK: price rankFly.io Machines: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
CodeSandbox SDK fits with Docker on every VM and a 20 GB disk. On Fly you install Docker in your image and keep files on a Volume or with persist_rootfs. boat adds SSH, /dev/kvm and a 51 GB disk saved every minute.
32nd cheapest of 365
$3,731 a month
123rd of 365, with limits
$836 a month
5th cheapest of 365
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
50th cheapest of 361
$4,811 a month
186th of 361, with limits
$816 a month
6th cheapest of 361
$657 a month
Code interpreter bursts
100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month
Both fit short runs. CodeSandbox SDK wakes hibernated VMs with their memory. Fly bills per second with no plan fee, and shared CPU is cheap for code that mostly waits. boat's start limits make big bursts a compromise.
54th cheapest of 336
$642 a month
83rd of 336, with limits
$94 a month
189th of 336, 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
CodeSandbox SDK's Scale plan stops at 250 VMs at once. Fly's API takes about one create request per second per app, so big waves need pre-created Machines or several apps. boat allows 100 to 2,000 at once by plan, within per-plan start limits.
140th of 349, with limits
$1,707 a month
75th of 349, with limits
$600 a month
3rd cheapest of 349
$209 a month
RL rollouts
1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month
CodeSandbox SDK forks a running sandbox that shares memory, so rollouts branch from one warm state. Fly clones a Machine's config and forks its Volume, not the root file system.
341st of 349, with limits
$3,861 a month
52nd of 349, with limits
$2,838 a month
39th of 349, with limits
$2,000 a month
Agent evals
250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month
77th cheapest of 359
$1,335 a month
124th of 359, with limits
$457 a month
10th cheapest of 359
$200 a month
CI runners
40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month
CI keeps the CPU busy, which drains a shared Fly vCPU's burst balance; Fly's performance CPUs avoid that at a higher rate. CodeSandbox SDK sells fixed sizes per credit. boat runs CI jobs on full VMs with Docker and /dev/kvm.
96th cheapest of 374
$860 a month
154th of 374, with limits
$288 a month
2nd cheapest of 374
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
Fly gives you SSH into a Machine you leave on. CodeSandbox SDK connects through its SDK, with no SSH documented. boat is a plain VM with built-in SSH and a disk saved every minute.
316th of 371, with limits
$240 a month
160th of 371, with limits
$35 a month
19th cheapest of 371
$26 a month
Computer-use agents
50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month
Neither ships a desktop. On CodeSandbox SDK you add a VNC desktop to your own template; on Fly you add a desktop, a browser and a VNC stream to your own image. boat streams a built-in 60 fps desktop you can embed.
54th cheapest of 367
$1,236 a month
140th of 367, with limits
$173 a month
7th cheapest of 367
$200 a month
Browser-use agents
50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month
125th of 356, with limits
$741 a month
229th of 356, with limits
$90 a month
7th cheapest of 356
$200 a month
Scraping & bots (startup scale)
50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month
119th cheapest of 343
$871 a month
233rd of 343, with limits
$67 a month
6th cheapest of 343
$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's bill is lower here, and it can spread scrapers across 17 regions, billing only the seconds they run.
194th of 327, with limits
$7,390 a month
47th of 327, with limits
$1,232 a month
73rd of 327, with limits
$1,800 a month
Parallel red teaming
200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month
29th cheapest of 351
$505 a month
168th of 351, with limits
$63 a month
3rd cheapest of 351
$200 a month
GPU eval jobs
10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month
Not ranked: misses a requirementNot ranked: misses a requirementNot ranked: misses a requirement
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Not ranked: misses a requirementNot ranked: misses a requirementNot ranked: misses a requirement

Key features

FeatureCodeSandbox SDKFly.io Machinesboat
Kind of productSandbox SDK: VMs you create, hibernate, wake and fork from codeApp hosting platform; Machines are its microVMs with a REST API. Fly sells Sprites separately for agent sandboxesAgent sandbox: a full VM per agent, ready to use
IsolationFirecracker microVM, own kernelFirecracker microVM, own kernel, on Fly's own serversFull VM with its own kernel, on hosts dedicated to boat (AMD Ryzen 7 9700X and Ryzen 9 9950X); vCPUs are shared
Nested virtualizationNot documentedNot documented/dev/kvm on every machine, so Android emulators and VMs run inside
SSH and systemdTerminals, commands and files through the SDK; SSH and systemd not documentedRoot and SSH; Fly's own init by default, systemd as PID 1 not documentedBuilt-in SSH, root and systemd
Docker insideYes, on every VM, built from any DockerfileYes, if you install it in your imageYes, ready on every machine
Files20 GB disk per VM, kept through hibernation; more on request, price not publishedRoot file system resets on restart unless you turn on persist_rootfs; one Volume up to 500 GB with daily snapshots, billed for its full size all month51 GB disk on the default size, saved every minute and at each stop; kept at least 14 days while stopped
Sleep and wakeHibernates with a memory snapshot after an idle timeout (up to one day); resumes in about 0.5 to 2 s; an HTTP request can wake itFly Proxy stops or suspends idle Machines and wakes them on a request; memory kept for Machines up to 2 GBYou start and stop through the API; auto-stop is a timer; resume reboots from disk
ForkFork a hibernated sandbox from its snapshot, or a running one sharing its memoryClone copies a Machine's config; restore its Volume from a snapshot or fork the Volume; the root file system is not copiedFork a running sandbox from its last 1-minute snapshot, disk included
Desktop and browserHeadless Chromium template; you can install a VNC desktop in your own DockerfileNot built in; you add a desktop, a browser and a VNC stream to your own image60 fps desktop with Chrome, computer use and browser control, embeddable stream
Coding agentsYou install your own agent in the template and run it through the commands APINot built in on Machines; you install agents in your imageSeven harnesses installed, including Claude Code and Codex, driven by a prompt, steer and events API
Keeping keys out of the sandboxSecrets go in as environment variables; no credentials proxy documentedSecrets arrive as environment variables; you deploy Fly's open-source tokenizer proxy yourselfOptional AI credentials proxy ($1 a day plus $1 per 1,000 requests) for model providers and HTTPS APIs you register
Inbound trafficHTTPS host per port, public by default, signed tokens for private sandboxes; raw TCP not documentedPublic HTTPS and TCP through Fly Proxy, Anycast IPs, custom domains, private networkSSH, up to 50 HTTPS URLs per sandbox (token-gated by default), raw ports over public IPv6
Outbound rulesNo egress allowlist or static egress IP documentedNetwork policies allow chosen ports and protocols and deny the rest; static egress IP for $3.60 a monthOpen internet; filter inside the VM with nftables
RegionsA country hint steers scheduling, for example to Europe, but placement is not guaranteed17 regions on six continentsGermany, Finland and France; you cannot pick a region; no US or Asia region
Every feature Battleships tracks (43)
FeatureCodeSandbox SDKFly.io Machinesboat
Full VM (own kernel)YesYesYes
Docker insideYesYesYes
Nested virtualizationNo documented wayNot publishedYes
RootYesYesYes
SystemdNot publishedNot publishedYes
Desktop GUIWith your own setupNo documented wayYes
BrowserWith your own setupNo documented wayYes
Computer-use APINo documented wayNo documented wayYes
SSHNo documented wayYesYes
Persistent diskYesYesYes
Pause/resumeYesYesYes
Automatic snapshotsYesYesYes
Fork/cloneYesYesYes
Live fork (no pause)YesYesYes
Memory forkYesNo documented wayNo documented way
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo documented way
Wake on requestYesYesNo documented way
HTTPS preview URLsYesYesYes
Raw TCP inboundNo documented wayYesYes
Public IPv4No documented wayYesNo documented way
Egress allowlistNo documented wayYesNo documented way
Secret proxyNo documented wayNo documented wayYes
Secret proxy for any APINo documented wayNo documented wayYes
Preinstalled agentsNo documented wayNo documented wayYes
Agent harness APINo documented wayNo documented wayYes
MCP serverNo documented wayYesNo documented way
GPUNo documented wayNo documented wayNo documented way
WindowsNo documented wayNo documented wayNo documented way
Arm64No documented wayNo documented wayNo documented way
Self-hostingNo documented wayNo documented wayNo documented way
BYOCNo documented wayNo documented wayNo documented way
Open sourceNo documented wayYesNo documented way
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedNo documented wayYes
Usage per sandbox (API)No documented wayNo documented wayYes
Audit logsNot publishedNot publishedNo documented way
SSOYesNo documented wayNo documented way
SOC 2YesYesNo documented way
HIPAANo documented wayYesNo documented way
EU data residencyNo documented wayYesNo documented way
Zero data retentionNot publishedNot publishedYes

Performance

CodeSandbox SDKNot measured
Fly.io MachinesNot measured
boat28.06 runs/s

CodeSandbox SDK and Fly.io Machines are not in StarSling's run of 3 October 2026 (run 37073680030), so we cannot say which is faster at CPU work. Fly's shared vCPUs guarantee 6.25% of a core with a burst balance, and its performance vCPUs get the full core, so a result would depend on the CPU class. In that run boat did 28.06 V8 Web Tooling Benchmark runs per second at 4 vCPU / 8 GB, second of 15. Every boat sandbox in that run ran on an AMD Ryzen 9 9950X host; boat also places sandboxes on Ryzen 7 9700X hosts and does not promise a CPU model. For start time, ComputeSDK measured CodeSandbox SDK at 11.76 s median with 100 at once (6 November 2026); Fly and boat are not in ComputeSDK.

V8 Web Tooling Benchmark at a 4 vCPU / 8 GB target, runs per second, higher is better. Source: StarSling's run of 3 October 2026 (run 37073680030), median of 5 sandboxes. Providers ran on different hardware in different regions. StarSling gives a shared rank when the run cannot separate two providers. Every boat sandbox in this run ran on an AMD Ryzen 9 9950X host. boat also places some sandboxes on AMD Ryzen 7 9700X hosts, which this run did not measure. CodeSandbox SDK and Fly.io Machines are not in the public benchmarks we use, so we cannot say which is faster.

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. Start limits, per-start fees and plan minimums are in the price, boat's included.

ScenarioCodeSandbox SDK, a monthFly.io Machines, a monthboat, 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$8,800 · $2000/mo · with limits

CodeSandbox SDK: CodeSandbox SDK sells VM credits at $0.01486 each, and a 4 vCPU / 8 GB VM burns 20 an hour, about $0.30. Billing is per started minute while the VM runs, including idle time before it hibernates. A hibernated VM costs nothing. 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. The scenario figures use its lowest rate, shared vCPUs in 1-year reservation blocks, which guarantee 6.25% of each core. A performance-4x Machine with 8 GB, which gets the full cores, is $0.1833 an hour on demand. Volumes cost $0.15 per GB-month on their full size.

Fly.io Machines: Plans cost $20, $100, $500 or $2,000 a month. The whole plan price comes back as VM time for that month, and it does not carry over. A default sandbox costs $0.036 an hour, billed per second while it runs, busy or idle. A stopped sandbox has no compute charge, but saved snapshots above the included count and the AI credentials proxy still charge. The $20 plan includes 200 starts a day; extra starts cost $0.03 to $0.07.

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 an Enterprise plan; it publishes no price for disk beyond 20 GB or for egress, and Together's docs call this SDK deprecated. The table marks Fly as a compromise in every scenario: its lowest prices need a 1-year reservation and use shared vCPUs that guarantee 6.25% of each core, and its API takes about one create request per second per app. boat's plans allow 100 to 2,000 at once; at 1,000 jobs at once its $2,000 plan charges for starts above 90 a minute, refuses them above 270, and never queues a start.

ScenarioCodeSandbox SDKFly.io Machinesboat
One coding agent, workdays
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • different kind of product: app platform
  • files survive a stop only in one Fly Volume (root file system too with opt-in persist_rootfs): packages installed elsewhere reset
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
None for this scenario
One agent that never stops
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • different kind of product: app platform
  • files survive a stop only in one Fly Volume (root file system too with opt-in persist_rootfs): packages installed elsewhere reset
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
None for this scenario
50 agents in parallel
  • egress price not published
  • different kind of product: app platform
  • files survive a stop only in one Fly Volume (root file system too with opt-in persist_rootfs): packages installed elsewhere reset
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
None for this scenario
Sandboxes for your users
  • Scale: max 250 concurrent
  • egress price not published
  • different kind of product: app platform
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
None for this scenario
1,000 short jobs at once
  • Scale: max 250 concurrent
  • egress price not published
  • different kind of product: app platform
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
  • 2,400 starts/day included, paid above that (needs ~6,667)
  • 600 starts/hour included, paid above that (needs ~1,000)
  • starts above 90/min are paid, and starts above 270/min fail with 429

Which one should you use?

Use CodeSandbox SDK when

you want sandboxes that sleep between visits, wake on the next HTTP request with their memory, or fork from a warm state, and you accept that Together calls this SDK deprecated.

  • Built as a sandbox SDK. Useful if you want sandbox parts ready: hibernation, wake on request, forks and HTTPS hosts come with the SDK.
  • Forks that share memory. For branching many runs from one warm state: fork a running sandbox while it shares memory with its parent.
  • Memory kept on bigger machines. A VM up to 16 cores / 32 GB on Scale hibernates with its memory, where Fly keeps memory only for Machines up to 2 GB.

Use Fly.io Machines when

you host apps or light services near users around the world and are happy to build the sandbox parts yourself.

  • 17 regions worldwide. Useful if work must run near users outside the US and Europe: Fly runs Machines from Sydney to Johannesburg.
  • A full app platform around each Machine. Useful if you also host apps: Fly adds SSH, raw TCP, Anycast IPs, custom domains and a private network.
  • Pay only for the seconds you run. Useful for light or bursty work: Fly bills per second with no plan fee, and shared CPUs cost little when code mostly waits.

Where boat fits

If your agents do real work for hours, like installs, builds, tests, Docker and emulators, look at boat. It gives each agent a whole Linux machine with a disk saved every minute, plus a desktop and coding agents that CodeSandbox SDK and Fly Machines leave you to set up. boat does not keep memory across a stop, and it has no region outside Europe.

A whole Linux machine with /dev/kvm

Neither CodeSandbox SDK nor Fly documents /dev/kvm in a guest, so Android emulators and nested VMs are not a supported path. Neither runs systemd by default. boat has /dev/kvm, systemd and built-in SSH on every machine.

A disk with no setup

CodeSandbox SDK gives 20 GB per VM, with no published price for more. On Fly, lasting files go on one Volume billed for its full size, or on the root file system with persist_rootfs, which Fly says not to trust with critical data. boat saves a 51 GB disk every minute.

Agents and a desktop you drive from outside

On both you build an image with the browser, desktop and agents, then write the code that drives them. boat has them installed, with a prompt, steer and events API.

Use boat when your agents work for hours on builds, tests, Docker and emulators, and need a whole Linux machine with a disk saved every minute, a desktop and coding agents installed. Compare it one to one: boat vs CodeSandbox SDK and boat vs Fly.io Machines.

boat's own limits
  • Plans start at $20 a month. The plan price comes back as VM time for that month. Unused time does not carry over. Source
  • Starts (create, fork, resume): the $20 plan includes 12 a minute, 60 an hour and 200 a day. The $2,000 plan includes 90 a minute, 600 an hour and 2,400 a day. Extra starts cost $0.03 to $0.07. A start fails with 429 above 3 times the included starts per minute, or 6 times per hour or per day. Source
  • A stopped sandbox has no compute charge. boat keeps its disk for at least 14 days. A saved snapshot keeps it longer; extra saved snapshots and the AI credentials proxy are paid. Source
  • Auto-stop defaults to 1 hour. You can turn it off on a paid plan. The trial allows 2 hours at most. Source
  • boat saves the disk every minute and at each stop. Memory, running programs and /tmp are not saved: a resume is like a reboot. A machine failure loses writes after the last good snapshot. Source
  • Machines run in Germany, Finland and France only. Snapshot copies can be stored outside the EU. Source
  • Public IPv6 and outbound IPv4. No dedicated IPv4. The IP changes at each resume. Source
  • Hosts are AMD Ryzen 7 9700X and Ryzen 9 9950X. vCPUs are shared. No GPU. You cannot boot your own Docker image. Source

Questions people ask

Is CodeSandbox SDK cheaper than Fly.io Machines?

No. One agent running all month is $36 on Fly against $341 on CodeSandbox SDK, and 50 agents in parallel are $487 against $2,500. Fly's figures need a 1-year reservation and assume work within a shared vCPU's 6.25% baseline, so the table marks them as a compromise. boat is $26 and $317 for the same two.

Which is faster, CodeSandbox SDK or Fly.io Machines?

We cannot say: neither is in StarSling's run of 3 October 2026, where boat did 28.06 runs per second. Fly's shared vCPUs are throttled above 6.25% of each core, while its performance vCPUs get the full core at a higher rate.

Can CodeSandbox SDK or Fly.io Machines run Docker?

Both can. CodeSandbox SDK runs Docker on every VM, and on Fly you install Docker in your own image since a Machine gives you root. Neither documents /dev/kvm for Android emulators or nested VMs, which boat has on every machine.

Do CodeSandbox SDK and Fly.io Machines keep files when they stop?

CodeSandbox SDK keeps its 20 GB disk and its memory through hibernation. On Fly, lasting files go on one Volume with daily snapshots, or on the root file system with persist_rootfs. boat saves the disk every minute and at each stop and keeps it at least 14 days.

Which is better as an AI agent sandbox?

CodeSandbox SDK is built as a sandbox SDK, though Together now calls it deprecated. Fly.io Machines are an app hosting building block, so you package the tools, browser and agents yourself; Fly's own agent sandbox is Sprites. boat adds a full VM, a disk saved every minute and an API to drive agents inside.

Where do CodeSandbox SDK and Fly.io Machines run?

Fly runs Machines in 17 regions on six continents. CodeSandbox SDK takes a country hint, for example to Europe, but does not guarantee placement. boat runs on machines in Germany, Finland and France, and you cannot pick a region.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons