Comparison · checked

Ephemeral vs Modal Sandboxes

Modal Sandboxes are containers on Modal's serverless cloud that your code creates at runtime to execute LLM-generated or untrusted code, next to Modal's functions, GPUs and volumes, while the agent is yours to run. Ephemeral runs a complete background agent task instead: your prompt, files and allowed connections go in, a fresh microVM does the work with a budget reserved up front, and the machine is destroyed when it finishes.

As of October 22, 2026, Modal Sandboxes cost $0.00003942 per physical core-second and $0.00000667 per GiB-second of memory, on a Starter plan with no monthly fee and $30 of free credit a month, or a Team plan at $250 a month with $100 of credit[1]. Ephemeral charges $0.005 per run plus $0.0002 per second of run time, with model calls at the provider's price plus 15%, from prepaid credits with no subscription.

Side by side

FeatureEphemeralModal Sandboxes
Isolation unitA fresh microVM for every run, destroyed when the run ends. No machine, file or process is shared between runs.A container per Sandbox, isolated from the host with primitives such as gVisor or microVMs.[2]
Who runs the agent loopEphemeral. You send a prompt, input, files and the connections it may use; the agent runs inside the microVM with the model you choose and returns the output.You do, in your application or in an agent you install in the Sandbox. Your code creates the Sandbox and runs commands in it.[3]
CredentialsNever enter the machine. Ephemeral holds HTTP API and MCP server credentials, adds them outside the machine, allows only the HTTP methods or MCP tools you list, and removes credential values from responses.Modal Secrets as environment variables inside the Sandbox, or, in beta, an outbound policy that adds headers to HTTPS requests to given domains outside the Sandbox.[4]
Spending controlA hard budget per run, reserved from prepaid credits before it starts. A model call or web request that would go past it is refused.A workspace budget caps monthly spend; environment-level budgets come with the Team and Enterprise plans.[1]
SchedulingBuilt in: cron schedules in any IANA time zone start saved workflows.Scheduled Functions, with cron expressions in a chosen time zone, on the same platform as Sandboxes.[5]
CallbacksA signed POST (HMAC-SHA256) with the run to your server when the run finishes.None in the Sandboxes guide: your code waits for or polls the Sandbox and its processes.[3]
Zero data retentionA per-run setting: only model endpoints that neither keep nor train on requests, events deleted minutes after the run, output returned once. 10% more on the hosted service.Not applicable to Sandboxes: Modal does not make the agent's model calls. Your model provider's terms apply.[3]
Self-hostingA licensed edition in your own AWS account, from $490 a month or $4,900 a year (Team plan, 14-day free trial).None listed on the pricing page.[1]
Where it runsHosted in Japan, where run data is stored. The self-hosted edition runs in your own AWS account.Modal's cloud. Choosing a region costs 1.15 to 1.75 times the base prices.[1]
Pricing modelPrepaid credits from $5, no subscription and no free credit: $0.005 per run plus $0.0002 per second of run time, model calls at the provider's price plus 15%, $0.001 per web fetch and $0.015 per web search.Plan fee plus per-second usage: Starter $0 with $30 of credit a month, Team $250 a month with $100 of credit, Enterprise custom. Sandboxes: $0.00003942 per physical core-second (2 vCPU), $0.00000667 per GiB-second of memory.[1]
Longest session or run1 hour: the timeout is 1 to 3,600 seconds, 300 by default.5 minutes by default, up to 24 hours. Longer work continues from a filesystem snapshot in a new Sandbox.[3]
State between sessionsNone by design: every run starts clean. Its output and events are kept for 30 days; uploaded files stay until you delete them.Filesystem snapshots restore a Sandbox's files into a new one; volumes keep data between Sandboxes.[3]
GPUsNone in the machine. Models run at AI model providers; the microVM runs the agent and its tools.Yes, per second at standard GPU prices, from $0.000164 a second (T4) to $0.001972 a second (B300).[1]
Languages and SDKsAn HTTP API with an OpenAPI description, a CLI for macOS, Linux and Windows, and an MCP server. No language-specific SDK.Python, JavaScript/TypeScript and Go SDKs.[3]

The prices are not like for like. Modal Sandboxes's rates pay for the sandbox only: you run the agent loop, and its model calls are billed by your model provider. Ephemeral's run fee and per-second rate pay for the machine and the agent loop together, and model calls are billed through Ephemeral at the provider's price plus 15%. See the pricing page for an estimator and measured runs.

Which to choose

Choose Modal Sandboxes when…

  • Your stack already runs on Modal and you want sandboxes beside your functions, volumes and GPUs.
  • You need GPU sandboxes, or sessions of up to 24 hours.
  • You orchestrate everything from Python and want sandboxes as one more primitive in the same code.
  • You want scheduled functions, web endpoints and sandboxes on one platform.

Choose Ephemeral when…

  • You want the agent loop run for you: send a task, get the output, the events and the exact cost.
  • Credentials should never enter the machine, with HTTP methods and MCP tools allowed one by one, as a stable feature rather than a beta.
  • Each run needs a hard budget reserved before it starts, not only a monthly workspace cap.
  • Your server should hear about a finished run through a signed callback instead of waiting on it.
  • You need zero data retention for sensitive runs, run data stored in Japan, or a self-hosted edition in your own AWS account.

What this comparison does not cover

This page compares published features, limits and list prices as Modal Sandboxes and Ephemeral state them on October 22, 2026. It does not measure speed, start-up time or reliability, and it leaves out enterprise and negotiated pricing as well as Modal's functions, inference endpoints, notebooks and training in general, its region and non-preemptible multipliers beyond sandboxes, and its startup credits. Prices and plans change, so check the sources before you decide. If something here is wrong or out of date, tell us through the support page and we will correct it.

Sources

  1. https://modal.com/pricing, checked
  2. https://modal.com/docs/guide/security, checked
  3. https://modal.com/docs/guide/sandbox, checked
  4. https://modal.com/docs/guide/sandbox-secret-injection, checked
  5. https://modal.com/docs/guide/cron, checked

Ephemeral's side comes from its pricing page, whose prices it shows as they are today, and from its documentation on security and data, runs, connections, budgets and billing, schedules, callbacks, self-hosting, files and the CLI.

More comparisons

esc

Nothing matches “”.