Create a GPU VM

​

Create a new GPU VM using series-based SKU selection.

If skuCode is omitted, the backend automatically selects the cheapest available SKU based on location, series, GPU count, and price.

If skuCode is provided, the backend deploys exactly that SKU. skuCode is the platform SKU catalog code — the availableSkus[].skuCode value from the inventory endpoint, which is also what the GPU VM read endpoints return as configuration.skuCode. The provider's own offering code (availableSkus[].providerSkuCode) is still accepted for backward compatibility. Returns 400 if the SKU doesn't match the series/count or is not available at the chosen location.

If inventory is depleted between checking and ordering, returns 409 Conflict.

Body

required
application/json
  • Datacenter/region ID (from /series endpoint availability)

  • Number of GPUs

    values
    1248
  • Display name for the GPU VM. Letters, numbers, spaces, periods, and hyphens only; cannot start or end with a hyphen.

  • GPU series ID (from /series endpoint)

  • SSH key library UUID — the public key will be uploaded to the provider. Use GET /resource/ssh-keys to list available keys.

  • OS image UUID (alternative to imageName). If both are provided, imageName takes priority.

  • OS image name. Defaults to ubuntu-24.04 if not specified. Available options - ubuntu-22.04, ubuntu-24.04.

  • The resource group to create into. Omitted: the resource is placed in the tenant's Default resource group.

  • Optional explicit platform SKU catalog code (inventory availableSkus[].skuCode). The provider offering code is also accepted. If omitted, the cheapest available SKU is auto-selected.

  • Optional OS username for SSH access. If omitted, the image default username is used.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • No data center with that id

  • Inventory depleted - The chosen GPU configuration is no longer available at this location. Please refresh the order page to get current inventory.

  • application/json
  • application/json
  • GPU provider not available

Request Example for post/resource/gpu
curl https://api.gpcn.com/v1/resource/gpu \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: YOUR_SECRET_TOKEN' \
  --data '{
  "name": "GPU Trainer 1",
  "resourceGroupId": "",
  "datacenterId": "",
  "seriesId": "",
  "gpuCount": 1,
  "sshKeyId": "",
  "username": "",
  "skuCode": "",
  "imageName": "",
  "imageId": ""
}'
{
  "success": true,
  "message": "Operation initiated successfully",
  "data": {
    "jobs": [
      {
        "jobId": "123e4567-e89b-12d3-a456-426614174000",
        "resourceType": "virtual_machine",
        "resourceDisplayName": "string",
        "operation": "create",
        "stage": "initializing",
        "progressPercentage": 0,
        "message": "string",
        "errorMessage": "string",
        "estimatedCompletion": "2026-10-21T16:19:07.190Z",
        "timeRemaining": "string",
        "canRetry": true,
        "isCompleted": true,
        "isTerminal": true,
        "hasFailed": true,
        "resourceId": "123e4567-e89b-12d3-a456-426614174000",
        "resourceName": "string",
        "createdAt": "2026-10-21T16:19:07.190Z",
        "updatedAt": "2026-10-21T16:19:07.190Z"
      }
    ]
  },
  "meta": null
}