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

# Provision a new VM

> Provision a new VM



## OpenAPI

````yaml /api-reference/openapi.yaml post /vm
openapi: 3.0.3
info:
  title: Onidel Cloud API - OpenAPI 3.0
  description: >-
    Welcome to the **Onidel Cloud API** documentation. This API allows
    developers to seamlessly integrate with the Onidel Cloud platform, enabling
    them to manage cloud resources efficiently and securely. With our API, you
    can automate processes, retrieve detailed account information, and manage
    virtual machines (VPS), networking, storage, and more.
  termsOfService: https://docs.onidel.com/policies/terms-of-service
  contact:
    email: support@onidel.com
  version: 1.2.0
servers:
  - url: https://api.cloud.onidel.com
security: []
tags:
  - name: SSH Key
    description: Manage SSH keys for secure server access.
  - name: VPC
    description: Manage Virtual Private Cloud (VPC) networks for isolated networking.
  - name: Firewall
    description: Manage firewall groups for VM security.
  - name: OS Template
    description: >-
      We have a wide range of operating systems available to deploy server
      instances.
  - name: Instance Type
    description: We provide different instance types for different workload.
  - name: Startup Script
    description: >-
      Manage startup scripts that run on first boot of a server instance.
      Maximum 10 scripts per team.
  - name: IP List
    description: >-
      Manage IP lists for use in firewall rules. IP lists group multiple IP
      addresses/CIDRs together.
  - name: Firewall Rule
    description: Manage firewall rules within a firewall group.
  - name: Object Storage
    description: Manage S3-compatible object storage services, buckets, and access keys.
  - name: Custom ISO
    description: Manage custom ISO images that can be used to boot server instances (BYOI).
  - name: Measured Boot Image
    description: >-
      Manage SEV-SNP measured direct boot images (UKIs) and attach/detach them
      to instances.
paths:
  /vm:
    post:
      tags:
        - Virtual Machine
      summary: Provision a new VM
      description: Provision a new VM
      operationId: provisionVM
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewVM'
      responses:
        '201':
          description: Successful operation
        '400':
          description: Bad request
        '402':
          description: Payment required
        '403':
          description: Forbidden
        '404':
          description: Not found
      security:
        - api_key: []
components:
  schemas:
    NewVM:
      type: object
      properties:
        name:
          type: string
          format: string
          example: vm-hostname
        payment_cycle:
          type: string
          format: string
          enum:
            - hourly
            - monthly
            - quarterly
            - semiannually
            - annually
            - biennially
            - triennially
        instance_type:
          type: string
          format: uuid
          example: ea645d53-c0e5-406d-8863-9ecd4235be94
        location:
          type: string
          format: string
          example: Sydney
        cpu:
          type: integer
          format: int64
          example: 2
        ram:
          type: integer
          format: int64
          example: 4096
        disk:
          type: integer
          format: int64
          example: 40
        os:
          type: integer
          format: int64
          example: 2
          description: OS template ID to deploy. Provide one of os, snapshot_id or iso_id.
        snapshot_id:
          type: string
          format: uuid
          example: 53959c6e-73d5-4476-9b19-d78fb8efac2c
          description: >-
            Snapshot ID to deploy from. Provide one of os, snapshot_id or
            iso_id.
        iso_id:
          type: string
          format: uuid
          example: 7c1f2a90-4b3d-4e21-9a8c-1d2e3f4a5b6c
          description: >-
            Custom or system ISO ID to boot from (BYOI, no base image). Provide
            one of os, snapshot_id or iso_id.
        team_id:
          type: string
          format: uuid
          example: 6484a164-d355-4947-ac2c-e8c09fb24fb0
        ssh_keys:
          type: array
          items:
            type: string
            format: uuid
          example:
            - a3f2e5d8-1234-4abc-9876-543210fedcba
          description: List of SSH key IDs to be added to the VM for authentication
        vpcs:
          type: array
          items:
            type: string
            format: uuid
          example:
            - f5a3e2d8-9876-4abc-1234-543210fedcba
          description: List of VPC IDs to attach the VM to for private networking
        firewall_group_id:
          type: string
          format: uuid
          example: e4d3c2b1-5678-9abc-def0-fedcba098765
          description: Firewall group ID to apply to the VM for security rules
        ipv6:
          type: boolean
          example: false
          description: Enable IPv6 for the VM (if available in the location)
        disable_ssh_blocking:
          type: boolean
          example: false
          description: >-
            Disable outgoing SSH blocking on the VM (allows outbound SSH
            connections on port 22)
        startup_script_id:
          type: string
          format: uuid
          example: b7e3f1a2-5678-4def-abcd-123456789abc
          description: >-
            Startup script ID to execute on first boot (only applies when
            deploying with OS or snapshot)
  securitySchemes:
    api_key:
      type: http
      scheme: bearer

````