POST
/
cloud
/
v1
/
ai
/
clusters
/
gpu
/
{project_id}
/
{region_id}
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
task_id_list = client.cloud.gpu_baremetal_clusters.create(
    project_id=0,
    region_id=0,
    flavor="bm3-ai-1xlarge-h100-80-8",
    image_id="f01fd9a0-9548-48ba-82dc-a8c8b2d6f2f1",
    interfaces=[{
        "network_id": "024a29e9-b4b7-4c91-9a46-505be123d9f8",
        "subnet_id": "91200a6c-07e0-42aa-98da-32d1f6545ae7",
        "type": "subnet",
    }],
    name="my-gpu-cluster",
)
print(task_id_list.tasks)
{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

Body

application/json
flavor
string
required

Flavor name

Examples:

"bm3-ai-1xlarge-h100-80-8"

image_id
string<uuid4>
required

Image ID

Examples:

"f01fd9a0-9548-48ba-82dc-a8c8b2d6f2f1"

interfaces
Interfaces · array
required

A list of network interfaces for the server. You can create one or more interfaces - private, public, or both.

Minimum length: 1
Examples:
[
{
"network_id": "024a29e9-b4b7-4c91-9a46-505be123d9f8",
"subnet_id": "91200a6c-07e0-42aa-98da-32d1f6545ae7",
"type": "subnet"
}
]
name
string
required

GPU Cluster name

Examples:

"my-gpu-cluster"

instances_count
integer
default:1

Number of servers to create

Required range: x >= 1
Examples:

1

password
string

A password for a bare metal server. This parameter is used to set a password for the "Admin" user on a Windows instance, a default user or a new user on a Linux instance

ssh_key_name
string

Specifies the name of the SSH keypair, created via the /v1/ssh_keys endpoint.

Examples:

"my-ssh-key"

tags
object

Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.

user_data
string

String in base64 format. Must not be passed together with 'username' or 'password'. Examples of the user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html

username
string

A name of a new user in the Linux instance. It may be passed with a 'password' parameter

Response

created tasks for cluster creation

tasks
string[]
required

List of task IDs

Examples:
["d478ae29-dedc-4869-82f0-96104425f565"]