# List Templates - Documentation

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown is available with `Accept: text/markdown` and `.md` URL variants.

Source: /docs/api-reference/gpu-instance-list-templates

# List Templates

GET

/

gpu-instance

/

openapi

/

v1

/

templates

Try it

List Templates

cURL

```
curl --request GET \
--url https://api.novita.ai/gpu-instance/openapi/v1/templates \
--header 'Authorization: &#x3C;authorization>' \
--header 'Content-Type: &#x3C;content-type>'
```

```
import requestsurl = "https://api.novita.ai/gpu-instance/openapi/v1/templates"headers = { "Content-Type": "&#x3C;content-type>", "Authorization": "&#x3C;authorization>"}response = requests.get(url, headers=headers)print(response.text)
```

```
const options = { method: 'GET', headers: {'Content-Type': '&#x3C;content-type>', Authorization: '&#x3C;authorization>'}};fetch('https://api.novita.ai/gpu-instance/openapi/v1/templates', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
```

```
&#x3C;?php$curl = curl_init();curl_setopt_array($curl, [ CURLOPT_URL => "https://api.novita.ai/gpu-instance/openapi/v1/templates", 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: &#x3C;authorization>", "Content-Type: &#x3C;content-type>" ],]);$response = curl_exec($curl);$err = curl_error($curl);curl_close($curl);if ($err) { echo "cURL Error #:" . $err;} else { echo $response;}
```

```
package mainimport (	"fmt"	"net/http"	"io")func main() {	url := "https://api.novita.ai/gpu-instance/openapi/v1/templates"	req, _ := http.NewRequest("GET", url, nil)	req.Header.Add("Content-Type", "&#x3C;content-type>")	req.Header.Add("Authorization", "&#x3C;authorization>")	res, _ := http.DefaultClient.Do(req)	defer res.Body.Close()	body, _ := io.ReadAll(res.Body)	fmt.Println(string(body))}
```

```
HttpResponse&#x3C;String> response = Unirest.get("https://api.novita.ai/gpu-instance/openapi/v1/templates") .header("Content-Type", "&#x3C;content-type>") .header("Authorization", "&#x3C;authorization>") .asString();
```

```
require 'uri'require 'net/http'url = URI("https://api.novita.ai/gpu-instance/openapi/v1/templates")http = Net::HTTP.new(url.host, url.port)http.use_ssl = truerequest = Net::HTTP::Get.new(url)request["Content-Type"] = '&#x3C;content-type>'request["Authorization"] = '&#x3C;authorization>'response = http.request(request)puts response.read_body
```

200

```
{
"template": [
{
"Id": "&#x3C;string>",
"name": "&#x3C;string>",
"readme": "&#x3C;string>",
"type": "&#x3C;string>",
"channel": "&#x3C;string>",
"image": "&#x3C;string>",
"imageAuth": "&#x3C;string>",
"startCommand": "&#x3C;string>",
"entrypoint": "&#x3C;string>",
"rootfsSize": 123,
"ports": [
{
"type": "&#x3C;string>",
"ports": {}
}
],
"envs": [
{
"key": "&#x3C;string>",
"value": "&#x3C;string>"
}
],
"tools": [
{
"name": "&#x3C;string>",
"describe": "&#x3C;string>",
"port": 123,
"type": "&#x3C;string>"
}
],
"createdAt": "&#x3C;string>",
"recommendCards": [
{
"gpuSpecId": "&#x3C;string>",
"cardNum": "&#x3C;string>"
}
],
"minCudaVersion": "&#x3C;string>"
}
],
"total": 123
}
```

##

