Skip to content
  • Auto
  • Light
  • Dark

List

List All Droplet Sizes
gpu_droplets.sizes.list(SizeListParams**kwargs) -> SizeListResponse
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
page: Optional[int]

Which 'page' of paginated results to return.

minimum1
per_page: Optional[int]

Number of items returned per page

minimum1
maximum200
ReturnsExpand Collapse
class SizeListResponse:

Information about the response itself.

sizes: List[Size]
available: bool

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

description: str

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

disk: int

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

memory: int

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

multipleOf8
minimum8
price_hourly: float

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

formatfloat
price_monthly: float

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: List[str]

An array containing the region slugs where this size is available for Droplet creates. regions:read is required to view.

slug: str

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

transfer: float

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: int

The number of CPUs allocated to Droplets of this size.

disk_info: Optional[List[DiskInfo]]

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

size: Optional[Size]
amount: Optional[int]

The amount of space allocated to the disk.

unit: Optional[str]

The unit of measure for the disk size.

type: Optional[Literal["local", "scratch"]]

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:
"local"
"scratch"
gpu_info: Optional[GPUInfo]

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

from gradient import Gradient

client = Gradient()
sizes = client.gpu_droplets.sizes.list()
print(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"
    }
  }
}