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

# List available OS images

> Returns OS images this CVM can upgrade to, filtered by node availability, KMS allowlist, dev/prod upgrade rules, and GPU compatibility.



## OpenAPI

````yaml /openapi.json get /api/v1/cvms/{cvm_id}/available-os-images
openapi: 3.1.0
info:
  title: Phala Cloud API
  version: 0.1.0
servers:
  - url: https://cloud-api.phala.com
security: []
tags:
  - name: CVMs
    description: Confidential Virtual Machine (CVM) lifecycle management on Phala Network
  - name: Apps
    description: App template management and CVM deployment from app blueprints
  - name: Webhooks
    description: Manage webhook endpoints and monitor delivery history
  - name: SSH Keys
    description: SSH public key management for CVM access
  - name: KMS
    description: >-
      Key Management Service — key derivation, on-chain anchoring, and
      inspection
  - name: Instance Types
    description: Available hardware configurations for CVM deployment
  - name: Attestations
    description: Remote attestation and TEE verification endpoints
paths:
  /api/v1/cvms/{cvm_id}/available-os-images:
    get:
      tags:
        - CVMs
      summary: List available OS images
      description: >-
        Returns OS images this CVM can upgrade to, filtered by node
        availability, KMS allowlist, dev/prod upgrade rules, and GPU
        compatibility.
      operationId: get_available_os_images_api_v1_cvms__cvm_id__available_os_images_get
      parameters:
        - name: cvm_id
          in: path
          required: true
          schema:
            type: string
            title: Cvm Id
      responses:
        '200':
          description: OS images grouped by version (newest first)
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/teehouse__api__routes__cvms__patch_compose_file__AvailableOSImage
                title: >-
                  Response Get Available Os Images Api V1 Cvms  Cvm Id 
                  Available Os Images Get
        '401':
          description: Authentication required
        '403':
          description: CVM not in workspace
        '404':
          description: CVM not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    teehouse__api__routes__cvms__patch_compose_file__AvailableOSImage:
      properties:
        version:
          anyOf:
            - prefixItems:
                - type: integer
                - type: integer
                - type: integer
                - type: integer
              type: array
              maxItems: 4
              minItems: 4
            - prefixItems:
                - type: integer
                - type: integer
                - type: integer
              type: array
              maxItems: 3
              minItems: 3
          title: Version
          description: Semantic version as tuple (major, minor, patch[, build])
        prod:
          anyOf:
            - $ref: '#/components/schemas/OSImageVariant'
            - type: 'null'
          description: Production build (stable)
        dev:
          anyOf:
            - $ref: '#/components/schemas/OSImageVariant'
            - type: 'null'
          description: Development build (testing)
      type: object
      required:
        - version
      title: AvailableOSImage
      description: OS image version with production and development variants.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OSImageVariant:
      properties:
        name:
          type: string
          title: Name
          description: Human-readable image name (e.g. dstack-0.5.5)
        slug:
          type: string
          title: Slug
          description: Unique identifier for API calls (e.g. dstack-0.5.5-e18f5407)
        os_image_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Os Image Hash
          description: SHA256 hash of the OS image
        is_current:
          type: boolean
          title: Is Current
          description: True if this is the currently running image
          default: false
      type: object
      required:
        - name
        - slug
      title: OSImageVariant
      description: Single OS image variant (production or development build).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````