CodeSandbox SDK vs Beam

CodeSandbox SDK gives each sandbox a Firecracker microVM that hibernates with its memory and wakes on the next HTTP request. Beam is a serverless GPU platform whose sandboxes are quick gVisor containers, with a separate line of CPU VMs.

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.

Self-hosting
Not offered

Beam

Beam is a serverless cloud for GPU inference, sandboxes and background jobs, built on its open-source runtime Beta9.

Beam runs functions, REST endpoints, task queues, pods, sandboxes and VMs on CPUs and GPUs, all from a Python or TypeScript SDK. A sandbox is a container isolated with gVisor that starts in a second or two, lives until you terminate it or its time to live runs out, and can be saved as a filesystem image or a memory snapshot. Beam VMs are a separate CPU product: a microVM with its own kernel, systemd and a root disk that stays when it stops. Much of Beam is a GPU serverless platform for AI teams.

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 workloadCodeSandbox SDK: price rankBeam: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
A software factory needs Docker, systemd, /dev/kvm and a disk that stays, which boat gives every sandbox; Beam sandboxes end with their time to live and CodeSandbox SDK documents no /dev/kvm.
178th of 367, with limits
$1,939 a month
69th of 367, with limits
$551 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
115th of 366, with limits
$651 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
Both fit short code runs: Beam ranks 8th with sandboxes that start in a second or two and end on a timer, and CodeSandbox SDK ranks 46th with VMs that hibernate between runs.
46th cheapest of 345
$642 a month
8th cheapest of 345
$117 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
Beam ranks 3rd and boat ranks 1st, while CodeSandbox SDK's Scale plan caps at 250 VMs at once, below the 300 this use case needs.
140th of 361, with limits
$1,707 a month
3rd cheapest of 361
$290 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 can fork a running VM that shares its memory, and Beam can restore a memory snapshot into new sandboxes, so both can branch rollouts from one warm state.
348th of 360, with limits
$3,861 a month
341st of 360, with limits
$939 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
13th cheapest of 364
$251 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
Both run CI jobs with Docker, but builds of Android apps or VM images need /dev/kvm, which boat has and neither CodeSandbox SDK nor Beam documents.
92nd cheapest of 377
$860 a month
12th cheapest of 377
$171 a month
4th cheapest of 377
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
A Beam VM keeps its root disk while stopped and costs no compute then, and boat saves the disk every minute and on stop; CodeSandbox SDK is a compromise here.
310th of 368, with limits
$240 a month
13th cheapest of 368
$21 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 CodeSandbox SDK nor Beam has a desktop for computer use, while boat streams a Linux desktop at 60fps with Chromium.
206th of 369, with limits
$691 a month
111th of 369, with limits
$237 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
195th of 367, with limits
$176 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
200th of 346, with limits
$131 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
193rd of 338, with limits
$7,390 a month
42nd of 338, with limits
$923 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
175th of 360, with limits
$155 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
Only Beam has GPUs, from RTX 4090 up to H100 and B200; CodeSandbox SDK and boat are CPU only.
Can't run itCheapest of 98
$458 a month
Can't run it
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Can't run itCan't run itCan't run it

Key features

