Skip to main content

Templates

A template is the launch recipe an instance is deployed from: an image, a launch mode, ports, environment variables and an optional onstart script. See Templates for the concept and Launch modes for what each mode does.

List templates

curl -s "$SUPERHEAT_API/v1/templates?tab=recommended&mode=jupyter" \
-H "Authorization: Bearer $SUPERHEAT_KEY"

GET /v1/templates returns {"items": [...]}.

ParameterValuesDefaultReturns
tabrecommended, mine, recent, popular, serverlessrecommendedrecommended: Superheat's curated system templates. mine: templates owned by the active organization. recent: templates the organization has deployed, most recent first. popular: system and public templates by use count. serverless: a placeholder that returns no items.
modessh, jupyter, args, vmnoneOnly templates with that launch mode
archstringnoneOnly templates whose constraints.arch matches
cudastringnoneOnly templates whose constraints.cuda_min matches exactly
qstring, up to 200 charactersnoneCase-insensitive substring match on name, description or image

tab is a closed set: a value outside it is rejected with 422 and a validation list naming the parameter. mode, arch and cuda are free-form string matches — a value nothing uses returns an empty list rather than an error.

Template fields

{
"id": "b1f4a6d2-90c7-5e33-8a2b-1d7c4e0f9a56",
"hash_id": "th_4c9e21b7f0a35d68c1e47b902d6af38150c9b7e4a2d81f6035c9e7b402a1d8f6",
"name": "PyTorch (Jupyter)",
"description": "PyTorch with a JupyterLab notebook server, ready to open.",
"image": "vastai/pytorch",
"tag": "[Automatic]",
"docker_image": "vastai/pytorch",
"repo": null,
"href": null,
"launch_mode": "jupyter",
"args_str": null,
"onstart": null,
"env": [],
"ports": [
{"container_port": 8080, "protocol": "http", "label": "Jupyter", "public": true},
{"container_port": 22, "protocol": "tcp", "label": "SSH", "public": true}
],
"constraints": {"cuda_min": "12.1", "min_vram_mb": 8000, "recommended_disk_gb": 40},
"jupyter_dir": "/workspace",
"use_jupyter_lab": true,
"registry_user": null,
"has_registry_password": false,
"readme": null,
"visibility": "system",
"owner_org_id": null,
"created_by": null,
"use_count": 1420,
"coming_soon": false,
"sort_order": 2,
"is_active": true,
"created_at": "2026-05-02T09:14:00.000Z",
"updated_at": "2026-07-11T16:38:21.442Z",
"tags": ["Jupyter", "SSH", "CUDA 12.1", "Automatic"]
}
FieldTypeMeaning
iduuidStable identity. Pass this as template_id when you deploy.
hash_idstring, th_ prefixContent hash of the launch recipe. Re-minted whenever the recipe changes.
image, tag, docker_imagestringThe image, its tag, and the two joined. A tag of [Automatic] resolves to a CUDA-matched tag at launch.
launch_modessh, jupyter, args, vmHow the container is started
args_strstring or nullArguments for args mode
onstartstring or nullScript delivered to the container as the SUPERHEAT_ONSTART environment variable, never as a file
envarray{key, value, secret}. Secret values read back as null unless your organization owns the template.
portsarray{container_port, protocol, label, public} with protocol tcp, udp, http or https
constraintsobjectAny of cuda_min, cuda_max, min_vram_mb, arch, vm_capable, recommended_disk_gb, selectors
jupyter_dir, use_jupyter_labstring or null, booleanJupyterLab working directory and whether Lab is used
registry_user, has_registry_passwordstring or null, booleanPrivate registry username, and whether a password is stored. The password itself is never returned.
visibilitysystem, private, publicsystem templates are curated by Superheat and immutable through the API
owner_org_id, created_byuuid or nullOwning organization and author. Both are null on system templates.
use_count, coming_soon, sort_order, is_activeinteger, boolean, integer, booleanCatalog metadata
tagsarray of stringsFacet chips derived from the launch mode and constraints

Port behavior follows the launch mode: ssh templates carry container port 22, jupyter templates carry 22 and 8080, and every other port you declare is labeled as an app port.

The JupyterLab token is minted by the platform and passed down to the workload. You do not set it, and an env override named JUPYTER_TOKEN is ignored — the platform overlay always wins over renter-supplied environment variables.

Get one template

curl -s "$SUPERHEAT_API/v1/templates/b1f4a6d2-90c7-5e33-8a2b-1d7c4e0f9a56" \
-H "Authorization: Bearer $SUPERHEAT_KEY"

You can read system templates, public templates from any organization, and your own organization's private templates. Anything else returns 404 TEMPLATE_NOT_FOUND — including a private template belonging to another organization, which is reported as missing rather than forbidden.

Get a template by hash

curl -s "$SUPERHEAT_API/v1/templates/by-hash/th_4c9e21b7f0a35d68c1e47b902d6af38150c9b7e4a2d81f6035c9e7b402a1d8f6" \
-H "Authorization: Bearer $SUPERHEAT_KEY"

hash_id is the share and launch token. It is stable across cosmetic edits such as the name, description or readme, and is re-minted whenever the launch recipe changes — the image, tag, mode, args, onstart, env, ports, constraints, Jupyter settings or registry user.

Pin hash_id in a pipeline when you need the exact recipe you tested. If the owner changes the recipe, the old hash stops resolving with 404 TEMPLATE_NOT_FOUND, which is a loud failure rather than a silent switch to a different image. Pin id when you want to follow the template's edits. See Share and duplicate.

Duplicate a template

curl -s -X POST "$SUPERHEAT_API/v1/templates/b1f4a6d2-90c7-5e33-8a2b-1d7c4e0f9a56/duplicate" \
-H "Authorization: Bearer $SUPERHEAT_KEY"

Returns 201 with the new template. Duplicating is how you get an editable copy of a system template, since system templates cannot be modified.

Property of the copyValue
OwnerThe active organization
Visibilityprivate
Name<source name> (copy), with (copy 2), (copy 3) and so on if that name is taken
id and hash_idFreshly minted
Secret env valuesKept when your organization owned the source; blank when it did not
Private registry credentialsKept when your organization owned the source; dropped when it did not

Everything else — image, tag, launch mode, args, onstart, ports, constraints, Jupyter settings and readme — is copied as-is. Re-enter your own secrets and registry credentials on the copy before you deploy it.