AI code sandboxes for agents, priced per vCPU-hour

Alibaba Cloud lists the lowest managed rate (Economy class): $0.0137 (source: Alibaba Cloud Agent Sandbox billing overview) per vCPU-hour and $0.0069 (source: Alibaba Cloud Agent Sandbox billing overview) per GiB-hour, so a 2 vCPU / 4 GiB sandbox costs about $0.055 an hour. E2B, Daytona and Hopx all charge $0.0504 (source: E2B Pricing) and $0.0162 (source: E2B Pricing), about $0.17 an hour for the same box. Amazon Bedrock AgentCore Code Interpreter, Cloudflare Sandbox SDK / Containers, Tensorlake, Upstash and Vercel bill only active CPU, which is cheaper for agents that idle between tool calls. For untrusted, model-written code, pick a microVM: 13 of the 31 here give every sandbox its own kernel.

31 providers 70 vendor sources Checked Leaving E2B? See the alternatives

Lowest managed rate$0.0137 (source: Alibaba Cloud Agent Sandbox billing overview)/vCPU-hrAlibaba Cloud Agent SandboxEconomy class

IsolationBilling basisPause / resumePersistence / snapshotsSelf-hostGPUSOC 2Max session length
Alibaba Cloud Agent Sandbox$0.0137 (source: Alibaba Cloud Agent Sandbox billing overview)$0.0069 (source: Alibaba Cloud Agent Sandbox billing overview)VMwall clockYesYes————2026-11-09
Northflank Sandboxes$0.0167 (source: Northflank Pricing)$0.0083 (source: Northflank Pricing)Cloud Hypervisor microVMwall clockYesYesYesYesType IINo time limit (runs until deleted)2026-11-09
Prime Intellect Sandboxes$0.02 (source: Prime Intellect Sandboxes docs)$0.0125 (source: Prime Intellect Sandboxes docs)microVMwall clockYesYes—No—60 min default, no lifetime limit when set2026-11-09
Fly.io Sprites$0.0385 (source: Fly.io Sprites)$0.0219 (source: Fly.io Sprites)VM—YesYes——Type II—2026-11-09
Freestyle$0.0403 (source: Freestyle Pricing)$0.0129 (source: Freestyle Pricing)VMwall clockYesYes———No limit stated ("can run forever")2026-11-09
Together Code Sandbox$0.0446 (source: Together AI Pricing)$0.0149 (source: Together AI Pricing)——YesYes————2026-11-09
Beam$0.05 (source: Beam Pricing)$0.01 (source: Beam Pricing)—wall clock——YesYesType II—2026-11-09
Daytona$0.0504 (source: Daytona Pricing)$0.0162 (source: Daytona Pricing)containerwall clockYesYes—YesType II—2026-11-09
E2B$0.0504 (source: E2B Pricing)$0.0162 (source: E2B Pricing)Firecracker microVMwall clockYesYesYesNoType II1 h (Hobby), 24 h (Pro)2026-11-09
Hopx$0.0504 (source: Hopx Pricing)$0.0162 (source: Hopx Pricing)Firecracker microVMwall clock—Yes———No execution time limit ("hours, days, or weeks")2026-11-09
Tensorlake Sandboxes$0.07 (source: Tensorlake Pricing)$0.015 (source: Tensorlake Pricing)Firecracker microVMactive CPUYesYes—YesType II2 h (Free), 24 h (Usage Credits), unlimited (Pro)2026-11-09
Modal Sandboxes$0.071 (source: Modal Pricing)$0.024 (source: Modal Pricing)gVisorwall clock—Yes—YesType II5 min default, up to 24 h2026-11-09
Cloudflare Sandbox SDK / Containers$0.072 (source: Cloudflare Containers pricing)$0.009 (source: Cloudflare Containers pricing)microVMactive CPU—Yes——Type II—2026-11-09
Google Agent Platform Code Execution$0.085 (source: Google Cloud Agent Platform pricing)$0.009 (source: Google Cloud Agent Platform pricing)———Yes———State kept up to 14 days (configurable TTL)2026-11-09
Amazon Bedrock AgentCore Code Interpreter$0.0895 (source: Amazon Bedrock AgentCore Pricing)$0.0095 (source: Amazon Bedrock AgentCore Pricing)microVMactive CPU—————15 min default, extendable to 8 h2026-11-09
Upstash Box$0.10 (source: Upstash Box pricing)$0.00 (source: Upstash Box pricing)containeractive CPUYesYes——Type IIIdle timeout 1 h (Free), 6 h (Pay as you go), none (Keep Alive)2026-11-09
Runloop$0.108 (source: Runloop Pricing)$0.0252 (source: Runloop Pricing)VMwall clockYesYes——Type II—2026-11-09
Vercel Sandbox$0.128 (source: Vercel Sandbox pricing and quotas)$0.0212 (source: Vercel Sandbox pricing and quotas)Firecracker microVMactive CPUYesYes——Type II45 min (Hobby), 24 h (Pro/Enterprise) per session; persistent sandboxes resume indefinitely2026-11-09
Agent Sandbox on GKE (Google Cloud)——gVisor——Yes————2026-11-09
Azure Container Apps Dynamic Sessions——Hyper-Vsession-hour—————Ends after configurable cooldown with no activity2026-11-09
Blaxel—$0.0414 (source: Blaxel Pricing)microVMmemory while activeYesYes——stated (type not given)—2026-11-09
Claude Code Execution Tool (Anthropic)——containerwall clockYesYes———Containers expire 30 days after creation; checkpointed after ~5 min idle and restored on reuse2026-11-09
CodeSandbox SDK——Firecracker microVMwall clockYesYes————2026-11-09
Docker Sandboxes——microVM——YesYes———2026-11-09
Koyeb Sandboxes————Yes———stated (type not given)Auto-delete up to 24 h after creation (12 h after scale-to-zero)2026-11-09
Morph Cloud——VMbundled unitsYesYes————2026-11-09
OpenAI Containers (Code Interpreter / Hosted Shell)——VMwall clockNoNo———Expires after 20 minutes without use2026-11-09
Riza——WebAssemblyplan quota——Yes—Type I30 s per request (Hobby), 15 min (Pro)2026-11-09

