E2B Compatibility
Lelantos is a drop-in replacement for E2B. Migrate in minutes by changing the base URL and API key.
Lelantos implements the E2B API surface. Point your existing E2B SDK at Lelantos with minimal code changes.
Migration in Two Steps
- Get a Lelantos API key — sign up at lelantos.ai and create a key (starts with
lel_). - Change the domain — point the E2B SDK at
lelantos.aiinstead ofe2b.dev.
That's it. Your existing E2B code works with Lelantos.
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) # 0const result = await sandbox.commands.run("echo Hello && uname -s");
console.log(result.stdout); // Hello\nLinux
console.log(result.stderr); // (empty)
console.log(result.exitCode); // 0File 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
| Endpoint | Method | Status |
|---|---|---|
/sandboxes | POST | Compatible |
/sandboxes | GET | Compatible |
/sandboxes/:id | GET | Compatible |
/sandboxes/:id | DELETE | Compatible |
/sandboxes/:id/refreshes | POST | Compatible |
/sandboxes/:id/timeout | POST | Compatible |
/sandboxes/:id/pause | POST | Compatible |
/sandboxes/:id/resume | POST | Compatible |
/sandboxes/:id/logs | GET | Compatible |
/sandboxes/:id/metrics | GET | Compatible |
/templates | GET, POST | Compatible |
/templates/:id | GET, DELETE | Compatible |
/snapshots | GET, POST | Compatible |
Key Differences
| E2B | Lelantos | |
|---|---|---|
| Default timeout | 5 minutes | 24 hours |
| Billing | Per-minute | Per-second |
| Infrastructure | AWS (US) | Hetzner bare metal (EU/Germany) |
| Warm pool | — | 30 pre-warmed VMs, sub-90ms boot |
| GDPR | US-based | EU-native, data never leaves Germany |
| Resources | Fixed | Configurable 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.