AI Sandbox Pricing, Compared: What Agent Sandboxes Cost and How the Billing Models Differ

AI Sandbox Pricing, Compared: What Agent Sandboxes Cost and How the Billing Models Differ

Author
Daniel Botha
Daniel Botha
Writer at Fly.io
Published

An AI agent sandbox costs between about $0.05 and $0.13 per vCPU-hour plus $0.009 to $0.044 per GB-hour of memory at published rates, a few cents for a typical agent session; what separates providers is whether you pay for wall-clock time on reserved resources, for CPU actually used, or against a plan allowance you may never fill.[1][2][3][4]


You are pricing an agent product. Every session gets its own sandbox: the agent writes code, runs the tests, waits on a model call, runs them again, and forty minutes later it is gone. You want a number per session, but every pricing page hands you different units to multiply, from reserved vCPU-seconds to Active CPU hours to a plan allowance. The mechanics of an agent sandbox are a separate question.

Key takeaways

  • Headline CPU rates cluster at $0.0504 per vCPU-hour on E2B and Daytona.[5] Vercel, Cloudflare and Modal list more, though two of the three bill only active CPU.[6] Fly.io Sprites charge $0.07 per CPU-hour actually consumed.
  • Agents spend most of their time waiting on model calls, so active and actual-usage billing gets cheaper as utilization drops. Wall-clock billing does not.

How Much Does an AI Agent Sandbox Cost?

A 2 vCPU, 4 GB sandbox costs roughly $0.10 to $0.34 an hour at the rates below, so a 45-minute session is eight to twenty-five cents of raw compute. Both ends are arithmetic on published rates, not a figure any vendor quotes: the low end is a usage-billed provider running a mostly idle agent, the high end the same shape fully loaded.

Two things matter more than the CPU rate. Memory dominates almost everywhere, because an agent waiting on a model call still holds its RAM. And the plan fee usually beats the compute: E2B Pro $150 a month,[1] Modal Team $250,[6] Vercel Pro $20,[2] Cloudflare’s Workers Paid $5.[3] At a few hundred sessions a month, the plan is the bill.


How Do AI Sandbox Billing Models Work?

Four shapes cover every provider here: wall-clock on reserved resources, active CPU, usage metering, and plan plus allowance. Which one you are on decides what to optimize.

Wall-clock billing on reserved resources

E2B and Daytona charge for the vCPUs and memory you reserved for every second the sandbox runs: hours × vCPUs × CPU rate + hours × GB × memory rate, the same number at 0% CPU as at 100%.[1][5] A stopped Daytona sandbox is billed for its reserved disk only, an archived one not at all.[7] Modal is a variant, charging whichever is higher, your request or your actual usage.[8] E2B’s answer to idle is the pause: billing stops the moment a sandbox is paused, killed or times out.[9] Fly.io vs E2B prices that pause.

Active CPU billing

Vercel Sandbox and Cloudflare Sandbox split the bill in two. The CPU line ticks only while a process is on the CPU, and Vercel excludes waiting on network requests, database queries or model calls; its memory is provisioned for the sandbox’s lifetime, in one-minute minimum increments.[2] Cloudflare meters active CPU the same way but sells fixed shapes, so the shape’s memory and disk bill as long as the container runs.[3] Fly.io vs Vercel works the split through a long run.

Usage metering

Fly.io Sprites meter what the VM consumed, not what it was allowed to: CPU is cumulative CPU time from cpu.stat, memory is actual usage in GB-hours, and storage bills hot while awake, cold while asleep.[4] Of a Sprite’s three states, running, warm and cold, only running is billed for compute, and the Sprite lifecycle docs put the idle window at about thirty seconds.[10]

Plan plus allowance

Cloudflare’s $5 Workers Paid plan includes 375 vCPU-minutes, 25 GiB-hours of memory and 200 GB-hours of disk a month before per-second rates apply.[3] Vercel Pro’s $20 is a credit usage draws against, and Modal’s Starter tier carries $30 a month in credits.[2][6] Sprites plans bundle CPU-hours, RAM GB-hours and storage, anything above at standard rates.[4] E2B’s $150 Pro differs in kind: it buys 100 concurrent sandboxes and 24-hour sessions, compute on top.[1]

What an idle sandbox costs

Idle is where the four shapes separate, and an agent waiting on a model call is idle by design. Wall-clock providers charge full price until you stop the sandbox.[1][5] Vercel keeps billing provisioned memory after the CPU line stops.[2] Sprites bill storage alone, at $0.000027 per GB-hour cold.[4]


AI Sandbox Pricing Compared: E2B, Daytona, Modal, Vercel, Cloudflare and Fly.io

Every published rate, per-second rates shown as their hourly equivalent. Cloudflare Sandbox is priced as the Cloudflare Containers it runs on; Modal’s row is its Sandboxes rate, higher than its rate for functions.

