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 API requests into a single operation, allowing you to use the output of one request as the input for a subsequent request.

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.

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": "15f67991-0f51-4efc-a8ad-ef1fb31a480c"
      },
      "entities": {
        "volumes": {
            "items": [
                {
                    "properties": {
                        "name": "GPU Volume",
                        "bus": "VIRTIO",
                        "licenceType": "LINUX"
                    }
                }
            ]
        }
    }
}'

Request parameters

Parameter

Type

Required

Description

Authorization

string

Yes

The Bearer token.

Content-Type

string

Yes

Must be application/json.

Response

A 202 message confirms that the instance is created.

Last updated

Was this helpful?