API Reference
- docs
- pods
- endpoints
- network volumes
- templates
- container registry auth
- billing
templates
Create a new template
Create a new template.
POST
/
templates
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
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Create a new template.
The body is of type object
.
Response
200
application/json
Successful operation.
The response is of type object
.
Was this page helpful?
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"
}
Assistant
Responses are generated using AI and may contain mistakes.