Provider CPU Memory Storage
E2B $0.0504/vCPU-hr $0.0162/GiB-hr included
Daytona $0.0504/vCPU-hr $0.0162/GiB-hr $0.000108/GiB-hr after 5 GiB
Modal Sandboxes $0.1419/physical core-hr (2 vCPU) $0.024/GiB-hr volumes $0.09/GiB-mo after 1 TiB
Vercel Sandbox $0.128/Active CPU-hr $0.0212/GB-hr provisioned, 1-min minimum snapshots $0.08/GB-mo
Cloudflare Sandbox $0.072/vCPU-hr, active only $0.009/GiB-hr $0.000252/GB-hr
Fly.io Sprites $0.07/CPU-hr, actually used $0.04375/GB-hr, actually used hot $0.000683/GB-hr, cold $0.000027/GB-hr

Each provider’s own pricing page: [1] [5] [6] [2] [3] [4]. Vercel’s rates are for its default iad1 region. Checked 2026-09-10.

Three rows need a note. Vercel couples memory to CPU at 2 GB per vCPU, Cloudflare bills the fixed shape’s memory and disk, and Modal prices a physical core, two vCPUs, so halve its number. Two of the six also publish infrastructure you can run yourself: E2B’s is Apache-2.0, deployed with Terraform on GCP and on AWS in beta,[11] while Daytona’s repository carries a June 2026 notice that core development moved to a private codebase, with no further updates.[12] Agent sandbox providers covers fit beyond price.


What Does a Real Agent Workload Cost?

The same shape at 100 sandbox-hours, 100 agents running an hour each. The ranking flips with utilization: an agent on the CPU a quarter of the time holding 1.5 GB, against one pinning both vCPUs and filling 4 GB.

Provider, 100 sandbox-hours at 2 vCPU / 4 GB 25% CPU busy, 1.5 GB used 100% CPU busy, 4 GB used
E2B $16.56 $16.56
Daytona $16.56 $16.56
Modal Sandboxes $23.79 $23.79
Vercel Sandbox $14.88 $34.08
Cloudflare Sandbox (standard-3, 2 vCPU / 8 GiB) $11.20 $22.00
Fly.io Sprites $10.06 $31.50

Our arithmetic on the rates above, not a figure any provider quotes, computed from [1] [5] [6] [2] [3] [4], and checked 2026-09-10. Plan fees, credits, allowances and Sprites storage excluded. Cloudflare has no 2 vCPU / 4 GiB shape, so its nearest one carries the memory and disk it includes.

Read the two columns as a utilization curve. E2B, Daytona and Modal are flat: reserved resources cost the same whether the agent is thinking or waiting. Vercel, Cloudflare and Fly.io slope, because the CPU line follows the workload, and on Fly.io so does memory. Vercel’s crossover against E2B sits near a third of CPU utilization; for Sprites it turns on memory, which is why Fly.io’s own guidance is that RAM almost always dominates.[4]

So “which sandbox is cheapest” is a question back: how busy is your agent? Neither column includes the plan floor, and at 100 concurrent sandboxes it is not optional: E2B’s Hobby tier caps you at 20, Vercel’s at 10.[1][2]


What Are the Hidden Costs of an AI Sandbox?

The costs that reach the invoice without appearing in the headline rate: memory you did not choose, plan floors, session caps, egress and snapshots.

  • Memory you did not choose. Vercel allocates 2 GB per vCPU and Cloudflare bills the shape’s memory, so buying CPU raises the memory line with it.[2][3]
  • Plan floors that buy limits, not compute. E2B’s $150 Pro and Modal’s $250 Team buy concurrency and longer sessions.[1][6] Daytona meters an organization-wide pool instead: 10 vCPUs, 10 GiB of RAM and 30 GiB of storage across all running sandboxes on its first tier.[13] Sprites pay as you go caps creation at 10 a minute.[4]
  • Session caps. E2B allows 1-hour sessions on Hobby and 24 hours on Pro; Vercel 45 minutes and 24 hours, resetting each time a sandbox stops and resumes.[1][2]
  • Egress. Vercel bills $0.15 per GB out of the sandbox and nothing on what it downloads.[2] Cloudflare bills $0.025 per GB after the first terabyte in North America and Europe.[3] Sprites bandwidth is not metered.[4]
  • Snapshots and cold storage. Vercel charges $0.08 per GB-month for snapshots, which expire 30 days after their last use.[2] Sprites cold storage works out near two cents a GB-month, and checkpoints are copy-on-write, keeping only the blocks that changed.[14]

AI Sandbox Pricing on Fly.io

Fly.io Sprites bill what a Sprite consumes: $0.07 per CPU-hour, $0.04375 per GB-hour of memory in use, and storage at $0.000683 per GB-hour hot (about $0.50 a GB-month), $0.000027 cold. Nothing is charged per Sprite and bandwidth is not metered. Fly.io’s own worked example, a four-hour Claude Code session averaging 30% of 2 CPUs and 1.5 GB, comes to $0.44.[4]

