Skip to content
Home

Templates

Templates define the runtime environment used when creating sandboxes. You can use official template references such as base, or build custom templates from Dockerfiles, images, or existing templates through the CLI or HTTP API.

GET /api/v1/templates

Query:

QueryDescription
visibilityOptional visibility filter.
limitMaximum number of templates.
offsetOffset pagination.
Terminal window
export SEACLOUD_API_BASE_URL="https://sandbox-service.real-cloud.seaart.ai/api/v1/sandbox"
curl -sS "$SEACLOUD_API_BASE_URL/templates?limit=20" \
-H "X-API-Key: $SEACLOUD_API_KEY"

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

GET /api/v1/templates/resolve/:ref

Use this to resolve official aliases, names, and tags to a stable templateID before pinning a production workflow.

MethodPathDescription
GET/api/v1/templates/:templateIDFetch template detail and optional build history.
DELETE/api/v1/templates/:templateIDDelete a template.

GET /templates/:templateID supports build-history pagination with limit and nextToken.

The preferred public flow is through the CLI. Backend integrations can call the same HTTP API directly:

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

Fetch template detail such as runtime mode, resource shape, workdir, storage policy, startup behavior, and readiness checks.

Underlying build endpoints:

MethodPathDescription
POST/api/v1/templatesCreate template metadata.
POST/api/v1/templates/:templateID/builds/:buildIDStart a build.
GET/api/v1/templates/:templateID/buildsList build history.
GET/api/v1/templates/:templateID/builds/:buildID/statusPoll status and optional logs.
GET/api/v1/templates/:templateID/builds/:buildID/logsRead build logs.
POST/api/v1/templates/:templateID/rollbackRoll back to a ready build.
MethodPathDescription
POST/api/v1/templates/tagsAssign tags to a template build target.
GET/api/v1/templates/:templateID/tagsList tags for a template.
DELETE/api/v1/templates/tagsRemove tags.