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

# Post apiv1vm branch



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/vm/{vm_or_commit_id}/branch
openapi: 3.1.0
info:
  title: Orchestrator Control Plane API
  description: ''
  license:
    name: ''
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/vm/{vm_or_commit_id}/branch:
    post:
      tags:
        - vm
      operationId: branch_vm
      parameters:
        - name: vm_or_commit_id
          in: path
          description: Parent VM or commit ID
          required: true
          schema:
            type: string
        - name: keep_paused
          in: query
          description: >-
            If true, keep VM paused after commit. Only applicable when branching
            a VM ID.
          required: false
          schema:
            type: boolean
        - name: skip_wait_boot
          in: query
          description: >-
            If true, immediately return an error if VM is booting instead of
            waiting. Only applicable when branching a VM ID.
          required: false
          schema:
            type: boolean
        - name: count
          in: query
          description: Number of VMs to branch (optional; default 1)
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
      responses:
        '201':
          description: Branch VM created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewVmsResponse'
        '400':
          description: Invalid VM ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: VM not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    NewVmsResponse:
      type: object
      required:
        - vms
      properties:
        vms:
          type: array
          items:
            $ref: '#/components/schemas/NewVmResponse'
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Reason of error
        success:
          type: boolean
          description: 'Is always: false'
    NewVmResponse:
      type: object
      description: Response body for new VM requests (new_root, from_commit, branch)
      required:
        - vm_id
      properties:
        vm_id:
          type: string
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: Token

````