Skip to main content
Use the GraphQL API to create and manage templates for Pods and Serverless endpoints. For the complete schema, see the GraphQL Spec.

Quick reference

Required fields

Templates require the following fields:
Template names must be unique. Creating a template with a name that already exists will fail.

Create a template

GPU Pod template

Serverless template

For Serverless templates, set volumeInGb to 0 and include isServerless: true.

Private container images

For private container images, use containerRegistryAuthId with the ID of your saved registry credentials from your Runpod settings.

Modify a template

Include the template id to update an existing template. The same mutation works for both GPU and Serverless templates.

Delete a template

Delete a template by name. The template must not be in use by any Pods or Serverless endpoints.
It can take up to 2 minutes to delete a template after its most recent use by a Pod or Serverless endpoint.

Create a secret

Secrets store sensitive values that can be referenced in templates.

Delete a secret

Delete a secret by its ID. You can find the secret ID from the secretCreate response or by querying your secrets.