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

# Create a vm

> create a vm that user owns



## OpenAPI

````yaml /spec/Iaas.yaml post /vm
openapi: 3.0.1
info:
  title: Liara Iaas API Documentaion
  description: |-
    Manage your vms and its resources

    Parameters:
    - `teamID`: To access services in a team
  termsOfService: '#'
  contact:
    email: info@liara.ir
  version: 1.0.0
servers:
  - url: https://iaas-api.liara.ir
security:
  - jwt: []
tags:
  - name: VMs
    description: Manage your VMs
externalDocs:
  description: Find out more about Iaas
  url: http://liara.ir
paths:
  /vm:
    post:
      tags:
        - VMs
      summary: Create a vm
      description: create a vm that user owns
      operationId: createVM
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVMRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  taskID:
                    type: string
        '400':
          description: Bad request
          content: {}
        '401':
          description: Missing authentication
          content: {}
        '402':
          description: Payment required
          content: {}
        '409':
          description: Conflict
          content: {}
        '412':
          description: Precondition failed
          content: {}
        '429':
          description: Too many request
          content: {}
components:
  schemas:
    CreateVMRequest:
      type: object
      properties:
        name:
          type: string
          description: Lowercase vm name
        OS:
          type: string
          enum:
            - ubuntu-24.04
            - ubuntu-22.04
            - debian-12.9
          description: The os name
        plan:
          type: string
          enum:
            - standard-base-g2
            - standard-plus-g2
            - pro-g2
            - pro-plus-g2
            - express-g2
            - express-plus-g2
          description: The plan of app that you want to create
        config:
          description: The config of vm that you want to create
          type: object
          properties:
            SSHKeys:
              type: array
              items:
                type: string
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````