CodeSandbox SDK vs E2B: prices, limits and features.
CodeSandbox SDK lists the lower price for 2 vCPU and 4 GB: $0.15 / hour against $0.17 / hour. Here is where they differ, from each one's own pages, plus a third option if neither fits.
The short answer
The CodeSandbox SDK runs microVM sandboxes. Together AI now offers it as Together Code Sandbox and calls the old SDK legacy. E2B runs sandboxes for AI agents: Linux VMs started on demand from its SDKs.
Pick CodeSandbox SDK if you want
- a lower list price for 2 vCPU and 4 GB: $0.15 / hour against $0.17 / hour
- longest session: Runs until stopped, unless a ttl is set (E2B: 24 hours on Pro, 1 hour on Hobby)
- largest size: 16 cores (E2B: 8 vCPU)
Pick E2B if you want
- pause keeps memory: Yes, memory and running processes, which CodeSandbox SDK's pages do not state
- fork and snapshots: Fork with memory and files; snapshots, which CodeSandbox SDK's pages do not state
- self-host: A single-node runtime (Apache-2.0); BYOC on Enterprise, which CodeSandbox SDK's pages do not state
- security report: SOC 2 Type II, which CodeSandbox SDK's pages do not state
Or Groundbox if you want
- a lower list price than both: $0.08 / hour
- CI runners too: yes, on the same key and bill
Where CodeSandbox SDK or E2B is ahead of Groundbox: longest session, self-host, security report.
Side by side
a rust mark means that side is ahead · each value links to its source · checked 2026-11-20
Each against Groundbox: Groundbox vs CodeSandbox SDK and Groundbox vs E2B. Every other comparison is on /compare.
Sources
CodeSandbox SDK
- Together: Code Sandbox (legacy CodeSandbox SDK), checked 2026-11-19
- Together: Code Sandbox, checked 2026-11-19
- Together pricing, checked 2026-11-20
E2B
- E2B pricing, checked 2026-11-20
- E2B home page, checked 2026-11-19
- E2B docs, checked 2026-11-19
- E2B docs: sandbox, checked 2026-11-20
- E2B docs: persistence, checked 2026-11-20
- E2B docs: fork, checked 2026-11-19
- E2B docs: internet access, checked 2026-11-19
- E2B docs: BYOC, checked 2026-11-19