A Sprite pauses within seconds of the idle monitor seeing no activity, wakes on the next request and keeps its filesystem throughout,[10] so a fleet pays for the minutes agents work, not the hours their sandboxes exist. Plans are optional: Hero at $100 a month includes 1,200 CPU-hours, 4,800 RAM GB-hours, 150 GB of storage and 100 concurrently running Sprites.[4]

Fly Machines, for the half that never sleeps, are billed per second from $0.0082 an hour for a shared-cpu-1x with 1 GB of RAM, the full table published on the Machines pricing page.[15] Either half prices out before you deploy, in the Fly.io calculator.


Frequently Asked Questions

How much does an E2B sandbox cost?

E2B charges $0.0504 per vCPU-hour and $0.0162 per GiB-hour, per second on reserved resources. Hobby is $0 a month with a one-time $100 credit; Pro is $150 a month for 100 concurrent sandboxes and 24-hour sessions, plus compute. Fly.io Sprites charge $0.07 per CPU-hour actually used, and nothing for compute once a Sprite pauses.

How much does the Daytona sandbox cost?

Daytona charges $0.0504 per vCPU-hour, $0.0162 per GiB-hour and $0.000108 per GiB-hour of storage beyond the first 5 GiB, per second on reserved resources, with $200 in starter credits and no plan fee. A stopped sandbox is billed for its reserved disk only. Fly.io Sprites meter actual CPU and memory use instead.

How much does Vercel Sandbox cost?

Vercel Sandbox bills $0.128 per hour of Active CPU and $0.0212 per provisioned GB-hour in its default iad1 region, plus $0.15 per GB of egress and $0.08 per GB-month of snapshots, with Pro usage drawn against a $20 monthly credit. Fly.io Sprites also stop charging CPU while an agent waits.

How much does Cloudflare Sandbox cost?

Cloudflare Sandbox is priced as Cloudflare Containers: a $5 a month Workers Paid plan including 375 vCPU-minutes, 25 GiB-hours of memory and 200 GB-hours of disk, then $0.072 per vCPU-hour of active CPU, $0.009 per GiB-hour and $0.000252 per GB-hour of disk. Fly.io Sprites bill only what a Sprite uses, with no plan requirement.

Does an idle sandbox cost money?

Yes on most, and how much depends on the billing model. On E2B, Daytona and Modal a running sandbox costs full price however idle it is. On Vercel provisioned memory keeps billing after the CPU line stops. On Fly.io a Sprite pauses about thirty seconds after activity stops and then bills storage only.

Is there an open source sandbox for agents?

Yes. E2B publishes the infrastructure behind its cloud under the Apache-2.0 license, deployed with Terraform on GCP and AWS in beta. Daytona’s repository carries a June 2026 notice that core development moved to a private codebase. Self-hosting trades a per-second rate for a cluster you operate; Fly.io Sprites give hardware isolation with no cluster.

Is an AI sandbox cheaper than a VPS?

No, not always; the crossover is utilization. A fixed monthly server costs the same at 0% and 100% load, so an agent running a few sessions a day is cheaper on any per-second sandbox, while one busy around the clock costs more. Fly.io covers both: a Sprite that pauses when the agent stops, and a Fly Machine for the service that never does.

Sources

  1. ^ E2B, “Pricing”. e2b.dev/pricing. Checked 2026-09-10.
  2. ^ Vercel, “Vercel Sandbox pricing and quotas”. vercel.com/docs/vercel-sandbox/pricing. Checked 2026-09-10.
  3. ^ Cloudflare, “Containers pricing”. developers.cloudflare.com/containers/pricing. Checked 2026-09-10.
  4. ^ Fly.io, “Sprites: pricing and FAQ”. fly.io/sprites. Checked 2026-09-10.
  5. ^ Daytona, “Pricing”. daytona.io/pricing. Checked 2026-09-10.
  6. ^ Modal, “Pricing”. modal.com/pricing. Checked 2026-09-10.
  7. ^ Daytona, “Billing”. daytona.io/docs/en/billing. Checked 2026-09-10.
  8. ^ Modal, “Resource requests and limits”. modal.com/docs/guide/resources. Checked 2026-09-10.
  9. ^ E2B, “Billing”. docs.e2b.dev/billing. Checked 2026-09-10.
  10. ^ Fly.io, “Sprite lifecycle”. docs.sprites.dev/concepts/lifecycle. Checked 2026-09-10.
  11. ^ E2B, “e2b-dev/infra”. github.com/e2b-dev/infra. Checked 2026-09-10.
  12. ^ Daytona, “daytonaio/daytona”. github.com/daytonaio/daytona. Checked 2026-09-10.
  13. ^ Daytona, “Limits”. daytona.io/docs/en/limits. Checked 2026-09-10.
  14. ^ Fly.io, “Checkpoints”. docs.sprites.dev/concepts/checkpoints. Checked 2026-09-10.
  15. ^ Fly.io, “Pricing”. fly.io/docs/about/pricing. Checked 2026-09-10.