Template
Get Template
Model APIs
- Introduction
- LLM API
- Image, Audio and Video
GPUs
- GPU Instance
- Cluster
- Instance
- Template
- Product
- Image Registry
- Storage
Template
Get Template
GET
/
gpu-instance
/
openapi
/
v1
/
template
curl --request GET \
--url https://api.novita.ai/gpu-instance/openapi/v1/template \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'
{
"template": {
"Id": "<string>",
"createTime": "<string>",
"user": "<string>",
"tools": [
"<string>"
],
"name": "<string>",
"readme": "<string>",
"type": "<string>",
"channel": "<string>",
"image": "<string>",
"imageAuth": "<string>",
"startCommand": "<string>",
"rootfsSize": 123,
"volumes": [
{
"type": "<string>",
"size": 123,
"mountPath": "<string>"
}
],
"ports": [
{
"type": "<string>",
"ports": {}
}
],
"envs": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
Request Headers
Enum: application/json
Bearer authentication format, for example: Bearer {{API Key}}.
Query Parameters
ID of the template being queried.
Response
Template settings.
Template ID.
Template creation time.
ID of the user who created the template.
List of tools associated with the template.
Template name.
Template README content (in Markdown format).
Template type.Enum: instance
Template channel.Enum: private
Docker image address for instance startup.
Credentials for the Docker image registry to pull private images.
Startup command for the instance.
Rootfs storage (GB).
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"
}
}
Was this page helpful?
curl --request GET \
--url https://api.novita.ai/gpu-instance/openapi/v1/template \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'
{
"template": {
"Id": "<string>",
"createTime": "<string>",
"user": "<string>",
"tools": [
"<string>"
],
"name": "<string>",
"readme": "<string>",
"type": "<string>",
"channel": "<string>",
"image": "<string>",
"imageAuth": "<string>",
"startCommand": "<string>",
"rootfsSize": 123,
"volumes": [
{
"type": "<string>",
"size": 123,
"mountPath": "<string>"
}
],
"ports": [
{
"type": "<string>",
"ports": {}
}
],
"envs": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}