Templates
A template stores an image, disks, ports, environment and start command so you can launch identical pods or endpoints. Registry credentials let templates, pods and endpoints pull private images.
The template object
| Name | Type | Description |
|---|---|---|
id | string | Unique ID, prefixed tpl_. |
object | string | Always template. |
name | string | Unique within the organization. |
type | enum | POD or SERVERLESS. Serverless templates ignore ports and volumeInGb. |
visibility | enum | PRIVATE (only you) or TEAM (everyone in the organization). |
image | string | Docker image reference. |
registryCredentialId | string | null | Credentials for a private registry. |
startCommand | string | null | Overrides the image's CMD. |
containerDiskInGb | integer | Container disk size. |
volumeInGb | integer | Volume disk size (pods only). |
volumeMountPath | string | Mount path of the volume (pods only). |
ports | array | Ports to expose (pods only). |
env | object | Environment variables, may reference {{ secrets.NAME }}. |
readme | string | null | Markdown shown in the console when launching. |
createdAt | string | ISO 8601 timestamp. |
updatedAt | string | ISO 8601 timestamp. |
{
"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"
}Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /templates | List templates |
| POST | /templates | Create a template |
| GET | /templates/{templateId} | Retrieve a template |
| PATCH | /templates/{templateId} | Update a template |
| DELETE | /templates/{templateId} | Delete a template |
| GET | /registry-credentials | List registry credentials |
| POST | /registry-credentials | Add registry credentials |
| DELETE | /registry-credentials/{registryCredentialId} | Delete registry credentials |
List templates
/templatesTemplates visible to you: your private templates plus all TEAM templates. Also includes Apipods-maintained templates when includeOfficial=true.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
type | query | enum | POD or SERVERLESS. |
includeOfficial | query | boolean | Include official templates (IDs start with tpl_ap). Default false. |
limit | query | integer | 1 to 100, default 20. |
cursor | query | string | Pagination cursor. |
Request
curl https://api.apipods.com/v1/templates?type=POD \
-H "Authorization: Bearer $APIPODS_API_KEY"Response
{
"object": "list",
"data": [
{
"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"
}
],
"hasMore": false,
"nextCursor": null
}Create a template
/templatesCreates a template. Pass templateId when creating a pod or endpoint to use it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
namerequired | body | string | Unique name. |
typerequired | body | enum | POD or SERVERLESS. |
imagerequired | body | string | Docker image. |
visibility | body | enum | Default PRIVATE. |
… | body | Any other field of the template object. |
Request
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,
"ports": [
{
"port": 8888,
"protocol": "http"
},
{
"port": 22,
"protocol": "tcp"
}
],
"env": {
"JUPYTER_PASSWORD": "{{ secrets.JUPYTER_PASSWORD }}"
}
}'Response
{
"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"
}| Status | When |
|---|---|
400 | invalid_parameter: a template with this name already exists. |
Retrieve a template
/templates/{templateId}Returns one template.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
templateIdrequired | path | string | The template ID. |
Request
curl https://api.apipods.com/v1/templates/tpl_2w7q9k4x \
-H "Authorization: Bearer $APIPODS_API_KEY"Response
{
"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"
}Update a template
/templates/{templateId}Updates a template. Existing pods and endpoints created from it are not changed; they copied the values at creation time.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
templateIdrequired | path | string | The template ID. |
Request
curl -X PATCH https://api.apipods.com/v1/templates/tpl_2w7q9k4x \
-H "Authorization: Bearer $APIPODS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image": "apipods/pytorch:2.9.1-py3.12-cuda12.8.1"
}'Response
{
"id": "tpl_2w7q9k4x",
"object": "template",
"name": "pytorch-jupyter",
"type": "POD",
"visibility": "TEAM",
"image": "apipods/pytorch:2.9.1-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-18T13:10:00Z"
}Delete a template
/templates/{templateId}Deletes a template. Pods and endpoints created from it keep running; their templateId stays set for reference.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
templateIdrequired | path | string | The template ID. |
Request
curl -X DELETE https://api.apipods.com/v1/templates/tpl_2w7q9k4x \
-H "Authorization: Bearer $APIPODS_API_KEY"Response
Returns 204 No Content with an empty body.
List registry credentials
/registry-credentialsReturns stored credentials. Passwords and tokens are write-only and never returned.
Request
curl https://api.apipods.com/v1/registry-credentials \
-H "Authorization: Bearer $APIPODS_API_KEY"Response
{
"object": "list",
"data": [
{
"id": "rcr_6w2m9q4k",
"object": "registry_credential",
"name": "ghcr-acme",
"registry": "ghcr.io",
"username": "acme-bot",
"createdAt": "2026-10-02T09:12:44Z",
"updatedAt": "2026-10-02T09:12:44Z"
}
],
"hasMore": false,
"nextCursor": null
}Add registry credentials
/registry-credentialsStores credentials for a private registry (Docker Hub, GHCR, ECR, GCR, Artifact Registry or any registry that supports basic auth). Use a read-only token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
namerequired | body | string | Display name. |
registryrequired | body | string | Registry host, e.g. ghcr.io or docker.io. |
usernamerequired | body | string | Registry username. |
passwordrequired | body | string | Password or access token. Write-only. |
Request
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_…"
}'Response
{
"id": "rcr_6w2m9q4k",
"object": "registry_credential",
"name": "ghcr-acme",
"registry": "ghcr.io",
"username": "acme-bot",
"createdAt": "2026-10-02T09:12:44Z",
"updatedAt": "2026-10-02T09:12:44Z"
}Delete registry credentials
/registry-credentials/{registryCredentialId}Deletes credentials. Running pods and workers keep their pulled image, but new pulls of a private image will fail.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
registryCredentialIdrequired | path | string | The credential ID. |
Request
curl -X DELETE https://api.apipods.com/v1/registry-credentials/rcr_6w2m9q4k \
-H "Authorization: Bearer $APIPODS_API_KEY"Response
Returns 204 No Content with an empty body.