> ## 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.

# Update Template



## OpenAPI

````yaml api-reference/gpus-v2-spec/update-template.json PUT /gpus/v2/templates/{template_id}
openapi: 3.0.0
info:
  title: Novita GPU API v2
  version: 2.0.0
servers:
  - url: https://api.novita.ai
security: []
paths:
  /gpus/v2/templates/{template_id}:
    put:
      summary: Update Template
      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: template_id
          in: path
          required: true
          schema:
            type: string
          description: 'Template ID. String, length: 1-255 characters.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Template name.
                  example: pytorch-2.3-cuda12
                type:
                  type: string
                  description: Template type.
                  example: instance
                image:
                  type: string
                  description: Image address.
                  example: registry.example.com/ml/pytorch:2.3-cuda12
                registry_auth_id:
                  type: string
                  description: Registry authentication ID.
                  example: auth-001
                command:
                  type: string
                  description: Startup command.
                  example: jupyter lab --ip=0.0.0.0
                entrypoint:
                  type: string
                  description: Image entrypoint.
                  example: /bin/bash
                rootfs_size_gb:
                  type: integer
                  description: 'Root disk size. Unit: GB.'
                  example: 50
                ports:
                  type: array
                  description: Exposed port configuration.
                  items:
                    type: object
                    properties:
                      protocol:
                        type: string
                        description: Protocol or port type
                        example: http
                      port:
                        type: integer
                        description: Port
                        example: 8888
                envs:
                  type: array
                  description: Environment variables.
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        description: Environment variable name
                        example: ENV
                      value:
                        type: string
                        description: Environment variable value
                        example: prod
                metadata:
                  type: object
                  description: Template metadata.
                  properties:
                    readme:
                      type: string
                      description: Template readme
                      example: PyTorch 2.3 with CUDA 12
                    logo:
                      type: string
                      description: Logo URL
                      example: https://example.com/logo.png
                    description:
                      type: string
                      description: Short description
                      example: Updated PyTorch development template
                    tags:
                      type: array
                      items:
                        type: string
                      description: Tags
                      example:
                        - pytorch
                        - cuda
                min_cuda_version:
                  type: string
                  description: Minimum CUDA version.
                  example: '12.2'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  template_id:
                    type: string
                    description: Template ID
                    example: tpl-001

````