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 (managed)
Section titled “The catalog (managed)”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.
| Template | Contents |
|---|---|
python | Python 3 with a shell and common libraries; code runs via python3. |
node | Node.js with a shell; code runs via node. |
browser | A headful browser driven over CDP. |
python-ml | Python with common ML and data libraries preinstalled. |
pytorch-cpu | Python with PyTorch (CPU) ready to import. |
swe-requests | Python for HTTP-oriented tasks, with requests. |
swe-fastapi | Python with FastAPI. |
swe-flask | Python with Flask. |
tpl-rl-heavy-env | A 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):
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.
Bake your own (Pro)
Section titled “Bake your own (Pro)”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 → LiveSee 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
Section titled “The pool”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.
Next steps
Section titled “Next steps”- Live fork — prepare once, fork many.
- RL quickstart — register templates and drive rollouts from the SDK.
- Ready states — warm vs live-service bakes.