Skip to content
use-cases / replace-e2b-bill / hero
CONTAINERS · AGENT SANDBOXES · COST

Replace the E2B bill with the bare metal you already rent

Your agent product spawns a sandbox per session. On E2B, Modal, Daytona, Runpod or Replicate that's per-second metered and the AI infra line on your P&L starts beating the LLM line. On Hoody, every session is a container on the server you already pay for. The 50,000th sandbox of the month costs the same as the first: zero marginal.

Containers API docs
use-cases / replace-e2b-bill / mechanism

Same five lines of agent code, different economics

The agent's mental model doesn't change. Spawn a sandbox, run code in it, throw it away. What changes is the bill underneath. On E2B every second of every sandbox is metered; on Hoody you POST a container against the server you already rent and the meter never starts.

agent-loop.ts · with E2B
BEFORE · METERED
// E2B SDK — per-second sandbox-seconds.import { Sandbox } from '@e2b/code-interpreter';// Each loop pass calls Sandbox.create().for (const session of sessions) { const sb = await Sandbox.create(); // ↳ meter starts here, ticks every second await sb.runCode(session.prompt); await sb.kill();}// 50,000 sessions × ~12s × $0.00031 = $186/mo, then more.
agent-loop.ts · with Hoody
AFTER · FLAT
// One POST against your already-paid-for server.const res = await fetch( 'https://api.hoody.com/api/v1/projects/$PID/containers', { method: 'POST', body: JSON.stringify( { server_id: $SID, name: 'rand' } ) });// Run code in the spawned container via Hoody Exec.await fetch(`https://exec-1.${cid}.hoody.com/run`, { method: 'POST' });// 50,000 sessions on the server you already rent: $0 marginal.

Both sides do the same job. The shape of the API matches — spawn, run, dispose. The price line is what flips: from per-second per-sandbox to per-server flat. Idle containers cost nothing on Hoody because they share the metal you already paid for.

use-cases / replace-e2b-bill / migration

How the port actually goes

The agent code barely changes. Three steps and the metered line on your P&L goes flat. The most expensive part is removing the SDK that used to charge you.

01 / SPAWN

Replace Sandbox.create with POST containers

Where you used to call the E2B SDK, you POST to /api/v1/projects/$PID/containers with a server_id. The response gives you a 24-character container id and a routable hostname. The container boots from your snapshot in seconds — same shape of object as a sandbox handle.

02 / RUN

Run code via Hoody Exec

Each container ships Hoody Exec — V8 isolates, file-based routing, magic comments for cors, timeout, and concurrency. Drop your runner script in scripts/1/, POST a payload, get JSON back. No webserver to wire, no Express, no Lambda config.

03 / DISPOSE

DELETE when done — or just leave them idle

Done with the session? DELETE /api/v1/containers/[id] and it's gone. Don't want to bother? Idle containers on Hoody share the metal — they sit at zero marginal cost until you DELETE them or until you spawn enough that the server fills up. No cleanup cron, no orphan bill.

use-cases / replace-e2b-bill / powers

What flat-rate sandboxes unlock

When the meter stops ticking, three things become free that used to be expensive — and your agent product starts behaving like the architecture you wished you could afford.

ECONOMICS

The 50,000th spawn costs the same as the first

On per-second meters, a viral week is a tax. On flat-rate metal, your spawn count detaches from your bill — it's bounded by the box's capacity, not by your invoice. You can let users hammer the agent without flinching.

RETENTION

Idle sessions get to stay alive

Per-second sandboxes have to die fast — every minute idle is money. On Hoody, idle is free, so a paused user can come back tomorrow and the container is still there with their state. Stickiness becomes free.

ISOLATION

Real Linux, not a V8 sandbox you're renting

Each container is its own real OS — kernel namespaces, full filesystem, its own URL. SSH in if you want. Mount /ramdisk. Install whatever apt package the agent needs. Same isolation as bare-metal, none of the per-second tax.

use-cases / replace-e2b-bill / capacity

What one box already gives you

Numbers from the Containers API and Hoody server quotas — not invented. The bare-metal slab does the heavy lifting; the API just hands out the slots.

  1. PER-SECOND METER$0.00

    There is no sandbox-seconds meter. Containers don't bill by the second; the server bills flat-rate. Every spawn, every retry, every idle minute is zero marginal cost on top of the box you already rent.

  2. CONTAINERS PER BOX100s

    KSM (Kernel Samepage Merging) and BTRFS copy-on-write let one server pack hundreds of containers — the second container costs only what differs from the first. Density depends on workload, but lightweight agent sessions stack thick.

  3. PER MONTH · FLAT$29+

    Hoody server pricing starts at $29/month in the marketplace and scales by spec and region, not by tenant count. The bill stops being a function of how many agents you spawn.

Container density depends on workload — lightweight sandboxes pack hundreds, GPU agents need more headroom. Server pricing is marketplace-driven and varies by region, CPU, RAM, and disk. The billing unit is the server — there is no per-spawn charge.

use-cases / replace-e2b-bill / punchline

Your agents stop renting compute by the second and start using compute that's already paid for.

rented · per-second meterrented · flat-rate server
WHAT THE METER LOOKED LIKE$0.00031 × sandbox-seconds × foreverscales with traffic · scales with retries · scales with idle
WHAT IT LOOKS LIKE NOWPOST /api/v1/projects/$PID/containersone server · flat-rate · no per-spawn charge
use-cases / replace-e2b-bill / replaces

What this replaces

The default sandbox-as-a-service stack charges you per-second per-sandbox. Same job, different bill. Specifically, this displaces:

  • E2B sandbox SaaSPer-second sandbox-seconds, scales with traffic
  • Modal Labs serverless GPUPer-second container metering, retries cost twice
  • Daytona dev sandboxesPer-workspace bill, idle isn't free
  • Runpod per-second computePer-second GPU and CPU billing on every spawn
  • Replicate per-second billingPer-second model + container time, even on cold start
  • Fly Machines per-secondPer-machine per-second, multiplied by every agent
use-cases / replace-e2b-bill / cta

Stop renting compute by the second. Use the compute you already paid for.

use-cases / replace-e2b-bill / related

Read the others