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

# Create bare metal machine

> Creates a bare-metal machine from high-level intent. `machine_class` is validated against the catalog. `image` is optional and is currently carried through without catalog validation.



## OpenAPI

````yaml /api-reference/compute-public.v1.openapi.json post /compute/v1/baremetalmachines
openapi: 3.0.3
info:
  title: Mount Thor Compute — friendly public compute API
  description: >-
    ComputeService is the friendly public compute API: lifecycle (create / get /
    list / delete / power) for VirtualMachines and BareMetalMachines expressed
    in high-level terms, plus the catalog/discovery surface that supplies the
    valid images and machine classes a caller may pick from. There is
    deliberately no Update RPC: the CR spec is whole-spec CEL-immutable, so an
    "edit" is delete + recreate.
  version: 0.1.0
servers: []
security: []
tags:
  - name: ComputeService
paths:
  /compute/v1/baremetalmachines:
    post:
      tags:
        - ComputeService
      summary: Create bare metal machine
      description: >-
        Creates a bare-metal machine from high-level intent. `machine_class` is
        validated against the catalog. `image` is optional and is currently
        carried through without catalog validation.
      operationId: ComputeService_CreateBareMetalMachine
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBareMetalMachineRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateBareMetalMachineResponse'
components:
  schemas:
    CreateBareMetalMachineRequest:
      type: object
      properties:
        name:
          type: string
          description: Optional. If you do not supply a name, the platform generates one.
        image:
          type: string
          description: image is optional for bare metal (not actuated today;
        machineClass:
          type: string
        ports:
          type: array
          items:
            $ref: '#/components/schemas/Port'
        sshAuthorizedKeys:
          type: array
          items:
            $ref: '#/components/schemas/SshAuthorizedKey'
    CreateBareMetalMachineResponse:
      type: object
      properties:
        bareMetalMachine:
          $ref: '#/components/schemas/BareMetalMachine'
    Port:
      type: object
      properties:
        name:
          type: string
          description: name of the endpoint, for example "ssh".
        guestPort:
          type: integer
          description: guest_port inside the machine (1-65535).
          format: uint32
      description: >-
        Port publishes one guest endpoint through the tunnel plane. Mirrors the
        CR's spec.ports[] item (name + guestPort); protocol/exposure are
        platform-managed and have no CR field, so they are not modelled here.
    SshAuthorizedKey:
      type: object
      properties:
        publicKey:
          type: string
          description: public_key in authorized_keys format. A public key is not a secret.
        username:
          type: string
      description: >-
        SshAuthorizedKey grants login with a public key. Maps to the CR's
        spec.sshAuthorizedKeys[] item. `username` is carried but disregarded
        today (every key installs into the platform-managed account mt-user).
    BareMetalMachine:
      type: object
      properties:
        name:
          type: string
        image:
          type: string
        machineClass:
          type: string
        ports:
          type: array
          items:
            $ref: '#/components/schemas/Port'
        sshAuthorizedKeys:
          type: array
          items:
            $ref: '#/components/schemas/SshAuthorizedKey'
        status:
          $ref: '#/components/schemas/MachineStatus'
        createdAt:
          type: string
          format: date-time
      description: BareMetalMachine is the friendly view/return shape of a bare-metal Mac.
    MachineStatus:
      type: object
      properties:
        id:
          type: string
          description: id is the platform-visible identity, e.g. "vm_<uid>".
        state:
          enum:
            - MACHINE_STATE_UNSPECIFIED
            - MACHINE_STATE_PENDING
            - MACHINE_STATE_RUNNING
            - MACHINE_STATE_FAILED
            - MACHINE_STATE_TERMINATING
          type: string
          format: enum
        ready:
          type: boolean
          description: ready is the status of the "Ready" condition.
        message:
          type: string
          description: >-
            message is a human-readable detail drawn from the most relevant
            condition.
      description: MachineStatus is the friendly projection of the CR status.

````