> ## Documentation Index
> Fetch the complete documentation index at: https://docs.novita.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Templates

## Request Headers

**Content-Type** `string` *required*

Enum: `application/json`

**Authorization** `string` *required*

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

## Query Parameters

**pageSize** `integer`

Page size. Integer, value >= 0.

**pageNum** `integer`

Page number. Integer, value >= 0.

**name** `string`

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

**type** `string`

Filter the templates by type.

**channel** `string` *required*

Filter the templates by channel.\\

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

**isMyCommunity** `boolean` *required*

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

Note:

* Query official/community templates: set to `false`
* Query private templates: set to `true`

## Response

**template** `object[]`

**properties**

**Id** `string`

Template ID.

**name** `string`

Template name.

**readme** `string`

Template README content (in Markdown format).

**type** `string`

Template type.Enum: `instance`

**channel** `string`

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

**image** `string`

Docker image address for instance startup.

**imageAuth** `string`

Image repository authentication ID for private images.

**startCommand** `string`

Startup command for the instance.

**entrypoint** `string`

Instance startup entrypoint.

**rootfsSize** `integer`

Rootfs storage (GB).

**ports** `object[]`

Exposed ports settings.

**properties**

**type** `string`

Exposed port types.Enum: `http, tcp`

**ports** `[integer]`

Exposed ports (maximum 10).

**envs** `object[]`

Environment variables injected into instance.

**properties**

**key** `string`

Environment variable key.

**value** `string`

Environment variable value.

**tools** `object[]`

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

**properties**

**name** `string`

Tool name.

**describe** `string`

Tool description.

**port** `integer`

Tool port.

**type** `string`

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

**createdAt** `string`

Template creation timestamp (Unix seconds).

**recommendCards** `object[]`

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

**properties**

**gpuSpecId** `string`

GPU spec ID.

**cardNum** `string`

Recommended card number.

**minCudaVersion** `string`

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

**total** `integer`

Total number of templates.

## Example

Request

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

Response

````json theme={"system"}
{
  "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
}
````


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.