> ## Documentation Index
> Fetch the complete documentation index at: https://novita.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrade Instance



## OpenAPI

````yaml api-reference/gpus-v2-spec/upgrade-instance.json PUT /gpus/v2/instances/{instance_id}/upgrade
openapi: 3.0.0
info:
  title: Novita GPU API v2
  version: 2.0.0
servers:
  - url: https://api.novita.ai
security: []
paths:
  /gpus/v2/instances/{instance_id}/upgrade:
    put:
      summary: Upgrade Instance
      parameters:
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
          description: 'Allowed value: application/json.'
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: 'Bearer authentication format, e.g.: `Bearer {{API_KEY}}`.'
        - name: instance_id
          in: path
          required: true
          schema:
            type: string
          description: 'Instance ID. String, length: 1-255 characters.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - image
              properties:
                image:
                  type: string
                  description: 'Image address. String, length: 1-500 characters.'
                  example: registry.example.com/namespace/new-image:tag
                registry_auth_id:
                  type: string
                  description: >-
                    Saved registry authentication ID. String, length: 0-255
                    characters.
                  example: registry-auth-id
                entrypoint:
                  type: string
                  description: Container entrypoint.
                  example: ''
                command:
                  type: string
                  description: Container startup command.
                  example: ''
                envs:
                  type: array
                  description: Environment variable list.
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        description: 'Variable name. String, length: 0-511 characters.'
                        example: ENV_NAME
                      value:
                        type: string
                        description: 'Variable value. String, length: 0-4095 characters.'
                        example: ENV_VALUE
                save_data:
                  type: boolean
                  description: >-
                    Whether to keep existing data when upgrading or resetting
                    the instance.
                  example: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object

````