Skip to content

Templates

A template is the image a sandbox is forked from — a booted guest with your runtime and dependencies ready. You name a template on create, and Collimate forks a warm copy of it. Templates are content-addressed and layer-preserving: variants that share a base store and move only their diff.

The catalog is the ready-to-run image library on the managed cloud: every entry is already baked, so a create forks instantly — no build step. It is the whole story on the Demo tier: pick an id, create a sandbox.

TemplateContents
pythonPython 3 with a shell and common libraries; code runs via python3.
nodeNode.js with a shell; code runs via node.
browserA headful browser driven over CDP.
python-mlPython with common ML and data libraries preinstalled.
pytorch-cpuPython with PyTorch (CPU) ready to import.
swe-requestsPython for HTTP-oriented tasks, with requests.
swe-fastapiPython with FastAPI.
swe-flaskPython with Flask.
tpl-rl-heavy-envA heavier image for demanding RL environments.

Node, a headful browser over CDP, and the ML and SWE images above are all live in the catalog today.

List what your key can address with GET /v1/images (the SDK's client.images(); GET /v1/templates remains a working alias):

Terminal window
curl https://api.collimate.ai/v1/images \
-H "Authorization: Bearer $COLLIMATE_API_KEY"
{
"templates": [
{ "id": "python", "name": "python", "visibility": "public",
"tier": "demo", "description": "Python 3, ready to run" }
]
}

You may address templates your tenant owns plus public catalog rows; addressing another tenant's template returns 404 not_found (no existence leak). Catalog rows (visibility: "public") are platform-managed and not deletable — deleting a sandbox never requires deleting its image. Templates you baked are yours to remove: DELETE /v1/templates/{id} (the SDK's client.delete_template(id)) drains the pool and frees your quota.

Bringing your own OCI image is the Pro path: a bake turns the image into a ready-state artifact — booted, warmed, checkpointed — that the fleet forks from.

from collimate_rl import Ready, Template, connect
client = connect() # a col_pro_* key via COLLIMATE_API_KEY
handle = Template.bake(
client,
name="py-rollout",
image="ghcr.io/you/py-rollout@sha256:abc…", # pin by digest
ready=Ready(cmd="python -c 'import numpy'"), # warm state into the artifact
width=64, # the fan-out you expect — a hint, not a knob to manage
)
handle.wait(timeout=600) # Pending → Converting → Distributing → Live

See the Pro quickstart for the full bake → rollout-loop recipe.

For a bounded training session, client.env(ref, width=N) scopes a width declaration to a with block — capacity is ready before your first burst and released on exit (POST /v1/templates/{id}/expect / .../release on the wire). See the session lifecycle.

The pool of ready-to-fork spares is what makes create fast at fleet scale. It is platform-managed — you never size, warm, or drain it; capacity follows your workload, scaling up before a burst and back down when you go idle. You give the bake a width hint for the fan-out you expect, and the fleet does the rest.