Create a template
Creates a reusable container-configuration preset — image, disk,
ports, env, registry, and mount settings — for pods and serverless
endpoints. Pass its ID as templateId to createPod or
createEndpoint, or spread its fields into the request body
directly. Returns the created template.
Authorizations
Runpod API key authentication. Generate an API key in the Runpod console and send it in the Authorization header as Bearer <api_key>. Keys are scoped to the permissions granted when created; requests may return 403 when a valid key lacks access to the requested resource or action.
Body
Reusable container configuration shared across templates, pods, and serverless endpoints. Adding a field here automatically propagates to all three resources.
Docker image reference
"runpod/pytorch:2.8.0-py3.11-cuda12.8.1"
1"My PyTorch Template"
Arguments passed to the container entrypoint
""
Container disk in GB (ephemeral, wiped on restart)
x >= 150
Exposed ports, formatted as port/protocol
Environment variables as key-value pairs
Container registry credential ID (for private images)
null
Storage mounts attached to a template. Templates support only a
single persistent mount today; any network property is rejected
with 422 by the schema validator.
PATCH semantics: omitting mounts or sending {} leaves the
existing mount unchanged.
Optional. Defaults to NVIDIA when omitted.
CPU, NVIDIA, AMD Provision SSH access in containers created from this template:
injects a PUBLIC_KEY environment variable carrying the
deployer's registered SSH public keys (PUT /v2/account/ssh-keys — with none registered the flag does
nothing), unless env already sets one. Only images that
honor the convention start sshd from it (all RunPod official
images do); direct SSH also needs a 22/tcp entry in
ports. Defaults to true when omitted, matching
console-created templates.
true
Start JupyterLab in containers created from this template:
injects a generated JUPYTER_PASSWORD environment variable,
unless env already sets one. Only images that honor the
convention start Jupyter from it (RunPod official images do);
expose 8888/http in ports to reach it. Defaults to true
when omitted, matching console-created templates.
false
Acceptable CUDA versions for containers created from this
template, as major.minor. Omit to accept any version — see
the same field on createPod for matching semantics.
Expanded into GPU pod and serverless endpoint creates; CPU
pods ignore it.
^\d+\.\d+$Response
Created
Reusable container configuration shared across templates, pods, and serverless endpoints. Adding a field here automatically propagates to all three resources.
Docker image reference
"runpod/pytorch:2.8.0-py3.11-cuda12.8.1"
Arguments passed to the container entrypoint
""
Container disk in GB (ephemeral, wiped on restart)
x >= 150
Exposed ports, formatted as port/protocol
Environment variables as key-value pairs
Container registry credential ID (for private images)
null
"tpl_abc"
"My PyTorch Template"
Storage mounts attached to a template. Templates support only a
single persistent mount today; any network property is rejected
with 422 by the schema validator.
PATCH semantics: omitting mounts or sending {} leaves the
existing mount unchanged.
Whether this template is for serverless workers (true) or pods (false)
false
Whether this template is visible to other Runpod users
false
Controls how the template is grouped and filtered in the Runpod console. It does not affect hardware selection, scheduling, or billing.
CPU— CPU-only workloadsNVIDIA— NVIDIA GPU workloadsAMD— AMD GPU workloads
CPU, NVIDIA, AMD Whether containers created from this template get SSH access provisioned at startup (PUBLIC_KEY env injection).
true
Whether containers created from this template start JupyterLab at startup (JUPYTER_PASSWORD env injection).
false
Acceptable CUDA versions for containers created from this template, as major.minor. Empty means any version. Expanded into GPU pod and serverless endpoint creates; CPU pods ignore it.