POST
/
gpu-instance
/
openapi
/
v1
/
gpu
/
instance
/
upgrade
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>",
  "save": true,
  "networkVolume": {
    "volumeMounts": [
      {
        "type": "<string>",
        "id": "<string>",
        "mountPath": "<string>"
      }
    ]
  }
}'

API Description

When upgrading an instance, all parameters must be provided in full.

Request Headers

Content-Type
string
required

Enum: application/json

Authorization
string
required

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

Request Body

instanceId
string
required

The ID of the instance to be upgraded.

imageUrl
string
required

Container image URL. String, length limit: 1-500 characters.

imageAuthId
string

Image registry authentication ID.

envs
object[]
required

Instance environment variables. Up to 30 environment variable pairs can be created.

command
string
required

Container startup command. String, length limit: 0-2047 characters.

save
boolean
required

Whether to retain data from the previous instance. Boolean, values: true or false.

networkVolume
object
required

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: [].