GET
/
gpu-instance
/
openapi
/
v1
/
template

Request Headers

Content-Type
string
required

Enum: application/json

Authorization
string
required

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

Query Parameters

templateId
string

ID of the template being queried.

Response

template
object

Template settings.

Example

Request

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

Response

{
  "template": {
    "Id": "212",
    "user": "9141320498493177",
    "name": "ubuntu",
    "readme": "readme",
    "logo": "",
    "type": "instance",
    "channel": "private",
    "image": "ubuntu:latest",
    "imageAuth": "",
    "startCommand": "",
    "rootfsSize": 10,
    "volumes": [
      {
        "type": "local",
        "size": 20,
        "mountPath": "/workspace"
      }
    ],
    "ports": [
      {
        "type": "tcp",
        "ports": [8080, 8090]
      },
      {
        "type": "http",
        "ports": [6000, 60001]
      }
    ],
    "envs": [
      {
        "key": "testkey",
        "value": "123"
      }
    ],
    "tools": [],
    "createTime": "1713162260"
  }
}