---
title: "Provision a new bare-metal server rental"
method: POST
path: "/bare-metal/"
tags: ["Bare Metal"]
---

# Provision a new bare-metal server rental

`POST /bare-metal/`

## Request

- Base URL: `https://cloud-api.voltagepark.com/api/v1`
- URL: `https://cloud-api.voltagepark.com/api/v1/bare-metal/`
- Auth: one of:
  - HTTP bearer
  - API key in header `UI-Authorization`
- TypeScript: <https://skmtc.dev/voltagepark/apis/voltage-park-on-demand-api/docs/bare-metal/post.ts> (a function with typed inputs; its response is checked against the schema)

Deploys a bare-metal instance based on provided baremetal_config specifications
and user organization. This route requires an authorization check.

An associated k8s cluster will also be created.

## Headers

- `Idempotency-Key` string, nullable

## Request body

- BareMetalDeployConfig
  - `location_id` string, uuid, required
  - `gpu_count` integer, required
  - `name` string, required
  - `organization_ssh_keys` union: Configuration for organization-associated SSH keys. Can select all, none, or select keys by ID. Either this or `ssh_keys` must be provided.
    - OrganizationSshKeysSelectiveConfig
      - `mode` 'selective', required
      - `ssh_key_ids` string[], required: SSH key IDs can be found with the GET `/organization/ssh-keys` route.
    - OrganizationSshKeysNonSelectiveConfig
      - `mode` 'all' | 'none', required
  - `ssh_keys` string[]: Extra SSH keys which will be added to this deploy only. To use SSH keys registered with your organization, see the `organization_ssh_keys` field.
  - `network_type` 'infiniband' | 'ethernet', required: Machine networking: 3.2 Tbps Infiniband or 100 Gbps Ethernet
  - `sub_order` integer, nullable: If machines are deployed with a specified sub-order, they will only have network access to other machines in the same sub-order. Not specifying a sub-order will put the machine in either the ethernet or infiniband default suborders for your account.
  - `storage_id` string, uuid, nullable: If a storage volume is specified, the machine will be deployed with the storage volume attached.
  - `tags` string[]: Tags to add to the machine.
  - `cloudinit_script` BareMetalCloudInit
    - `packages` string[]
    - `write_files` CloudInitWriteFile[]
      - `encoding` string, nullable
      - `content` string, required
      - `owner` string, nullable
      - `path` string, required
      - `permissions` string, nullable
    - `runcmd` string[]
  - `addons` BareMetalAddons
    - `kubernetes` KubernetesAddon
      - `authentication_config_b64` string, base64, nullable: Base64 encoded AuthenticationConfig file. For more details, see the [Kubernetes docs](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration).
      - `version` '1.35' | '1.34' | '1.33' | '1.32', required
    - `slurm` SlurmAddon
      - `version` string, required
  - `custom_hostname` string, nullable: Your node will use this hostname with an index appended to it. For example, my-node1

## Response `201`

Successful Response

- DeployBareResult
  - `rental_id` string, uuid, required
  - `warning` string, nullable, required

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `409`: Conflict
- `422`: Validation Error

---

[API](https://skmtc.dev/voltagepark/apis/voltage-park-on-demand-api.md) - [All operations](https://skmtc.dev/voltagepark/apis/voltage-park-on-demand-api/llms.txt) - [OpenAPI document](https://skmtc.dev/voltagepark/apis/voltage-park-on-demand-api/revisions/11c2e9146826?raw)
