> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phala.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Nodes & Instance Types

> Functions for querying available TEE nodes and instance type configurations

## getAvailableNodes

`GET /teepods/available`

Returns available TEE nodes with capacity information and KMS details.

**Parameters:** None

**Returns:** `AvailableNodes`

| Field      | Type     | Description                                                       |
| ---------- | -------- | ----------------------------------------------------------------- |
| `tier`     | `string` | Workspace tier                                                    |
| `capacity` | `object` | Max limits: `max_instances`, `max_vcpu`, `max_memory`, `max_disk` |
| `nodes`    | `array`  | Available nodes with resource info                                |
| `kms_list` | `array`  | Available KMS instances                                           |

**Example:**

```typescript theme={"system"}
const available = await client.getAvailableNodes();
console.log(`Tier: ${available.tier}`);
available.nodes.forEach(node => {
  console.log(`Node ${node.id}: ${node.region}`);
});
```

***

## listAllInstanceTypeFamilies

`GET /instance-types`

Returns all instance type families and their configurations.

**Parameters:** None

**Returns:** `AllFamiliesResponse` — families with their instance types.

**Example:**

```typescript theme={"system"}
const families = await client.listAllInstanceTypeFamilies();
families.forEach(family => {
  console.log(`${family.name}:`);
  family.instance_types.forEach(t => {
    console.log(`  ${t.slug}: ${t.vcpu} vCPU, ${t.memory_mb}MB`);
  });
});
```

***

## listFamilyInstanceTypes

`GET /instance-types/{family}`

Returns instance types for a specific family (e.g., `cpu`, `gpu`).

**Parameters:**

| Field    | Type     | Required | Description                          |
| -------- | -------- | -------- | ------------------------------------ |
| `family` | `string` | Yes      | Family name (e.g., `"cpu"`, `"gpu"`) |

**Returns:** `FamilyInstanceTypesResponse` — instance types in the family.

**Example:**

```typescript theme={"system"}
const cpuTypes = await client.listFamilyInstanceTypes({ family: "cpu" });
```

***

## getOsImages

`GET /os-images`

Returns a paginated list of publicly available OS images. Each image includes metadata like the image hash, GPU requirement flag, and whether it is a dev image. Use this when you need the full catalog of images with pagination support.

**Parameters:**

| Field       | Type      | Required | Description                |
| ----------- | --------- | -------- | -------------------------- |
| `page`      | `number`  | No       | Page number (default: 1)   |
| `page_size` | `number`  | No       | Items per page             |
| `is_dev`    | `boolean` | No       | Filter for dev images only |

**Returns:** `GetOsImagesResponse`

| Field       | Type     | Description                                                                         |
| ----------- | -------- | ----------------------------------------------------------------------------------- |
| `items`     | `array`  | OS images with `name`, `slug`, `version`, `os_image_hash`, `is_dev`, `requires_gpu` |
| `total`     | `number` | Total number of images                                                              |
| `page`      | `number` | Current page                                                                        |
| `page_size` | `number` | Items per page                                                                      |
| `pages`     | `number` | Total pages                                                                         |

**Example:**

```typescript theme={"system"}
const images = await client.getOsImages({ page: 1, page_size: 10 });
images.items.forEach(img => {
  console.log(`${img.name} v${img.version} (hash: ${img.os_image_hash})`);
});
```
