v1
latestOpenAPI 3.1.02026-07-2676123203.9 KBTemplates
Update a template
Partially updates a template. This is a PATCH: only the fields present in the body are changed; omitted fields are left untouched. See UpdateTemplateRequest for the full body.
Mutable fields: name, image, args, disk, ports, env, registry, mounts, serverless, public, and category.
Only the template's owner can update it (authenticated via the request's API key); other users' templates are neither visible nor mutable. Returns 200 with the full updated template. Pods and endpoints already created from this template are not changed retroactively — the template is a snapshot applied at creation time.
patch/v2/templates/{id}
Request body
Example request
{
"image": "runpod/pytorch:2.8.0-py3.11-cuda12.8.1",
"disk": 50,
"ports": [
"8888/http",
"22/tcp"
],
"env": {
"JUPYTER_PASSWORD": "hunter2"
},
"mounts": {
"persistent": {
"size": 20,
"path": "/workspace"
}
}
}Response
OK
Example response
{
"category": "NVIDIA",
"containerDiskInGb": 50,
"dockerEntrypoint": [],
"dockerStartCmd": [],
"earned": 100,
"env": {
"ENV_VAR": "value"
},
"id": "30zmvf89kd",
"imageName": "runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04",
"isRunpod": true,
"isServerless": true,
"name": "my template",
"ports": [
"8888/http",
"22/tcp"
],
"volumeInGb": 20,
"volumeMountPath": "/workspace"
}