pydo.dedicated_inferences.list_accelerators()

Generated on 3 Aug 2026 from pydo version v0.40.0

Usage

client.dedicated_inferences.list_accelerators(
    dedicated_inference_id="6b5c619c-359c-44ca-87e2-47e98170c01d",
    per_page=20,
    page=1,
    slug=None,
)
Returns JSONRaises HttpResponseError

Description

List all accelerators (GPUs) in use by a Dedicated Inference instance. Send a GET request to /v2/dedicated-inferences/{dedicated_inference_id}/accelerators. Optionally filter by slug and use page/per_page for pagination.

Parameters

dedicated_inference_id string required

A unique identifier for a Dedicated Inference instance.

per_page integer optional

Number of items returned per page

Min: 1

Max: 200

Default: 20

page integer optional

Which 'page' of paginated results to return.

Min: 1

Default: 1

slug string optional

Filter accelerators by GPU slug.

Pagination

This method returns paginated results. The response includes a links.pages object with URLs for navigating between pages. To retrieve the next page, parse the next URL and pass the page parameter:

from urllib.parse import urlparse, parse_qs

resp = client.dedicated_inferences.list_accelerators(dedicated_inference_id="6b5c619c-359c-44ca-87e2-47e98170c01d", )
pages = resp.get("links", {}).get("pages", {})

while "next" in pages:
    parsed = urlparse(pages["next"])
    page = int(parse_qs(parsed.query)["page"][0])
    resp = client.dedicated_inferences.list_accelerators(dedicated_inference_id="6b5c619c-359c-44ca-87e2-47e98170c01d", page=page)
    pages = resp.get("links", {}).get("pages", {})

Response Example

Show Response Example
{
  "accelerators": [
    {
      "id": "5b5c619c-359c-44ca-87e2-47e98170c02f",
      "name": "mi300x1-ghfpsf",
      "slug": "gpu-mi300x1-192gb",
      "role": "prefill_and_decode",
      "status": "active",
      "created_at": "2024-01-09T20:44:32Z"
    }
  ],
  "links": {
    "pages": {
      "first": "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d/accelerators?page=1&per_page=20",
      "last": "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d/accelerators?page=1&per_page=20"
    }
  },
  "meta": {
    "total": 1
  }
}

More Information

See /v2/dedicated-inferences/{dedicated_inference_id}/accelerators in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.