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

# Create machine



## OpenAPI

````yaml /api-reference/openapi/controlplane.openapi.json post /machines
openapi: 3.0.0
info:
  title: levers9 controlplane API
  version: 1.0.0
  description: >-
    REST view of the levers9 controlplane gRPC service, served by the
    controlplane on port 1994. Authenticate with `Authorization: Bearer
    <token>`.
servers:
  - url: https://levers9.uselevers.com
    description: local controlplane
  - url: https://api.uselevers.com
    description: hosted
security:
  - bearer: []
tags:
  - name: ControlPlaneService
paths:
  /machines:
    post:
      tags:
        - ControlPlaneService
      summary: Create machine
      operationId: ControlPlaneService_CreateMachine
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/controlplaneCreateMachineRequest'
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controlplaneCreateMachineResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
components:
  schemas:
    controlplaneCreateMachineRequest:
      type: object
      properties:
        poolName:
          type: string
    controlplaneCreateMachineResponse:
      type: object
      properties:
        ok:
          type: boolean
        errMsg:
          type: string
        machine:
          $ref: '#/components/schemas/controlplaneMachine'
        machineUpstreamUrl:
          type: string
        machineUpstreamBranch:
          type: string
        machineUpstreamToken:
          type: string
        installCommand:
          type: string
          description: >-
            Machine-backed managed pools return the systemd installer here. The
            join

            token embedded in the command is short-lived and machine-bound.
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    controlplaneMachine:
      type: object
      properties:
        id:
          type: string
        cpu:
          type: string
          format: int64
        memory:
          type: string
          format: int64
        gpu:
          type: string
        gpuCount:
          type: integer
          format: int64
        status:
          type: string
        poolName:
          type: string
        providerName:
          type: string
        registrationToken:
          type: string
        tailscaleUrl:
          type: string
        tailscaleAuth:
          type: string
        lastKeepalive:
          type: string
        created:
          type: string
        machineVersion:
          type: string
        machineMetrics:
          $ref: '#/components/schemas/controlplaneMachineMetrics'
        userData:
          type: string
        ssh:
          $ref: '#/components/schemas/controlplaneMachineSSHAccess'
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    controlplaneMachineMetrics:
      type: object
      properties:
        totalCpuAvailable:
          type: integer
          format: int32
        totalMemoryAvailable:
          type: integer
          format: int32
        cpuUtilizationPct:
          type: number
          format: float
        memoryUtilizationPct:
          type: number
          format: float
        workerCount:
          type: integer
          format: int32
        containerCount:
          type: integer
          format: int32
        freeGpuCount:
          type: integer
          format: int32
        cacheUsagePct:
          type: number
          format: float
        cacheCapacity:
          type: integer
          format: int32
        cacheMemoryUsage:
          type: integer
          format: int32
        cacheCpuUsage:
          type: number
          format: float
        memoryUsedMb:
          type: string
          format: int64
        memoryTotalMb:
          type: string
          format: int64
        diskUsedMb:
          type: string
          format: int64
        diskTotalMb:
          type: string
          format: int64
        diskUsagePct:
          type: number
          format: float
        pathMetrics:
          type: array
          items:
            $ref: '#/components/schemas/controlplaneMachinePathMetrics'
    controlplaneMachineSSHAccess:
      type: object
      properties:
        supported:
          type: boolean
        status:
          type: string
        publicIp:
          type: string
        host:
          type: string
        port:
          type: integer
          format: int64
        username:
          type: string
        activeGeneration:
          type: string
          format: uint64
        appliedGeneration:
          type: string
          format: uint64
        keyFingerprint:
          type: string
        hostKeyFingerprint:
          type: string
        privateKeyAvailable:
          type: boolean
        pendingRotation:
          type: boolean
        pendingGeneration:
          type: string
          format: uint64
        pendingFingerprint:
          type: string
        pendingKeyAvailable:
          type: boolean
        pendingKeyDownloaded:
          type: boolean
        error:
          type: string
        updatedAt:
          type: string
          format: date-time
    controlplaneMachinePathMetrics:
      type: object
      properties:
        label:
          type: string
        path:
          type: string
        usedMb:
          type: string
          format: uint64
        totalMb:
          type: string
          format: uint64
        availableMb:
          type: string
          format: uint64
        usagePct:
          type: number
          format: float
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.