Skip to main content
POST
/
templates
Create a new template
curl --request POST \
  --url https://rest.runpod.io/v1/templates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "category": "NVIDIA",
  "containerDiskInGb": 50,
  "containerRegistryAuthId": "<string>",
  "dockerEntrypoint": [],
  "dockerStartCmd": [],
  "env": {
    "ENV_VAR": "value"
  },
  "imageName": "<string>",
  "isPublic": false,
  "isServerless": false,
  "name": "<string>",
  "ports": [
    "8888/http",
    "22/tcp"
  ],
  "readme": "",
  "volumeInGb": 20,
  "volumeMountPath": "/workspace"
}'
{
  "category": "NVIDIA",
  "containerDiskInGb": 50,
  "containerRegistryAuthId": "<string>",
  "dockerEntrypoint": [],
  "dockerStartCmd": [],
  "earned": 100,
  "env": {
    "ENV_VAR": "value"
  },
  "id": "30zmvf89kd",
  "imageName": "runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04",
  "isPublic": false,
  "isRunpod": true,
  "isServerless": true,
  "name": "my template",
  "ports": [
    "8888/http",
    "22/tcp"
  ],
  "readme": "<string>",
  "runtimeInMin": 123,
  "volumeInGb": 20,
  "volumeMountPath": "/workspace"
}

Authorizations

Authorization
string
header
required

Body

application/json
imageName
string
required
name
string
required
category
enum<string>
default:NVIDIA
Available options:
NVIDIA,
AMD,
CPU
containerDiskInGb
integer
default:50
containerRegistryAuthId
string
dockerEntrypoint
string[]
dockerStartCmd
string[]
env
object
Example:
isPublic
boolean
default:false
isServerless
boolean
default:false
ports
string[]
Example:
readme
string
default:""
volumeInGb
integer
default:20
volumeMountPath
string
default:/workspace

Response

category
string
Example:
containerDiskInGb
integer
Example:
containerRegistryAuthId
string
dockerEntrypoint
string[]
Example:
dockerStartCmd
string[]
Example:
earned
number
Example:
env
object
Example:
id
string
Example:
imageName
string
Example:
isPublic
boolean
Example:
isRunpod
boolean
Example:
isServerless
boolean
Example:
name
string
Example:
ports
string[]
Example:
readme
string
runtimeInMin
integer
volumeInGb
integer
Example:
volumeMountPath
string
Example: