# 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

| Feature | CodeSandbox SDK | E2B | Groundbox |
| --- | --- | --- | --- |
| Price, 2 vCPU · 4 GB | [$0.15 / hour](https://www.together.ai/pricing) | [$0.17 / hour](https://e2b.dev/pricing) | $0.08 / hour |
| Pause keeps memory | Not published | [Yes, memory and running processes](https://docs.e2b.dev/sandbox/persistence.md) | Yes, memory and disk |
| CI runners too | [No: the pricing page lists Code Sandbox and Code Interpreter only](https://www.together.ai/pricing) | [No: the pricing page lists sandboxes only](https://e2b.dev/pricing) | Yes, on the same key and bill |
| Isolation | [microVM](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | [Firecracker microVM](https://e2b.dev/) | Firecracker VM |
| Fork and snapshots | Not published | [Fork with memory and files; snapshots](https://docs.e2b.dev/sandbox/fork.md) | Fork a running sandbox; save points |
| Longest session | [Runs until stopped, unless a ttl is set](https://docs.together.ai/docs/together-code-sandbox.md) | [24 hours on Pro, 1 hour on Hobby](https://docs.e2b.dev/sandbox.md) | 720 hours, renewable |
| Self-host | Not published | [A single-node runtime (Apache-2.0); BYOC on Enterprise](https://docs.e2b.dev/byoc.md) | No |
| GPUs | Not published | [Not offered](https://e2b.dev/pricing) | Not offered |
| Largest size | [16 cores](https://docs.together.ai/docs/together-code-sandbox.md) | [8 vCPU](https://e2b.dev/pricing) | 16 vCPU |
| SDK languages | [Python and TypeScript](https://docs.together.ai/docs/together-code-sandbox.md) | [JavaScript / TypeScript and Python](https://docs.e2b.dev/) | TypeScript and Python |
| Security report | Not published | [SOC 2 Type II](https://e2b.dev/) | No SOC 2 report |
| Free to start | [Legacy SDK: a free Build plan](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | [A one-time $100 credit](https://e2b.dev/pricing) | $5 of usage, no card |
| Plans | [Legacy SDK: Build (free) and Scale plans; the new SDK is sold through Together's sales team](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | [Hobby $0 with a one-time $100 credit; Pro $150 / month plus usage](https://e2b.dev/pricing) | Free: everything, with $5 of usage. $20 / month: $20 of usage included, then pay as you go |
| CPU | [$0.0446 per vCPU-hour (Together)](https://www.together.ai/pricing) | [$0.000014 per vCPU-second ($0.0504 per vCPU-hour)](https://e2b.dev/pricing) | $0.04 per vCPU-hour, a dedicated core |
| Memory | [$0.0149 per GiB-hour (Together)](https://www.together.ai/pricing) | [$0.0000045 per GiB-second, billed apart from CPU](https://e2b.dev/pricing) | Included, up to 4 GB per vCPU |
| Billing | [Legacy SDK: VM credits at $0.01486 each, rounded up to the minute](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | Not published | Per second, no minimum |
| Sizes | [New SDK: 0.1 to 16 cores, 1 to 8 GB per CPU](https://docs.together.ai/docs/together-code-sandbox.md) | [1 to 8 vCPU, 1 to 8 GiB](https://e2b.dev/pricing) | 1 to 16 vCPU, up to 4 GB per vCPU |
| Sandboxes at once | [Legacy SDK: 10 on Build, 250 on Scale](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | [10 on Hobby, 100 on Pro](https://e2b.dev/pricing) | 20 once a card is on file |
| Egress controls | Not published | [Block all, or allow and deny lists by IP, CIDR or domain](https://docs.e2b.dev/sandbox/internet-access.md) | An allowlist of hosts per sandbox |

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](https://groundbox.dev/compare/codesandbox) and [Groundbox vs E2B](https://groundbox.dev/compare/e2b). Every other comparison is on [/compare](https://groundbox.dev/compare).

## Sources

### CodeSandbox SDK

- [Together: Code Sandbox (legacy CodeSandbox SDK)](https://docs.together.ai/docs/together-code-sandbox-legacy.md), checked 2026-11-19
- [Together: Code Sandbox](https://docs.together.ai/docs/together-code-sandbox.md), checked 2026-11-19
- [Together pricing](https://www.together.ai/pricing), checked 2026-11-20

### E2B

- [E2B pricing](https://e2b.dev/pricing), checked 2026-11-20
- [E2B home page](https://e2b.dev/), checked 2026-11-19
- [E2B docs](https://docs.e2b.dev/), checked 2026-11-19
- [E2B docs: sandbox](https://docs.e2b.dev/sandbox.md), checked 2026-11-20
- [E2B docs: persistence](https://docs.e2b.dev/sandbox/persistence.md), checked 2026-11-20
- [E2B docs: fork](https://docs.e2b.dev/sandbox/fork.md), checked 2026-11-19
- [E2B docs: internet access](https://docs.e2b.dev/sandbox/internet-access.md), checked 2026-11-19
- [E2B docs: BYOC](https://docs.e2b.dev/byoc.md), checked 2026-11-19

## Try the third option free.

[Start free, no card](https://groundbox.dev/signup)[Groundbox vs CodeSandbox SDK](https://groundbox.dev/compare/codesandbox)
