Skip to content
Home

Sandbox Templates

Templates define the image, resources, env vars, startup behavior, and readiness checks used when a sandbox starts.

Use official templates for first runs. Pin a concrete template ID or promoted tag before production traffic.

Move from a general official alias to a concrete template when you need to:

  • install dependencies once instead of on every sandbox start
  • reuse source code or prebuilt application assets
  • pin versions of OS packages and language packages
  • define startup behavior and readiness checks
  • promote known-good runtime behavior through a concrete tpl-... ID or tag
GoalStart with
Shell commands and file operationsbase
Code interpreter and data analysiscode-interpreter or code-interpreter-lite
Node frontend or API servicenode or web-frontend
Python service or scriptspython
Browser automationbrowser
Coding agentscodex, claude, opencode, openclaw, amp, or openai-agents
API, MCP, scraping, or DevOps tasksapi-server, mcp-server, scraper, or devops
Production repeatabilityconcrete tpl-...

The public documentation exposes these official template types. Availability can differ by environment, so list templates in the target environment before pinning one. Templates returned by the API but not listed here should be treated as environment-specific or internal templates, not as public integration targets.

CategoryOfficial typeTypical CPU / memoryUse it for
Base runtimebase1 / 1024MBGeneral shell commands, file APIs, PTY sessions, git operations, and lightweight services.
Language runtimenode2 / 2048MBNode.js scripts, package installs, API services, and JavaScript/TypeScript build or test jobs.
Language runtimepython2 / 2048MBPython scripts, small services, data preprocessing, dependency checks, and test jobs.
Language runtimego2 / 4096MBGo build, test, CLI, and service workflows that need a prepared Go toolchain.
Web appweb-frontend2 / 4096MBFrontend previews, Vite/Next-style dev servers, and browser-openable web apps.
Code executioncode-interpreter2 / 4096MBMulti-language runCode workflows, data analysis, generated code execution, and artifact creation.
Code executioncode-interpreter-lite2 / 2048MBLighter code execution jobs where startup cost and smaller resource reservation matter more than headroom.
Browser and desktopbrowser2 / 4096MBBrowser automation, web inspection, screenshot capture, and UI workflows that need browser dependencies.
Browser and desktopdesktop4 / 8192MBComputer-use style tasks, GUI tools, and heavier interactive desktop workflows.
Agent runtimecodex2 / 4096MBCodex-style coding agents that need a prepared command, file, and development environment.
Agent runtimeclaude4 / 8192MBClaude coding-agent workflows that need larger memory headroom.
Agent runtimeopencode2 / 4096MBOpenCode-style coding agents and repository automation.
Agent runtimeopenclaw4 / 8192MBHeavier OpenClaw agent workflows.
Agent runtimeamp2 / 4096MBAMP-style coding or automation agents.
Agent runtimeopenai-agents2 / 4096MBWorkflows built around the OpenAI Agents SDK or agent tool orchestration.
Service runtimeapi-server2 / 2048MBSmall HTTP APIs, callback servers, and service prototypes that expose a port.
Service runtimemcp-server2 / 2048MBMCP server development, tool servers, and agent integration endpoints.
Automation runtimescraper2 / 2048MBScraping, extraction, and content collection jobs that need a prepared automation stack.
Automation runtimedevops2 / 2048MBShell-heavy automation, deployment checks, infrastructure scripts, and operational probes.
GET /api/v1/templates?visibility=official&limit=200
X-API-Key: <token>

Use the returned templateID, alias, or promoted tag when creating a sandbox:

const sandbox = await Sandbox.create("base", {
waitReady: true,
timeout: 1800,
});

Official aliases may move as templates are patched. Production workloads should prefer a concrete tpl-... ID or an explicitly promoted tag.

Projects with template build access can use the CLI or template API to build a reusable template from a Dockerfile, a prebuilt image, or an existing template:

Terminal window
seacloud template build my-template --dockerfile Dockerfile --cpu-count 2 --memory-mb 2048 --tag v1
seacloud template status <template_id> <build_id>
seacloud template logs <template_id> <build_id> --limit 100

After the build is ready, create sandboxes from the returned templateID, the template name, or a promoted tag. If the current account does not have build access, use a public official template or request a prepared platform template. Build logs and status are exposed through /api/v1/templates/:templateID/builds/:buildID/status and /api/v1/templates/:templateID/builds/:buildID/logs.

ModeMeaning
managedRuntime APIs are available on the runtime port, usually 9000.
plainThe image owns its foreground application process; platform health checks can still run.

workdir controls default process and file roots. Production templates should set it explicitly so commands, file APIs, and app startup agree on the same directory.

Use startCmd to start long-running application processes for future sandboxes. Use readyCmd to decide when a sandbox created from the template is usable.

Good readiness checks are local, bounded, and aligned with the port users will open:

Terminal window
wget -q -O- http://127.0.0.1:3000/ >/dev/null

Avoid checks that only prove a process exists but not that the app is ready:

Terminal window
ps aux | grep node

startCmd and readyCmd use shell semantics. The image should include /bin/sh, or the command should be written for the shell available in that image.

PatternRecommendation
HTTP appstartCmd starts the server; readyCmd curls the local app port.
Background workerreadyCmd checks a health file, PID, queue connection, or worker heartbeat.
Frontend previewBind 0.0.0.0; readyCmd checks 127.0.0.1:<port>; users open getHost(port).
Heavy dependency setupMove install steps into build RUN steps, not sandbox startup.
SymptomCheck
Sandbox never becomes runningRuntime mode, image entrypoint, readiness port, and health check configuration.
Sandbox starts but preview returns 502startCmd exited, wrong port, or app only binds localhost.
readyCmd times outThe service did not respond on the expected localhost port inside the sandbox.