Documentation

getrollouts.dev is compatible with the E2B SDKs. Everything in the official E2B docs applies. This page covers the essentials and our specifics. See also the LangChain, LangGraph and Deep Agents guide, the comparison with E2B, runnable examples on GitHub and the machine-readable summary /llms.txt.

Quickstart

Create an account in the portal, top up and copy your API key. Then install the SDK and set two environment variables:

pip install e2b-code-interpreter        # Python
npm i @e2b/code-interpreter             # JavaScript / TypeScript

export E2B_API_KEY=e2b_...
export E2B_DOMAIN=getrollouts.dev

That's all. Every example from the E2B documentation works unchanged. If you set E2B_API_URL or E2B_SANDBOX_URL elsewhere, remove them.

Code interpreter

Stateful Python (and JavaScript) like a Jupyter notebook. Variables survive between calls.

from e2b_code_interpreter import Sandbox

with Sandbox.create() as sbx:                       # template: code-interpreter-v1
    sbx.run_code("import pandas as pd; df = pd.DataFrame({'a': [1, 2, 3]})")
    print(sbx.run_code("df['a'].sum()").text)       # 6

    ex = sbx.run_code("import matplotlib.pyplot as plt; plt.plot([1, 3, 2]); plt.show()")
    png_base64 = ex.results[0].png                  # charts come back as PNG

    js = sbx.run_code("const xs = [1, 2, 3]; xs.map(x => x * 2)", language="js")
import { Sandbox } from '@e2b/code-interpreter'

const sbx = await Sandbox.create()
const ex = await sbx.runCode('x = 21 * 2; x')
console.log(ex.text)   // 42
await sbx.kill()

Ready-made templates

These templates are available to every account. Start a sandbox by passing the name; you pay for the size listed.

TemplatevCPURAMUse
base2512 MiBCommands and files
code-interpreter-v122 GiBDefault of the code interpreter SDK
code-interpreter-8g28 GiBpandas and larger data sets in memory
code-interpreter-16g416 GiBHeavy data work, model inference on CPU
from e2b_code_interpreter import Sandbox

sbx = Sandbox.create("code-interpreter-8g")        # 2 vCPU, 8 GiB RAM
print(sbx.run_code("import os; os.cpu_count()").text)

Commands & files

The plain sandbox (base template) is a small Linux VM you control with commands and file operations.

from e2b import Sandbox

sbx = Sandbox.create(timeout=600)                   # seconds until auto-kill
print(sbx.commands.run("uname -a && nproc && free -m").stdout)

sbx.files.write("/home/user/data.csv", "a,b\n1,2\n")
print(sbx.files.read("/home/user/data.csv"))
blob = sbx.files.read("/home/user/data.csv", format="bytes")

h = sbx.commands.run("python3 long_job.py", background=True)   # returns immediately
sbx.kill()

Public URLs

Any port a process listens on is reachable over HTTPS at https://<port>-<sandbox-id>.getrollouts.dev.

sbx.commands.run("python3 -m http.server 8000", background=True)
print("https://" + sbx.get_host(8000))

Isolation & network

Every sandbox runs in its own Firecracker microVM with its own Linux kernel. Sandboxes share no kernel with each other or with the host.

Outbound internet access is open by default. Outbound SMTP (ports 25, 465, 587, 2525) and internal networks are always blocked. You can turn internet access off for a sandbox, or allow only the destinations you list:

from e2b import Sandbox

# no outbound internet at all
sbx = Sandbox.create(allow_internet_access=False)

# allowlist: only these hosts, all other outbound traffic is denied
sbx = Sandbox.create(network={
    "allow_out": ["pypi.org", "files.pythonhosted.org"],
    "deny_out": ["0.0.0.0/0"],
})

Sandboxes cannot reach each other, the hosts or any internal address directly: private address ranges are blocked for every sandbox, also between sandboxes of the same account. The only way into a sandbox from outside is its public URL. A port you serve is reachable by anyone who knows the URL; to restrict it, create the sandbox with allow_public_traffic set to False. Requests then need the sandbox's traffic access token in the e2b-traffic-access-token header. Running commands or reading files in a sandbox always requires its access token, which only your SDK client holds.

sbx = Sandbox.create(network={"allow_public_traffic": False})
sbx.commands.run("python3 -m http.server 8000", background=True)

url = "https://" + sbx.get_host(8000)
headers = {"e2b-traffic-access-token": sbx.traffic_access_token}   # without it: 403

Environment variables passed with envs are readable by any code inside the sandbox. Do not pass credentials that the agent should not be able to see.

Lifetime, pause & resume

Sandboxes are killed automatically when their timeout expires (default 5 minutes, up to 24 hours). Extend it while running, or pause a sandbox to keep its full state without paying for compute.

Paused sandboxes are kept for 30 days after their last pause (7 days on the free trial, 14 days once an account has run out of credit). Resume takes under a second; memory is loaded on demand, so a sandbox with several GB in use needs a few seconds until all of it is back. Resuming resets the timer. You get an email a week before deletion (2 days on the trial). Each account can keep up to 100 paused sandboxes and 200 GB of snapshots (trial: 5 and 20 GB).

sbx.set_timeout(3600)                 # extend to 1 hour from now
sbx.pause()                           # memory + disk kept, billing stops
sbx = Sandbox.connect(sandbox_id)     # resumes in well under a second
for s in Sandbox.list().next_items(): print(s.sandbox_id)

Custom templates

Pre-install packages so sandboxes start ready to work. Build once, then start sandboxes from the alias. Allowed sizes per sandbox:

vCPURAM
1512 MiB to 4 GiB
2512 MiB to 8 GiB
42 to 16 GiB
84 to 16 GiB
from e2b import Template, Sandbox

t = (Template()
     .from_template("code-interpreter-v1")
     .pip_install(["yfinance", "scikit-learn"]))

Template.build(t, alias="my-analyst", cpu_count=2, memory_mb=4096)

sbx = Sandbox.create("my-analyst")

Billing & limits

You pay $0.040 per vCPU-hour and $0.013 per GiB-hour of the size a sandbox was started with, per second while it runs. Paused and killed sandboxes cost nothing. Credit is prepaid in the portal; you get emails when it runs low.

Concurrent sandboxes50
Max. session length24 h
Max. size per sandbox8 vCPU / 16 GiB
Outbound SMTP (25, 465, 587, 2525)blocked

Higher limits on request.

Account & API keys

New here? Start a free trial in the portal: $2 credit, no card; trial limits (1 h sessions, 5 concurrent, 2 vCPU) apply until your first top-up. Sign in to the portal with your email address (one-time code). There you can see your balance and daily usage, top up, create new API keys and revoke old ones. Lost a key? Sign in and create a new one.

Support

Questions, limits or problems: support@getrollouts.dev. Please include your account ID (shown in the portal) and the sandbox ID if relevant.