Create a Cloud GPU VM

You can create a Cloud GPU VM in a specific data center using a composite call, a specialized configuration containing a GPU card. These resources must be defined simultaneously in a single composite request. Composite calls efficiently bundle a series of REST APIarrow-up-right requests into a single operation, allowing you to use the output of one request as the input for a subsequent request.

circle-info

Note: The payload for a composite call that configures a Cloud GPU VM differs significantly from a standard POST request used to create an Enterprise Server. With the composite call, you can simultaneously create a new instance, define its direct-attached storage device, and select the image (public image, a private image, or a snapshot) in a single request. Once the request is processed, the Cloud GPU VM is created, and the direct-attached storage is mounted automatically.

circle-exclamation

Request endpoint

Use the following endpoint for the Cloud GPU VM creation: https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/servers

Request

Use a POST request to the servers collection endpoint within the target data center. This single request acts as the composite call, provisioning the VM and its specialized devices simultaneously.

curl --location \
--request POST 'https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/servers' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJraWQiO' \
--header 'Content-Type: application/json'
'{
  "properties": {
   "name": "My GPU server",
    "type": "GPU",
    "availabilityZone": "AUTO",
    "templateUuid": "e15d15e7-ea9a-48ae-a60a-29b9463f4519"
      },
      "entities": {
        "volumes": {
            "items": [
                {
                    "properties": {
                        "name": "GPU Volume",
                        "imageAlias": "ubuntu:latest",
                        "imagePassword": "xxxxxxxxxx"
                    }
                }
            ]
        }
    }
}'

Request parameters

Header Parameters

To make authenticated requests to the API, the following fields are mandatory in the request header:

Name

Type

Required

Description

Authorization

string

Yes

The Bearer token.

Content-Type

string

Yes

Must be application/json.

Path Parameters

To make authenticated requests to the API, the following fields are mandatory in the request header:

Name

Type

Required

Description

datacenterId

string

Yes

The ID of the data center.

Response

A 202 message confirms that the instance is in the process of being created. You may want to poll the status URI that is returned in the response header to follow the progress of provisioning. The instance will be available once the status is set to "DONE".

Last updated

Was this helpful?