# List gpus

URL: https://docs.hanzo.ai/docs/openapi/compute/listgpus

> Returns one row per physical accelerator the caller's org has, derived from its real GPU machines (the size slug says how many cards a node holds) and from the accelerators BYO workers report through nvidia-smi.

`GET /v1/compute/gpus`

> [Compute →](https://docs.hanzo.ai/docs/openapi/compute) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/compute/gpus` |
| **Method**    | `GET`                                  |
| **Operation** | `listGpus`                             |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Returns one row per physical accelerator the caller's org has, derived
from its real GPU machines (the size slug says how many cards a node holds) and
from the accelerators BYO workers report through nvidia-smi.

Live telemetry is absent on Visor rows because Visor's machine object carries
none — an honest omission the console renders as "—", never a fabricated 0.

## Request

`GET /v1/compute/gpus` takes no parameters and no body — the credential is the whole request.

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | compute.gpuList | ok      |
| `default` | problem-details | refused |

`200` body — 10 fields.

| Field             | In   | Type               | Always | Description                                                                                                                                                                     |
| ----------------- | ---- | ------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gpus`            | body | compute.gpuView\[] | —      | GPUs is every accelerator the org has, from Visor GPU droplets and from BYO workers alike.                                                                                      |
| `gpus[].id`       | body | string             | —      | ID is the card's address: its host machine's id, "#", and the card's ordinal within that machine ("gpu-1#0").                                                                   |
| `gpus[].location` | body | string             | —      | Location is where the card physically sits, which for every source today is the same value Region carries — the console renders it in its own column.                           |
| `gpus[].machine`  | body | string             | —      | Machine is the id of the machine holding this card, addressable as-is on /v1/compute/machines/:id.                                                                              |
| `gpus[].memory`   | body | string             | —      | Memory is the card's VRAM as its own tooling reported it ("122880 MiB") — a display string in the reporter's units, not a byte count.                                           |
| `gpus[].model`    | body | string             | —      | Model is the accelerator: the model token read out of the size slug for a Visor GPU droplet ("H100", "MI300X"), or the name nvidia-smi reported for a BYO card ("NVIDIA GB10"). |
| `gpus[].name`     | body | string             | —      | Name is the HOST MACHINE's display name, not the card's — every card in a gpu-h100x8 node repeats it.                                                                           |
| `gpus[].provider` | body | string             | —      | Provider distinguishes a BYO accelerator ("byo") from a Visor-provisioned one (the host machine's real provider).                                                               |
| `gpus[].region`   | body | string             | —      | Region is the host machine's provider region slug; "on-prem" for a BYO card.                                                                                                    |
| `gpus[].status`   | body | string             | —      | Status is the HOST MACHINE's lifecycle state, because nothing upstream reports a card's own health.                                                                             |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo compute gpus get
```

**SDK**

**.ts**

```ts
import { Configuration, ComputeApi } from 'hanzoai';

const api = new ComputeApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.listGpus();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ComputeApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ComputeApi(client).list_gpus()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ComputeAPI.ListGpus(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, compute_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = compute_api::list_gpus(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ComputeApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new ComputeApi(client).listGpus();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/compute/gpus \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `compute`, op `listGpus` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "compute",
         "arguments": {
           "op": "listGpus",
           "input": {}
         }
       }
     }'
```

---

[Compute API](https://docs.hanzo.ai/docs/openapi/compute) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
