LelantosLelantos

E2B Compatibility

Lelantos implements the E2B REST API surface. Sandbox lifecycle (create, kill, timeout) is compatible. SDK command execution and process streaming are not yet supported.

Lelantos implements the E2B REST API surface for sandbox lifecycle management. You can create, list, kill, and set timeouts on sandboxes using the E2B SDK or REST API.

Not a drop-in replacement yet. SDK features that connect directly to the sandbox VM — commands.run(), process.start(), files.read()/files.write(), and getLogs() — are not fully compatible. Use the Lelantos REST API (/sandboxes/{id}/exec, /sandboxes/{id}/files) for those operations, or wait for full SDK parity.

Migration in Two Steps

  1. Get a Lelantos API key — sign up at lelantos.ai and create a key (starts with lel_).
  2. Change the domain — point the E2B SDK at lelantos.ai instead of e2b.dev.

Quick Start

from e2b import Sandbox

sandbox = Sandbox.create(
    template="base",
    api_key="lel_your_key_here",
    api_url="https://lelantos.ai",
    domain="lelantos.ai",
)

sandbox.files.write("/hello.txt", "Hello from Lelantos!")
content = sandbox.files.read("/hello.txt")
print(content)

sandbox.kill()
import { Sandbox } from "e2b";

const sandbox = await Sandbox.create({
  template: "base",
  apiKey: "lel_your_key_here",
  apiUrl: "https://lelantos.ai",
  domain: "lelantos.ai",
});

await sandbox.files.write("/hello.txt", "Hello from Lelantos!");
const content = await sandbox.files.read("/hello.txt");
console.log(content);

await sandbox.kill();

Before & After

# Before (E2B)
from e2b import Sandbox
sandbox = Sandbox.create(api_key="e2b_key")
sandbox.files.write("/hello.txt", "Hello!")
sandbox.kill()

# After (Lelantos) — add api_url and domain
from e2b import Sandbox
sandbox = Sandbox.create(
    template="base",
    api_key="lel_key",
    api_url="https://lelantos.ai",
    domain="lelantos.ai",
)
sandbox.files.write("/hello.txt", "Hello!")
sandbox.kill()
// Before (E2B)
import { Sandbox } from "e2b";
const sandbox = await Sandbox.create({ apiKey: "e2b_key" });
await sandbox.files.write("/hello.txt", "Hello!");
await sandbox.kill();

// After (Lelantos) — add apiUrl and domain
import { Sandbox } from "e2b";
const sandbox = await Sandbox.create({
  template: "base",
  apiKey: "lel_key",
  apiUrl: "https://lelantos.ai",
  domain: "lelantos.ai",
});
await sandbox.files.write("/hello.txt", "Hello!");
await sandbox.kill();

Run Commands

result = sandbox.commands.run("echo Hello && uname -s")
print(result.stdout)   # Hello\nLinux
print(result.stderr)   # (empty)
print(result.exit_code) # 0
const result = await sandbox.commands.run("echo Hello && uname -s");
console.log(result.stdout);   // Hello\nLinux
console.log(result.stderr);   // (empty)
console.log(result.exitCode); // 0

File Operations

# Write
sandbox.files.write("/tmp/data.txt", "some data")

# Read
content = sandbox.files.read("/tmp/data.txt")

# List
entries = sandbox.files.list("/tmp")
for entry in entries:
    print(entry.name)
// Write
await sandbox.files.write("/tmp/data.txt", "some data");

// Read
const content = await sandbox.files.read("/tmp/data.txt");

// List
const entries = await sandbox.files.list("/tmp");
for (const entry of entries) {
  console.log(entry.name);
}

REST API (No SDK)

For full control without the E2B SDK:

import os
import requests

API_KEY = os.environ["LELANTOS_API_KEY"]
BASE = "https://api.lelantos.ai"
headers = {"X-API-Key": API_KEY, "Content-Type": "application/json"}

# Create
resp = requests.post(f"{BASE}/sandboxes", headers=headers, json={"templateID": "base"})
sandbox_id = resp.json()["sandboxID"]

# List
sandboxes = requests.get(f"{BASE}/sandboxes", headers=headers).json()

# Kill
requests.delete(f"{BASE}/sandboxes/{sandbox_id}", headers=headers)
const API_KEY = process.env.LELANTOS_API_KEY;
const BASE = "https://api.lelantos.ai";
const headers = { "X-API-Key": API_KEY, "Content-Type": "application/json" };

// Create
const resp = await fetch(`${BASE}/sandboxes`, {
  method: "POST", headers, body: JSON.stringify({ templateID: "base" }),
});
const { sandboxID } = await resp.json();

// List
const sandboxes = await fetch(`${BASE}/sandboxes`, { headers }).then(r => r.json());

// Kill
await fetch(`${BASE}/sandboxes/${sandboxID}`, { method: "DELETE", headers });
# Create
curl -X POST https://api.lelantos.ai/sandboxes \
  -H "X-API-Key: lel_your_key" \
  -H "Content-Type: application/json" \
  -d '{"templateID": "base"}'

# List
curl https://api.lelantos.ai/sandboxes -H "X-API-Key: lel_your_key"

# Kill
curl -X DELETE https://api.lelantos.ai/sandboxes/SANDBOX_ID \
  -H "X-API-Key: lel_your_key"

API Endpoint Compatibility

EndpointMethodStatusNotes
/sandboxesPOSTCompatible
/sandboxesGETCompatible
/v2/sandboxesGETCompatibleIncludes paused sandboxes
/sandboxes/:idGETCompatible
/sandboxes/:idDELETECompatible
/sandboxes/:id/refreshesPOSTCompatible
/sandboxes/:id/timeoutPOSTCompatible
/sandboxes/:id/pausePOSTCompatibleIn-memory freeze; not durable across node restarts
/sandboxes/:id/resumePOSTCompatible
/sandboxes/:id/logsGETPartialReturns lifecycle events, not process stdout/stderr
/sandboxes/:id/metricsGETCompatible
/templatesGET, POSTCompatible
/templates/:idGET, DELETECompatible
/snapshotsGET, POSTCompatible

SDK Feature Gaps

The following E2B SDK features require a direct connection to the sandbox VM and are not yet fully supported:

SDK FeatureStatusWorkaround
commands.run() / process.start()Not workingUse POST /sandboxes/{id}/exec REST endpoint
files.read() / files.write()Not workingUse GET/POST /sandboxes/{id}/files REST endpoint
sandbox.getLogs()PartialReturns lifecycle events only, not process stdout/stderr
autoPause on timeoutWorkingSandbox is frozen on expiry
Pause durabilityLimitedPaused sandboxes are lost on node restart

Key Differences

E2BLelantos
Default timeout5 minutes24 hours
BillingPer-minutePer-second
InfrastructureAWS (US)Hetzner bare metal (EU/Germany)
Warm pool30 pre-warmed VMs, sub-90ms boot
GDPRUS-basedEU-native, data never leaves Germany
ResourcesFixedConfigurable per template (1-8 vCPU, 128-8192 MB)

If your E2B code relies on US-based infrastructure or E2B-only features not listed above, test thoroughly before migrating production workloads.

On this page