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.
List Templates
Section titled “List Templates”GET /api/v1/templatesQuery:
| Query | Description |
|---|---|
visibility | Optional visibility filter. |
limit | Maximum number of templates. |
offset | Offset pagination. |
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.
Resolve Template
Section titled “Resolve Template”GET /api/v1/templates/resolve/:refUse this to resolve official aliases, names, and tags to a stable templateID before pinning a production workflow.
Get Or Delete Template
Section titled “Get Or Delete Template”| Method | Path | Description |
|---|---|---|
GET | /api/v1/templates/:templateID | Fetch template detail and optional build history. |
DELETE | /api/v1/templates/:templateID | Delete a template. |
GET /templates/:templateID supports build-history pagination with limit and
nextToken.
Build Template
Section titled “Build Template”The preferred public flow is through the CLI. Backend integrations can call the same HTTP API directly:
seacloud template build my-template --dockerfile Dockerfile --cpu-count 2 --memory-mb 2048 --tag v1seacloud template status <template_id> <build_id>seacloud template logs <template_id> <build_id> --limit 100Fetch template detail such as runtime mode, resource shape, workdir, storage policy, startup behavior, and readiness checks.
Underlying build endpoints:
| Method | Path | Description |
|---|---|---|
POST | /api/v1/templates | Create template metadata. |
POST | /api/v1/templates/:templateID/builds/:buildID | Start a build. |
GET | /api/v1/templates/:templateID/builds | List build history. |
GET | /api/v1/templates/:templateID/builds/:buildID/status | Poll status and optional logs. |
GET | /api/v1/templates/:templateID/builds/:buildID/logs | Read build logs. |
POST | /api/v1/templates/:templateID/rollback | Roll back to a ready build. |
| Method | Path | Description |
|---|---|---|
POST | /api/v1/templates/tags | Assign tags to a template build target. |
GET | /api/v1/templates/:templateID/tags | List tags for a template. |
DELETE | /api/v1/templates/tags | Remove tags. |