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 (from the inventory availableSkus list), the backend deploys exactly that SKU. Returns 400 if the SKU doesn't match the series/count, or 409 if it's unavailable at the chosen location.

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

Body
required
application/json
  • datacenterId
    Type: stringFormat: uuid
    required

    Datacenter/region ID (from /series endpoint availability)

  • gpuCount
    Type: integerenum
    required

    Number of GPUs

    values
    • 1
    • 2
    • 4
    • 8
  • name
    Type: string
    required

    Name for the GPU VM

  • seriesId
    Type: stringFormat: uuid
    required

    GPU series ID (from /series endpoint)

  • sshKeyId
    Type: stringFormat: uuid
    required

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

  • imageId
    Type: stringFormat: uuid

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

  • imageName
    Type: string

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

  • resourceGroupId
    Type: stringFormat: uuid

    Resource group ID to assign the VM to

  • skuCode
    Type: string

    Optional explicit SKU code from inventory availableSkus. If omitted, cheapest available SKU is auto-selected.

  • username
    Type: string

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

Responses
  • application/json
  • application/json
  • application/json
  • 403

    GPU feature not enabled for this entity

  • 409

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

  • application/json
  • 503

    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": "",
  "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-05-19T14:02:02.487Z",
        "timeRemaining": "string",
        "canRetry": true,
        "isCompleted": true,
        "hasFailed": true,
        "resourceId": "123e4567-e89b-12d3-a456-426614174000",
        "resourceName": "string",
        "createdAt": "2026-05-19T14:02:02.487Z",
        "updatedAt": "2026-05-19T14:02:02.487Z"
      }
    ]
  },
  "meta": null
}