Managed providers, cheapest vCPU-hour first. Switch to Self-host for runtimes you run on your own machines, or All for both, with the free open-source runtimes listed last. Every price is a list rate normalised to $/vCPU-hour and $/GiB-hour (how), and every price links to the vendor page it came from. A dash marks a figure the vendor keeps unpublished. Tick up to four rows to compare them.

E2B alternatives, by what the same sandbox costs

All 30 against E2B

One 2 vCPU / 4 GiB sandbox running for an hour, at each vendor’s published wall-clock rates. 7 managed providers list a lower price than E2B.

How the numbers are made

Full methodology

Every value comes from the vendor’s own pricing page, docs or GitHub repo: click any price to open the page it came from. Per-second rates are multiplied by 3,600; Modal’s per-core rate is halved because Modal defines one core as two vCPUs. Every number on the site is a published rate or plain arithmetic on two of them.

Each row shows the date we last checked it, newest 9 Nov 2026. Vendors and readers send corrections with a public source to hello@sandboxproviders.com, and the row updates with a new date.

Questions buyers ask

What is the best E2B alternative?

On price, Alibaba Cloud Agent Sandbox: $0.0137 per vCPU-hour and $0.0069 per GiB-hour on its Economy class, and it works with the E2B SDK, so moving over mostly means changing the endpoint. Northflank is next at $0.0167 and $0.0083, against E2B’s $0.0504 and $0.0162. A 2 vCPU / 4 GiB sandbox costs about $0.055 an hour on Alibaba, $0.07 on Northflank and $0.17 on E2B, and Northflank sessions have no time limit. Daytona and Hopx charge exactly E2B’s rates, and Daytona adds GPUs. Modal, Daytona, Northflank, Beam and Tensorlake all run GPU sandboxes, which E2B does not. The E2B alternatives table ranks all of them against E2B.

What isolation do AI code sandboxes use, and does it matter?

Most hosted sandboxes run each session in a microVM with its own kernel. E2B, Vercel, Tensorlake and the CodeSandbox SDK name Firecracker. Northflank uses Cloud Hypervisor. Modal uses gVisor by default and offers a VM runtime. Daytona runs containers by default with VM sandboxes as an option. Azure uses Hyper-V and Riza uses WebAssembly. It matters for untrusted, model-written code: a microVM or Hyper-V gives each sandbox its own kernel, gVisor intercepts system calls in user space, and a plain container shares the host kernel.

What does a code sandbox cost per hour?

E2B, Daytona and Hopx all list $0.0504 per vCPU-hour and $0.0162 per GiB-hour, so a 2 vCPU / 4 GiB sandbox costs about $0.17 for each hour it runs. Vercel bills only active CPU at $0.128 per hour plus provisioned memory at $0.0212 per GB-hour; its own 5-minute code-validation example costs about $0.009. The lowest managed list rate here is Alibaba Cloud Agent Sandbox at $0.0137 per vCPU-hour (Economy class), then Northflank at $0.0167 and Prime Intellect at $0.02. Model vendors price per container instead: Claude’s code execution tool costs $0.05 per container-hour after 1,550 free hours a month, and OpenAI’s 1 GB container $0.03 per 20 minutes.

How long can a sandbox run?

E2B: 1 hour on Hobby, 24 hours on Pro. Vercel: 45 minutes on Hobby, 24 hours on Pro per session, and persistent sandboxes resume indefinitely. Modal: up to 24 hours. AWS AgentCore Code Interpreter: up to 8 hours. Northflank: no time limit. Freestyle: “can run forever”.

Can I self-host a sandbox or keep data in my own cloud?

Self-host: E2B’s runtime is Apache-2.0 with Terraform and Kubernetes installs. microsandbox, Firecracker and kubernetes-sigs/agent-sandbox are Apache-2.0 too, and Riza, Beam and Northflank (Enterprise, air-gapped included) sell self-hosting. Bring your own cloud (the vendor runs it inside your account): E2B, Daytona, Runloop, Northflank and Beam.

Which sandboxes support GPUs?

Modal (gVisor runtime), Daytona (up to 8 GPUs, H100 to B300), Northflank (gVisor GPU sandboxes), Beam and Tensorlake (H100 at $3.95 an hour). E2B’s pricing page lists CPU-only sandboxes.

Which sandbox starts fastest?

Blaxel resumes a standby sandbox in under 25 ms with memory intact. For a fresh sandbox, Daytona publishes 90 ms, Hopx 100 ms and Freestyle 400 ms at p99. E2B, Modal, Vercel, Runloop, Cloudflare, AgentCore and Azure publish no cold-start figure, so the table leaves that cell empty.