FeatureCodeSandbox SDKBeamboat
IsolationFirecracker microVM with its own kernelgVisor container by default for sandboxes; separate Beam VMs are CPU microVMs with their own kernelFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
Nested virtualizationNot documentedNot documentedYes, /dev/kvm for Android emulators and VMs
Docker and systemdDocker and root; built from any DockerfileDocker inside sandboxes with docker_enabled; systemd only in Beam VMs, not in sandboxesDocker, systemd and root, like a normal Ubuntu server
LifetimeNo hard cap; hibernates after an idle timeout of up to one dayDefault 10 minutes; set -1 to run until you terminate itNo session cap on paid plans; you set the time to live
Pause and resumeHibernates with a memory snapshot; resumes with processes still runningA sandbox ends with its time to live unless you save an image or snapshot; a Beam VM keeps a 50 GiB root disk while stoppedDisk is saved every minute and on stop; resume boots the machine again
ForkFork a hibernated sandbox from its snapshot, or a running one sharing its memoryMemory snapshot of a running sandbox with its processes, restored into new sandboxesFork a running sandbox with its disk
Wake on requestYes; an HTTP request to a host wakes a hibernated VMNoNo; a stopped sandbox is started by API
Biggest machineUp to 16 cores / 32 GB on Scale, 64 cores / 128 GB on EnterpriseMaximum sandbox size not publishedUp to 16 vCPU / 32 GB on the $100 plan and above
GPUsNoGPU sandboxes and serverless GPUs up to H100, H200 and B200No, CPU only
Desktop and browserNo desktop; a headless Chromium templateNo desktop or browser productLinux desktop streamed at 60fps with Chromium and computer use
Inbound accessHTTPS host per port, public by default, signed tokens for private hosts; no raw TCP or public IPHTTPS URL per exposed port, public with no built-in auth; no raw TCP or dedicated IPHTTPS URLs for up to 50 ports, token-protected by default; raw TCP; dedicated IPv4 or IPv6
Coding agentsRun your own agent through the command APINone preinstalled; you install and run them through process execClaude Code, Codex and others preinstalled, with a prompt, steer and events API
Keeping API keys out of the sandboxSecrets passed in as environment variablesSecrets exposed as environment variables inside the sandboxCredentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out
Regions and self-hostingA country hint steers scheduling, not guaranteed; no self-hostingUS only; Beta9 runtime is AGPL-3.0 and free to self-host, or bring your own cloud for a feeEU only (Germany, Finland, France); no self-hosting
Every feature Battleships tracks (43)
FeatureCodeSandbox SDKBeamboat
Full VM (own kernel)YesNoYes
Docker insideYesYesYes
Nested virtualizationNoNoYes
RootYesYesYes
SystemdNot publishedNoYes
Desktop GUINoNoYes
BrowserNoNoYes
Computer-use APINoNoYes
SSHNoYesYes
Persistent diskYesYesYes
Pause/resumeYesNoYes
Automatic snapshotsYesNoYes
Fork/cloneYesYesYes
Live fork (no pause)YesYesYes
Memory forkYesYesNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesNoNo
Wake on requestYesNoNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoNoYes
Public IPv4NoNoNo
Egress allowlistNoYesNo
Secret proxyNoNoYes
Secret proxy for any APINoNoYes
Preinstalled agentsNoNoYes
Agent harness APINoNoYes
MCP serverNoYesNo
GPUNoYesNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoYesNo
BYOCNoYesNo
Open sourceNoYesNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedNot publishedYes
Usage per sandbox (API)NoNoYes
Audit logsNot publishedNot publishedNo
SSOYesNoNo
SOC 2YesYesNo
HIPAANoYesNo
EU data residencyNoNot publishedYes
Zero data retentionNot publishedNot publishedYes

Performance

CodeSandbox SDKNot measured
BeamNot measured
boat26.69 runs/s

There is no comparable CPU measurement for CodeSandbox SDK or Beam: neither has a result on the StarSling hpc-sandbox-benchmarks test, so we cannot say which is faster at CPU work. boat did 26.69 runs per second on that test at 4 vCPU / 8 GB, on dedicated AMD Ryzen 9 9950X hosts. Beam's own guide says its sandboxes cold-boot in 1 to 3 seconds.

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 Beam 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.

ScenarioCodeSandbox SDK, a monthBeam, 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$5 · Developer$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$341 · Scale$22 · Developer$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$410 · Team$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$191 · Team$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$259 · Team$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 the idle time before it hibernates. Scale adds a $170 monthly platform fee that is not usage credit, and a hibernated VM costs nothing.

Beam: Beam sandboxes bill per second for each CPU core and GiB of RAM until you terminate them or their time to live ends, and Beam VMs cost no compute while stopped. Team costs $89 a month plus usage, with no usage credit and no egress fees.

Beam: Plans start at $20 a month, and the whole fee is usage credit. You pay per second while a sandbox runs, and a stopped sandbox costs nothing and keeps its disk.

Limits in those scenarios

CodeSandbox SDK's Scale plan allows 250 VMs at once, so the user-sandboxes and 1,000-job scenarios do not fit it without Enterprise, and its price for disk beyond 20 GB and for egress is not published. Beam's Developer plan allows 30 CPU containers at once, so 50 parallel agents need Team, and Beam publishes no price for disk beyond what a VM includes. boat's start limits bite on bursts: at 1,000 short jobs at once its $2,000 plan queues starts, while Beam's Team plan fits.