[​](#request-headers)

Request Headers

[​](#param-content-type)

Content-Type

string

required

Enum: `application/json`

[​](#param-authorization)

Authorization

string

required

Bearer authentication format, for example: Bearer {{API Key}}.

##

[​](#query-parameters)

Query Parameters

[​](#param-page-size)

pageSize

integer

Page size. Integer, value >= 0.

[​](#param-page-num)

pageNum

integer

Page number. Integer, value >= 0.

[​](#param-name)

name

string

Filter the templates by name (fuzzy match). String, length limit: 1-255 characters.

[​](#param-type)

type

string

Filter the templates by type.

[​](#param-channel)

channel

string

required

Filter the templates by channel.

Enum: `official`, `community`, `private`

[​](#param-is-my-community)

isMyCommunity

boolean

required

Template visibility scope. Values: `true`, `false`.

Note:

- Query official/community templates: set to `false`

- Query private templates: set to `true`

##

[​](#response)

Response

[​](#param-template)

template

object[]

Show properties

[​](#param-id)

Id

string

Template ID.

[​](#param-name-1)

name

string

Template name.

[​](#param-readme)

readme

string

Template README content (in Markdown format).

[​](#param-type-1)

type

string

Template type.Enum: `instance`

[​](#param-channel-1)

channel

string

Template channel.Enum: `official`, `community`, `private`

[​](#param-image)

image

string

Docker image address for instance startup.

[​](#param-image-auth)

imageAuth

string

Image repository authentication ID for private images.

[​](#param-start-command)

startCommand

string

Startup command for the instance.

[​](#param-entrypoint)

entrypoint

string

Instance startup entrypoint.

[​](#param-rootfs-size)

rootfsSize

integer

Rootfs storage (GB).

[​](#param-ports)

ports

object[]

Exposed ports settings.

Show properties

[​](#param-type-2)

type

string

Exposed port types.Enum: `http, tcp`

[​](#param-ports-1)

ports

[integer]

Exposed ports (maximum 10).

[​](#param-envs)

envs

object[]

Environment variables injected into instance.

Show properties

[​](#param-key)

key

string

Environment variable key.

[​](#param-value)

value

string

Environment variable value.

[​](#param-tools)

tools

object[]

Template built-in tools (only available for official templates).

Show properties

[​](#param-name-2)

name

string

Tool name.

[​](#param-describe)

describe

string

Tool description.

[​](#param-port)

port

integer

Tool port.

[​](#param-type-3)

type

string

Tool protocol type. Enum: `http`, `tcp`

[​](#param-created-at)

createdAt

string

Template creation timestamp (Unix seconds).

[​](#param-recommend-cards)

recommendCards

object[]

Recommended GPU card specs (only available for official templates).

Show properties

[​](#param-gpu-spec-id)

gpuSpecId

string

GPU spec ID.

[​](#param-card-num)

cardNum

string

Recommended card number.

[​](#param-min-cuda-version)

minCudaVersion

string

Minimum required CUDA version, e.g. 11.8, 12.4.

[​](#param-total)

total

integer

Total number of templates.

##

[​](#example)

Example

Request

```
curl --request GET \
--url 'https://api.novita.ai/gpu-instance/openapi/v1/templates' \
--header 'Authorization: Bearer {{API Key}}'
```

Response

```
{
"template": [
{
"Id": "100",
"name": "name",
"readme": "```\nreadme\n```\n# uiohiu\n68686",
"type": "instance",
"channel": "official",
"image": "image",
"imageAuth": "",
"startCommand": "startCommand",
"entrypoint": "",
"rootfsSize": 10,
"ports": [
{
"type": "tcp",
"ports": [8080, 8090]
},
{
"type": "http",
"ports": [6000, 60001]
}
],
"envs": [
{
"key": "testkey",
"value": "123"
}
],
"tools": [
{
"name": "Jupyter",
"describe": "Start Jupyter Notebook",
"port": 8888,
"type": "http"
}
],
"createdAt": "1711995567",
"recommendCards": [
{
"gpuSpecId": "4090.18c.60g",
"cardNum": "2"
}
],
"minCudaVersion": "11.8"
}
],
"total": 10
}
```

Last modified on December 24, 2025
