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

# Set auto-restart

> Enable or disable auto-restart for an interruptible VM.



## OpenAPI

````yaml /api-reference/openapi.json post /vms/{vm_id}/set-auto-restart
openapi: 3.1.0
info:
  title: Nova Cloud API
  description: >-
    REST API for the Nova Cloud GPU rental platform. Manage virtual machines,
    SSH keys, billing, and more.
  version: 1.0.0
  contact:
    name: Nova Cloud Support
    email: support@nova-cloud.ai
    url: https://nova-cloud.ai
servers:
  - url: https://api.nova-cloud.ai
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Authentication
    description: User registration, login, and token management
  - name: API Keys
    description: Create and manage API keys for programmatic access
  - name: SSH Keys
    description: Upload and manage SSH public keys for VM access
  - name: Virtual Machines
    description: Create, manage, and monitor GPU-powered VMs
  - name: Search & Pricing
    description: Browse available GPU offers and current pricing
  - name: Billing
    description: Balance, usage, transactions, and payment management
  - name: Reservations
    description: Reserved instance pricing and management
paths:
  /vms/{vm_id}/set-auto-restart:
    post:
      tags:
        - Virtual Machines
      summary: Set auto-restart
      description: Enable or disable auto-restart for an interruptible VM.
      operationId: set_auto_restart
      parameters:
        - name: vm_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VMSetAutoRestart'
      responses:
        '200':
          description: Auto-restart setting updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
components:
  schemas:
    VMSetAutoRestart:
      type: object
      required:
        - auto_restart
      properties:
        auto_restart:
          type: boolean
          description: Enable or disable auto-restart for interrupted VMs
    MessageResponse:
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: Use a JWT access token or API key (prefixed with nv_)

````