ScenarioCodeSandbox SDKBeamboat
One coding agent, workdays
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • disk beyond 0 GiB: price unknown
None that bite
One agent that never stops
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • disk beyond 0 GiB: price unknown
None that bite
50 agents in parallel
  • egress price not published
  • disk beyond 0 GiB: price unknown
None that bite
Sandboxes for your users
  • Scale: max 250 concurrent
  • egress price not published
  • disk beyond 0 GiB: price unknown
None that bite
1,000 short jobs at once
  • Scale: max 250 concurrent
  • egress price not published
  • disk beyond 0 GiB: price unknown
  • max 2,400 starts/day (needs ~6,667)
  • max 600 starts/hour (needs ~1,000)
  • bursts above 90 starts/min are queued (a burst of 333 takes ~4 min to start)

Which one should you use?

Use CodeSandbox SDK when

your sandboxes sleep between visits and should wake on the next HTTP request with their memory intact, and you are fine building on what Together now calls its legacy SDK.

  • Memory hibernation and wake on request. For sandboxes that sleep between visits: an HTTP request wakes a hibernated VM with its processes still running.
  • Forks that share memory. Good for branching many runs from one warm state, by forking a running VM while it shares memory with its parent.
  • Bigger machines on Enterprise. Teams that need very large single machines can get up to 64 cores and 128 GB through Enterprise.

Use Beam when

your work needs GPUs, when you want quick short-lived sandboxes or low-cost CPU VMs in the US, or when you must self-host.

  • GPUs in the same platform. For work that needs a GPU, Beam offers GPU sandboxes and serverless GPUs from RTX 4090 up to H100, H200 and B200.
  • Quick sandboxes with outbound rules. Sandboxes start in a second or two, and you can block all outbound traffic or allow up to 10 CIDR ranges.
  • Open source and your own cloud. Its Beta9 runtime is AGPL-3.0 and free to self-host, and Beam can also run in your own cloud for a fee.

Where boat fits

If your agents work for hours on installs, builds, Docker, emulators and a browser, both CodeSandbox SDK and Beam leave pieces for you to build. boat gives every sandbox a full VM with /dev/kvm, systemd, a 60fps desktop, coding agents and a credentials proxy already set up. Pick Beam instead if you need GPUs, and CodeSandbox SDK if you need memory hibernation that wakes on request.

A full machine with /dev/kvm and systemd

Neither CodeSandbox SDK nor Beam documents /dev/kvm, so Android emulators and nested VMs cannot start, and a Beam sandbox has no systemd unless you move to its separate VM product.

Hosting that is private by default, plus raw TCP

Both serve HTTPS only, public by default, and Beam has no built-in auth on sandbox URLs. A database or game server an agent starts over plain TCP cannot be reached on either.

Agents, desktop and keys built in

On both you install the agent harness yourself, neither has a desktop for computer use, and API keys sit as environment variables inside a machine the agent controls, where one prompt injection can leak them.

Use boat when your agents do real work over hours or days: installs, builds, Docker, emulators and a browser on a full VM with the agent and its keys already set up. Compare it one to one: boat vs CodeSandbox SDK and boat vs Beam.

Questions people ask

Is CodeSandbox SDK cheaper than Beam?

No. Beam costs less in all five scenarios on this page, for example $22 against $341 a month for one agent that never stops, and $410 against $2,500 a month for 50 agents in parallel. CodeSandbox SDK's Scale plan also does not fit the two scenarios that need more than 250 VMs at once.

Which is faster, CodeSandbox SDK or Beam?

We have no comparable CPU measurement for either, so we cannot say. Beam's guide says its sandboxes cold-boot in 1 to 3 seconds, and CodeSandbox SDK resumes a hibernated VM from its memory snapshot.

Can CodeSandbox SDK and Beam run Docker?

Yes. CodeSandbox SDK runs Docker with root and builds sandboxes from any Dockerfile, and Beam supports Docker inside a sandbox with docker_enabled. boat runs Docker too, plus systemd and /dev/kvm for emulators and VMs.

Is a Beam sandbox a VM like CodeSandbox SDK?

Not by default. Beam's sandboxes are containers using gVisor, while each CodeSandbox SDK sandbox is a Firecracker microVM. Beam also sells separate CPU VMs with their own kernel and systemd.

Does either have GPUs?

Only Beam. It offers GPU sandboxes and serverless GPUs from RTX 4090 up to H100, H200 and B200. CodeSandbox SDK and boat are CPU only.

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.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons