LelantosLelantos

Quickstart

Get a sandbox running in under 2 minutes.

Install the SDK

npm install @lelantos-ai/sdk

Get an API Key

Sign in to the Lelantos Dashboard and navigate to API Keys. Create a new key — it will start with lel_.

Create a Sandbox

import { LelantosClient } from "@lelantos-ai/sdk";

const client = new LelantosClient({
  apiKey: process.env.LELANTOS_API_KEY!,
});

const sandbox = await client.createSandbox({
  templateID: "base",
});

console.log("Sandbox ID:", sandbox.sandboxID);
console.log("URL:", sandbox.getURL());

Upload & Download Files

// Upload a file
await sandbox.uploadFile("/home/user/hello.txt", "Hello from Lelantos!");

// Download it back
const data = await sandbox.downloadFile("/home/user/hello.txt");
console.log(new TextDecoder().decode(data));

Manage Lifecycle

// Extend lifetime by 1 hour
await sandbox.refresh(3600);

// Pause to save resources (resume later)
await sandbox.pause();

// Resume when needed
await sandbox.resume();

// Clean up when done
await sandbox.kill();

Lifecycle Events

Retrieve lifecycle events for any sandbox — even after it has been killed.

const events = await sandbox.getLogs();
for (const ev of events.logs) {
  console.log(`[${ev.timestamp}] ${ev.line}`);
}
// [2026-03-06T10:00:52Z] sandbox.lifecycle.created
// [2026-03-06T10:00:52Z] sandbox.lifecycle.killed

Custom Templates

Build a custom template from a Dockerfile. Set cpuCount (1–8) and memoryMB (128–8192). Defaults: 2 vCPU, 512 MB.

const template = await client.createTemplate({
  dockerfile: "FROM python:3.12\nRUN pip install numpy pandas",
  alias: "data-science",
  cpuCount: 4,
  memoryMB: 2048,
});

console.log("Template:", template.templateID);
console.log("Build:", template.buildID);

// Check build status
const status = await client.getTemplateBuildStatus(
  template.templateID,
  template.buildID,
);
console.log("Status:", status.status); // "building" | "ready" | "error"

Use with cURL

All endpoints are documented in the API Reference.

# Create a sandbox
curl -X POST https://api.lelantos.ai/sandboxes \
  -H "X-API-Key: lel_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"templateID": "base"}'

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

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

Next Steps

On this page