> ## Documentation Index
> Fetch the complete documentation index at: https://runpod-b18f5ded-public-endpoints.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Pod Templates

## Explore Templates

You can explore Templates managed by Runpod and Community Templates in the **[Explore](https://www.console.runpod.io/explore)** section of the Web interface.

You can explore Templates managed by you or your team in the **[Templates](https://www.console.runpod.io/user/templates)** section of the Web interface.

Learn to create your own Template in the following section.

## Creating a Template

Templates are used to launch images as a Pod: within a template, you define the required container disk size, volume, volume path, and ports needed.

### Web interface

<Frame caption="">
  <img src="https://mintcdn.com/runpod-b18f5ded-public-endpoints/aN-KoxscwBtUq-cO/images/bb5f3a75-8418b2b-image-c1402cbb80aedf75f02c7eb9159ead1b.png?fit=max&auto=format&n=aN-KoxscwBtUq-cO&q=85&s=756795bb6c33ee1e2a39273093630e8b" width="969" height="706" data-path="images/bb5f3a75-8418b2b-image-c1402cbb80aedf75f02c7eb9159ead1b.png" />
</Frame>

### cURL

You can also create or modify a template using the Runpod API.

```sh theme={"system"}
curl --request POST \
  --header 'content-type: application/json' \
  --url 'https://api.runpod.io/graphql?api_key=${YOUR_API_KEY}' \
  --data '{"query": "mutation { saveTemplate(input: { containerDiskInGb: 5, dockerArgs: \"sleep infinity\", env: [ { key: \"key1\", value: \"value1\" }, { key: \"key2\", value: \"value2\" } ], imageName: \"ubuntu:latest\", name: \"Generated Template\", ports: \"8888/http,22/tcp\", readme: \"## Hello, World!\", volumeInGb: 15, volumeMountPath: \"/workspace\" }) { containerDiskInGb dockerArgs env { key value } id imageName name ports readme volumeInGb volumeMountPath } }"}'
```

### Environment variables

Environment variables in Runpod templates are key-value pairs that are accessible within your pod. Define a variable by setting a name with the `key` and then what it should contain with the `value`.

Use environment variables to pass configuration settings and secrets to your container. For example, environment variables can store the path to a database or API keys used by your application.

<Frame caption="">
  <img src="https://mintcdn.com/runpod-b18f5ded-public-endpoints/aN-KoxscwBtUq-cO/images/0f78b378-b7670dd-image-21c924ef5c5c98aff2a8e7ff87f21f39.png?fit=max&auto=format&n=aN-KoxscwBtUq-cO&q=85&s=490c5763206bebde5f06690c15c56c1c" width="947" height="381" data-path="images/0f78b378-b7670dd-image-21c924ef5c5c98aff2a8e7ff87f21f39.png" />
</Frame>

Runpod also provides a set of predefined [environment variables](/pods/references/environment-variables) that provide information about the pod, such as the unique identifier for your pod (`RUNPOD_POD_ID`), the API key used to make Runpod API calls to the specific pod (`RUNPOD_API_KEY`), the name of the host server the pod is running on (`RUNPOD_POD_HOSTNAME`), and more.

You can references [Secrets](/pods/templates/secrets) in your Pod templates.
