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

# Create GPU workload CVM

> Creates a CVM for GPU workloads. Node is auto-selected from available GPU nodes.



## OpenAPI

````yaml /openapi.json post /api/v1/cvms/workload
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/workload:
    post:
      tags:
        - CVMs
      summary: Create GPU workload CVM
      description: >-
        Creates a CVM for GPU workloads. Node is auto-selected from available
        GPU nodes.
      operationId: handle_create_cvm_for_workload_api_v1_cvms_workload_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWorkloadTappRequest'
        required: true
      responses:
        '200':
          description: Created CVM record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VM'
        '400':
          description: Creation failed
        '401':
          description: Authentication required
        '409':
          description: CVM name already exists in workspace
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    CreateWorkloadTappRequest:
      properties:
        name:
          type: string
          title: Name
          description: The name of the tapp.
        instance_type:
          type: string
          title: Instance Type
          description: The instance_type of the tapp.
        model_id:
          type: string
          title: Model Id
          description: The model_id of the tapp.
        scheduled_delete_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Scheduled Delete At
          description: The scheduled delete time of the tapp.
      type: object
      required:
        - name
        - instance_type
        - model_id
      title: CreateWorkloadTappRequest
    VM:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        status:
          type: string
          title: Status
        teepod_id:
          type: integer
          title: Teepod Id
        teepod:
          anyOf:
            - $ref: '#/components/schemas/TeepodMeta'
            - type: 'null'
        user_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: User Id
        app_id:
          type: string
          title: App Id
        vm_uuid:
          anyOf:
            - type: string
            - type: 'null'
          title: Vm Uuid
        instance_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Instance Id
        app_url:
          anyOf:
            - type: string
            - type: 'null'
          title: App Url
        base_image:
          anyOf:
            - type: string
            - type: 'null'
          title: Base Image
        vcpu:
          type: integer
          title: Vcpu
        memory:
          type: integer
          title: Memory
        disk_size:
          type: integer
          title: Disk Size
        manifest_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Manifest Version
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
        runner:
          anyOf:
            - type: string
            - type: 'null'
          title: Runner
        docker_compose_file:
          anyOf:
            - type: string
            - type: 'null'
          title: Docker Compose File
        features:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Features
        created_at:
          type: string
          format: date-time
          title: Created At
        encrypted_env_pubkey:
          anyOf:
            - type: string
            - type: 'null'
          title: Encrypted Env Pubkey
      type: object
      required:
        - id
        - name
        - status
        - teepod_id
        - app_id
        - vcpu
        - memory
        - disk_size
        - created_at
      title: VM
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TeepodMeta:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: TeepodMeta
    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
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: ''
          tokenUrl: token
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````