Edit Template
curl --request POST \
--url https://api.novita.ai/gpu-instance/openapi/v1/template/update \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"template": {
"Id": "<string>",
"name": "<string>",
"readme": "<string>",
"type": "<string>",
"channel": "<string>",
"image": "<string>",
"imageAuth": "<string>",
"startCommand": "<string>",
"entrypoint": "<string>",
"rootfsSize": 123,
"ports": [
{
"type": "<string>",
"ports": [
123
]
}
],
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"minCudaVersion": "<string>"
}
}
'{
"templateId": "<string>"
}Edit Template
POST
/
gpu-instance
/
openapi
/
v1
/
template
/
update
Edit Template
curl --request POST \
--url https://api.novita.ai/gpu-instance/openapi/v1/template/update \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"template": {
"Id": "<string>",
"name": "<string>",
"readme": "<string>",
"type": "<string>",
"channel": "<string>",
"image": "<string>",
"imageAuth": "<string>",
"startCommand": "<string>",
"entrypoint": "<string>",
"rootfsSize": 123,
"ports": [
{
"type": "<string>",
"ports": [
123
]
}
],
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"minCudaVersion": "<string>"
}
}
'{
"templateId": "<string>"
}Request Headers
Enum:
application/jsonBearer authentication format, for example: Bearer {{API Key}}.
Request Body
Template settings.
Hide properties
Hide properties
Template ID.
Template name. String, length limit: 1-255 characters.
Template README content (in Markdown format). String, length limit: 0-102400 characters.
Template type.
Enum:
Enum:
instanceTemplate channel.
Enum:
Enum:
privateDocker image address for instance startup. String, length limit: 1-500 characters.
Image repository authentication ID for private images. String, length limit: 0-255 characters.
Startup command for the instance. String, length limit: 0-2047 characters.
Instance startup entrypoint. This setting will override the Docker image’s ENTRYPOINT. String, length limit: 0-2047 characters.
Root filesystem storage (GB). Integer, value must be greater than 0.
Minimum supported CUDA version. String, length limit: 0-255 characters. Format example: 11.8, 12.4.
Response
ID of the updated template.
Example
Requestcurl --request POST \
--url 'https://api.novita.ai/gpu-instance/openapi/v1/template/update' \
--header 'Authorization: Bearer {{API Key}}' \
--header 'Content-Type: application/json' \
--data '{
"template": {
"Id": "1",
"name": "test",
"readme": "readme",
"type": "instance",
"channel": "private",
"readme": "test create template",
"image": "nginx",
"imageAuth": "",
"startCommand": "echo test",
"entrypoint": "",
"rootfsSize": 60,
"ports": [
{
"type": "http",
"ports": [80, 443]
},
{
"type": "tcp",
"ports": [90, 95]
}
],
"envs": [
{
"key": "test1",
"value": "template1"
},
{
"key": "test2",
"value": "test2"
}
],
"minCudaVersion": "11.8"
}
}'
{
"templateId": "1"
}
Was this page helpful?
⌘I