Skip to content

List All Droplet Sizes

client.GPUDroplets.Sizes.List(ctx, query) (*GPUDropletSizeListResponse, error)
get/v2/sizes

To list all of available Droplet sizes, send a GET request to /v2/sizes. The response will be a JSON object with a key called sizes. The value of this will be an array of size objects each of which contain the standard size attributes.

ParametersExpand Collapse
query GPUDropletSizeListParams
Page param.Field[int64]optional

Which 'page' of paginated results to return.

minimum1
PerPage param.Field[int64]optional

Number of items returned per page

minimum1
maximum200
ReturnsExpand Collapse
type GPUDropletSizeListResponse struct{…}

Information about the response itself.

Total int64optional

Number of objects returned by the request.

Sizes []Size
Available bool

This is a boolean value that represents whether new Droplets can be created with this size.

Description string

A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized.

Disk int64

The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes.

Memory int64

The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes.

multipleOf8
minimum8
PriceHourly float64

This describes the price of the Droplet size as measured hourly. The value is measured in US dollars.

formatfloat
PriceMonthly float64

This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars.

formatfloat
Regions []string

An array containing the region slugs where this size is available for Droplet creates.

Slug string

A human-readable string that is used to uniquely identify each size.

Transfer float64

The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes.

formatfloat
Vcpus int64

The number of CPUs allocated to Droplets of this size.

DiskInfo []DiskInfooptional

An array of objects containing information about the disks available to Droplets created with this size.

Size DiskInfoSizeoptional
Amount int64optional

The amount of space allocated to the disk.

Unit stringoptional

The unit of measure for the disk size.

Type DiskInfoTypeoptional

The type of disk. All Droplets contain a local disk. Additionally, GPU Droplets can also have a scratch disk for non-persistent data.

Accepts one of the following:
const DiskInfoTypeLocal DiskInfoType = "local"
const DiskInfoTypeScratch DiskInfoType = "scratch"
GPUInfo GPUInfooptional

An object containing information about the GPU capabilities of Droplets created with this size.

Count int64optional

The number of GPUs allocated to the Droplet.

Model stringoptional

The model of the GPU.

Vram GPUInfoVramoptional
Amount int64optional

The amount of VRAM allocated to the GPU.

Unit stringoptional

The unit of measure for the VRAM.

Accepts one of the following:
List All Droplet Sizes
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := gradient.NewClient(
    option.WithAccessToken("My Access Token"),
  )
  sizes, err := client.GPUDroplets.Sizes.List(context.TODO(), gradient.GPUDropletSizeListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sizes.Meta)
}
{
  "meta": {
    "total": 64
  },
  "sizes": [
    {
      "available": true,
      "description": "Basic",
      "disk": 25,
      "memory": 1024,
      "price_hourly": 0.00743999984115362,
      "price_monthly": 5,
      "regions": [
        "ams2",
        "ams3",
        "blr1",
        "fra1",
        "lon1",
        "nyc1",
        "nyc2",
        "nyc3",
        "sfo1",
        "sfo2",
        "sfo3",
        "sgp1",
        "tor1"
      ],
      "slug": "s-1vcpu-1gb",
      "transfer": 1,
      "vcpus": 1,
      "disk_info": [
        {
          "size": {
            "amount": 25,
            "unit": "gib"
          },
          "type": "local"
        }
      ],
      "gpu_info": {
        "count": 1,
        "model": "nvidia_h100",
        "vram": {
          "amount": 25,
          "unit": "gib"
        }
      }
    }
  ],
  "links": {
    "pages": {
      "last": "https://api.digitalocean.com/v2/sizes?page=64&per_page=1",
      "next": "https://api.digitalocean.com/v2/sizes?page=2&per_page=1"
    }
  }
}
Returns Examples
{
  "meta": {
    "total": 64
  },
  "sizes": [
    {
      "available": true,
      "description": "Basic",
      "disk": 25,
      "memory": 1024,
      "price_hourly": 0.00743999984115362,
      "price_monthly": 5,
      "regions": [
        "ams2",
        "ams3",
        "blr1",
        "fra1",
        "lon1",
        "nyc1",
        "nyc2",
        "nyc3",
        "sfo1",
        "sfo2",
        "sfo3",
        "sgp1",
        "tor1"
      ],
      "slug": "s-1vcpu-1gb",
      "transfer": 1,
      "vcpus": 1,
      "disk_info": [
        {
          "size": {
            "amount": 25,
            "unit": "gib"
          },
          "type": "local"
        }
      ],
      "gpu_info": {
        "count": 1,
        "model": "nvidia_h100",
        "vram": {
          "amount": 25,
          "unit": "gib"
        }
      }
    }
  ],
  "links": {
    "pages": {
      "last": "https://api.digitalocean.com/v2/sizes?page=64&per_page=1",
      "next": "https://api.digitalocean.com/v2/sizes?page=2&per_page=1"
    }
  }
}