Skip to content

Create Bare Metal Instances

Provision a new bare metal instance with customized configurations and specifications defined in the request parameters.

HTTP Request

POST {API_URL}bare-metal/instances

Body Parameters

ParameterRequirementTypeDescription
nameRequiredstringInstance identifier for the deployed bare metal server
image_idRequiredstringOperating system image identifier. Available images can be retrieved via the /bare-metal/images endpoint
flavor_idRequiredstringHardware configuration identifier specifying CPU, memory, GPU, storage, and network specifications. Available configurations can be retrieved via the /bare-metal/flavors endpoint
ssh_keyRequiredObjectSSH authentication credentials for secure instance access. Format: {"name":"key_identifier","public_key":"ssh-ed25519 AAAA..."}

NOTE

Region compatibility is required between image_id and flavor_id to ensure successful instance creation.

Response Structure

status boolean

Operation result indicator. Returns true for successful execution, false when encountering an error.

message string

Descriptive response indicating the outcome of the instance creation request.

data object

Contains instance details including:

  • name: Assigned instance identifier
  • id: Unique instance identifier

Implementation Example

Request

bash
curl -X POST '{API_URL}bare-metal/instances' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'refresh-token: {REFRESH_TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
    "name": "rtx4090",
    "image_id": "6331d0eb805fd15079b6b182",
    "flavor_id": "6523bd891c8a89630712e423",
    "ssh_key": {
        "name": "sshkey",
        "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGBtAhxR75dYv1t3NuQ4lUVNKGVwf4Y/GEXCz4AZIR6 sshusername"
    }
}'

Response

json
{
    "status": true,
    "message": "Bare metal instance provisioning initiated successfully",
    "data": {
        "name": "BM-dhSqf5qh",
        "id": "66bd5a1299f01e419f5ad5ae"
    }
}