Upgrade Instance
curl --request POST \
--url https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"instanceId": "<string>",
"imageUrl": "<string>",
"imageAuthId": "<string>",
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"command": "<string>",
"entrypoint": "<string>",
"save": true,
"networkVolume": {
"volumeMounts": [
{
"type": "<string>",
"id": "<string>",
"mountPath": "<string>"
}
]
}
}
'import requests
url = "https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade"
payload = {
"instanceId": "<string>",
"imageUrl": "<string>",
"imageAuthId": "<string>",
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"command": "<string>",
"entrypoint": "<string>",
"save": True,
"networkVolume": { "volumeMounts": [
{
"type": "<string>",
"id": "<string>",
"mountPath": "<string>"
}
] }
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
instanceId: '<string>',
imageUrl: '<string>',
imageAuthId: '<string>',
envs: [{key: '<string>', value: '<string>'}],
command: '<string>',
entrypoint: '<string>',
save: true,
networkVolume: {volumeMounts: [{type: '<string>', id: '<string>', mountPath: '<string>'}]}
})
};
fetch('https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'instanceId' => '<string>',
'imageUrl' => '<string>',
'imageAuthId' => '<string>',
'envs' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'command' => '<string>',
'entrypoint' => '<string>',
'save' => true,
'networkVolume' => [
'volumeMounts' => [
[
'type' => '<string>',
'id' => '<string>',
'mountPath' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade"
payload := strings.NewReader("{\n \"instanceId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"imageAuthId\": \"<string>\",\n \"envs\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"command\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"save\": true,\n \"networkVolume\": {\n \"volumeMounts\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"instanceId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"imageAuthId\": \"<string>\",\n \"envs\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"command\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"save\": true,\n \"networkVolume\": {\n \"volumeMounts\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"instanceId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"imageAuthId\": \"<string>\",\n \"envs\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"command\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"save\": true,\n \"networkVolume\": {\n \"volumeMounts\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_bodyInstance
Upgrade Instance
POST
/
gpu-instance
/
openapi
/
v1
/
gpu
/
instance
/
upgrade
Upgrade Instance
curl --request POST \
--url https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"instanceId": "<string>",
"imageUrl": "<string>",
"imageAuthId": "<string>",
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"command": "<string>",
"entrypoint": "<string>",
"save": true,
"networkVolume": {
"volumeMounts": [
{
"type": "<string>",
"id": "<string>",
"mountPath": "<string>"
}
]
}
}
'import requests
url = "https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade"
payload = {
"instanceId": "<string>",
"imageUrl": "<string>",
"imageAuthId": "<string>",
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"command": "<string>",
"entrypoint": "<string>",
"save": True,
"networkVolume": { "volumeMounts": [
{
"type": "<string>",
"id": "<string>",
"mountPath": "<string>"
}
] }
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
instanceId: '<string>',
imageUrl: '<string>',
imageAuthId: '<string>',
envs: [{key: '<string>', value: '<string>'}],
command: '<string>',
entrypoint: '<string>',
save: true,
networkVolume: {volumeMounts: [{type: '<string>', id: '<string>', mountPath: '<string>'}]}
})
};
fetch('https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'instanceId' => '<string>',
'imageUrl' => '<string>',
'imageAuthId' => '<string>',
'envs' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'command' => '<string>',
'entrypoint' => '<string>',
'save' => true,
'networkVolume' => [
'volumeMounts' => [
[
'type' => '<string>',
'id' => '<string>',
'mountPath' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade"
payload := strings.NewReader("{\n \"instanceId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"imageAuthId\": \"<string>\",\n \"envs\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"command\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"save\": true,\n \"networkVolume\": {\n \"volumeMounts\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"instanceId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"imageAuthId\": \"<string>\",\n \"envs\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"command\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"save\": true,\n \"networkVolume\": {\n \"volumeMounts\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance/upgrade")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"instanceId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"imageAuthId\": \"<string>\",\n \"envs\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"command\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"save\": true,\n \"networkVolume\": {\n \"volumeMounts\": [\n {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_bodyAPI Description
When upgrading an instance, all parameters must be provided in full.Request Headers
Enum:
application/jsonBearer authentication format, for example: Bearer {{API Key}}.
Request Body
The ID of the instance to be upgraded.
Container image URL. String, length limit: 1-500 characters.
Image registry authentication ID.
Container startup command. String, length limit: 0-2047 characters.
Container startup entrypoint. This setting will override the Docker image’s ENTRYPOINT. String, length limit: 0-2047 characters.
Whether to retain data from the previous instance. Boolean, values: true or false.
Configure cloud storage (type: network). Each instance supports mounting up to 30 cloud storage volumes. To remove all cloud storage mounts, set volumeMounts to an empty array: [].
Show properties
Show properties
Last modified on December 24, 2025
Was this page helpful?
⌘I