Start here
Quick example
curlshell
# 1. Create a Node.js session
curl -X POST https://api.mudbase.dev/api/sandboxes/projects/{projectId} \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"language":"node","languageVersion":"22","timeoutSeconds":300}'
# Response: { "sessionId": "...", "wsUrl": "...", "token": "...", "timeoutAt": "..." }
# 2. Run a command (SSE stream)
curl -N -X POST https://api.mudbase.dev/api/sandboxes/projects/{projectId}/sessions/{sessionId}/exec \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"cmd":["node","-e","console.log(42)"]}'# 1. Create a Node.js session
curl -X POST https://api.mudbase.dev/api/sandboxes/projects/{projectId} \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"language":"node","languageVersion":"22","timeoutSeconds":300}'
# Response: { "sessionId": "...", "wsUrl": "...", "token": "...", "timeoutAt": "..." }
# 2. Run a command (SSE stream)
curl -N -X POST https://api.mudbase.dev/api/sandboxes/projects/{projectId}/sessions/{sessionId}/exec \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"cmd":["node","-e","console.log(42)"]}'Supported runtimes
One API, eight languages. Pick the runtime you need when you create a session.
Core concepts
CELL
Sessions and Cells
Ephemeral sessions vs. named cells with persistent volumes.
EXECRun Commands
SSE streaming, keepalive, timeoutMs up to 300s.
FILESFiles
Batch-write up to 200 files; read any file up to 10 MB.
SVCServices
Start a long-running process and expose its port.
PLANPlans
Included hours, concurrency limits, and alwaysOn tiers.
APIREST API
Full OpenAPI reference with request and response schemas.
Client library examples
Generate from specNo published SDK package exists yet. Generate a typed client from the OpenAPI spec, or use the REST API directly. The examples below show the API shape of a generated client.
Generated client shape
import { CellsClient } from "mudbase-cells-sdk";
const cells = new CellsClient({
apiKey: process.env.CELLS_API_KEY,
projectId: process.env.CELLS_PROJECT_ID,
});
const session = await cells.sessions.create({
language: "node",
languageVersion: "22",
timeoutSeconds: 300,
});
const result = await cells.exec(session.sessionId, {
cmd: ["node", "-e", "console.log(42)"],
});
console.log(result.stdout); // "42"
await cells.sessions.close(session.sessionId);import { CellsClient } from "mudbase-cells-sdk";
const cells = new CellsClient({
apiKey: process.env.CELLS_API_KEY,
projectId: process.env.CELLS_PROJECT_ID,
});
const session = await cells.sessions.create({
language: "node",
languageVersion: "22",
timeoutSeconds: 300,
});
const result = await cells.exec(session.sessionId, {
cmd: ["node", "-e", "console.log(42)"],
});
console.log(result.stdout); // "42"
await cells.sessions.close(session.sessionId);from mudbase_cells import CellsClient
cells = CellsClient(
api_key=os.environ["CELLS_API_KEY"],
project_id=os.environ["CELLS_PROJECT_ID"],
)
session = cells.sessions.create(
language="python",
language_version="3.12",
timeout_seconds=300,
)
result = cells.exec(session.session_id, cmd=["python3", "-c", "print(42)"])
print(result.stdout) # "42"
cells.sessions.close(session.session_id)from mudbase_cells import CellsClient
cells = CellsClient(
api_key=os.environ["CELLS_API_KEY"],
project_id=os.environ["CELLS_PROJECT_ID"],
)
session = cells.sessions.create(
language="python",
language_version="3.12",
timeout_seconds=300,
)
result = cells.exec(session.session_id, cmd=["python3", "-c", "print(42)"])
print(result.stdout) # "42"
cells.sessions.close(session.session_id)Common issues
Exec appears to stop at 30s
A proxy may be closing the idle SSE connection. Keep commands under 30s or bypass the proxy.
Details Preview URL returns 502
Wait at least 10 seconds after starting a service before requesting its preview URL.
Fix Quota exceeded (402)
Monthly Small-hours allowance exhausted. See the limits page for upgrade options.
Limits API Reference
Complete reference for all Cells endpoints: authentication, rate limits, request and response schemas.
View API Reference