Get Template
curl --request GET \
--url https://api.novita.ai/gpus/v2/templates/{template_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.novita.ai/gpus/v2/templates/{template_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.novita.ai/gpus/v2/templates/{template_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.novita.ai/gpus/v2/templates/{template_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.novita.ai/gpus/v2/templates/{template_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.novita.ai/gpus/v2/templates/{template_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/gpus/v2/templates/{template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "tpl-001",
"owner_id": "owner-001",
"name": "pytorch-2.3-cuda12",
"type": "instance",
"visibility": "community",
"image": "registry.example.com/ml/pytorch:2.3-cuda12",
"registry_auth_id": "auth-001",
"command": "",
"entrypoint": "/bin/bash",
"rootfs_size_gb": 50,
"ports": [
{
"protocol": "http",
"port": 8888
}
],
"envs": [
{
"key": "ENV",
"value": "prod"
}
],
"metadata": {
"readme": "PyTorch 2.3 with CUDA 12",
"logo": "https://example.com/logo.png",
"description": "PyTorch development template",
"author": "PAI",
"tags": [
"pytorch",
"cuda"
]
},
"min_cuda_version": "12.2",
"created_at": 1715750400,
"updated_at": 1715750400,
"member_id": "550e8400-e29b-41d4-a716-446655440000"
}Template
Get Template
GET
/
gpus
/
v2
/
templates
/
{template_id}
Get Template
curl --request GET \
--url https://api.novita.ai/gpus/v2/templates/{template_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.novita.ai/gpus/v2/templates/{template_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.novita.ai/gpus/v2/templates/{template_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.novita.ai/gpus/v2/templates/{template_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.novita.ai/gpus/v2/templates/{template_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.novita.ai/gpus/v2/templates/{template_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/gpus/v2/templates/{template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "tpl-001",
"owner_id": "owner-001",
"name": "pytorch-2.3-cuda12",
"type": "instance",
"visibility": "community",
"image": "registry.example.com/ml/pytorch:2.3-cuda12",
"registry_auth_id": "auth-001",
"command": "",
"entrypoint": "/bin/bash",
"rootfs_size_gb": 50,
"ports": [
{
"protocol": "http",
"port": 8888
}
],
"envs": [
{
"key": "ENV",
"value": "prod"
}
],
"metadata": {
"readme": "PyTorch 2.3 with CUDA 12",
"logo": "https://example.com/logo.png",
"description": "PyTorch development template",
"author": "PAI",
"tags": [
"pytorch",
"cuda"
]
},
"min_cuda_version": "12.2",
"created_at": 1715750400,
"updated_at": 1715750400,
"member_id": "550e8400-e29b-41d4-a716-446655440000"
}Headers
Bearer authentication format, e.g.: Bearer {{API_KEY}}.
Path Parameters
Template ID. String, length: 1-255 characters.
Query Parameters
Whether to query a community template.
Response
200 - application/json
OK
Template ID
Example:
"tpl-001"
Owner user ID
Example:
"owner-001"
Template name
Example:
"pytorch-2.3-cuda12"
Template type
Example:
"instance"
Visibility
Example:
"community"
Image address
Example:
"registry.example.com/ml/pytorch:2.3-cuda12"
Registry authentication ID
Example:
"auth-001"
Startup command
Example:
""
Image entrypoint
Example:
"/bin/bash"
Root disk size. Unit: GB
Example:
50
Exposed port configuration
Show child attributes
Show child attributes
Environment variables
Show child attributes
Show child attributes
Template metadata
Show child attributes
Show child attributes
Minimum CUDA version
Example:
"12.2"
Creation time. Unix timestamp
Example:
1715750400
Update time. Unix timestamp
Example:
1715750400
Creator member ID
Example:
"550e8400-e29b-41d4-a716-446655440000"
Last modified on June 23, 2026