Templates
A template is a saved pod or endpoint configuration: image, disks, ports, environment and start command. Launch from it instead of repeating the same flags.
Create a template
curl -X POST https://api.apipods.com/v1/templates \
-H "Authorization: Bearer $APIPODS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "pytorch-jupyter",
"type": "POD",
"visibility": "TEAM",
"image": "apipods/pytorch:2.9.0-py3.12-cuda12.8.1",
"containerDiskInGb": 50,
"volumeInGb": 100,
"volumeMountPath": "/workspace",
"ports": [
{
"port": 8888,
"protocol": "http"
},
{
"port": 22,
"protocol": "tcp"
}
],
"env": {
"JUPYTER_PASSWORD": "{{ secrets.JUPYTER_PASSWORD }}"
}
}'The template object
{
"id": "tpl_2w7q9k4x",
"object": "template",
"name": "pytorch-jupyter",
"type": "POD",
"visibility": "TEAM",
"image": "apipods/pytorch:2.9.0-py3.12-cuda12.8.1",
"registryCredentialId": null,
"startCommand": null,
"containerDiskInGb": 50,
"volumeInGb": 100,
"volumeMountPath": "/workspace",
"ports": [
{
"port": 8888,
"protocol": "http"
},
{
"port": 22,
"protocol": "tcp"
}
],
"env": {
"JUPYTER_PASSWORD": "{{ secrets.JUPYTER_PASSWORD }}"
},
"readme": "PyTorch 2.9 with JupyterLab on port 8888 and SSH on port 22.",
"createdAt": "2026-09-04T11:00:00Z",
"updatedAt": "2026-11-01T15:22:31Z"
}| Field | Values |
|---|---|
type | POD for pods, SERVERLESS for endpoints. A template can only be used for its type. |
visibility | PRIVATE (only you) or TEAM (everyone in your organization). |
readme | Markdown shown in the console when someone picks the template. |
Launch from a template
Pass templateId. Fields you set explicitly override the template, and env is merged key by key.
curl -X POST https://api.apipods.com/v1/pods \
-H "Authorization: Bearer $APIPODS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "tpl_2w7q9k4x",
"gpuTypeId": "NVIDIA_H100_80GB_SXM",
"env": {
"WANDB_PROJECT": "llama-ft"
}
}'Changing a template does not affect pods already created from it.
Private registries
To pull private images from Docker Hub, GHCR, ECR, GCR/Artifact Registry or any registry with basic auth, create a registry credential and reference its ID from the template, pod or endpoint as registryCredentialId.
curl -X POST https://api.apipods.com/v1/registry-credentials \
-H "Authorization: Bearer $APIPODS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "ghcr-acme",
"registry": "ghcr.io",
"username": "acme-bot",
"password": "ghp_…"
}'The response contains the credential ID (rcr_6w2m9q4k). The password is stored encrypted and never returned. See Templates API.
Official images
Apipods maintains images with CUDA, PyTorch, JupyterLab and sshd preinstalled, such as apipods/pytorch:2.9.0-py3.12-cuda12.8.1. They are cached on most hosts, so pods using them start faster. Browse them in the console under Templates → Official.