# Instance Types

## Get Instance Type

**get** `/v1/instance_types/{region}/{name}`

Get an instance type by region and name

### Path Parameters

- `region: "us-sva-2"`

  - `"us-sva-2"`

- `name: string`

### Returns

- `InstanceType object { chipset, created_at, family, 7 more }`

  Instance type.

  - `chipset: string`

  - `created_at: string`

    When the Instance Type was created.

  - `family: string`

  - `memory_gb: number`

  - `name: string`

  - `network_bandwidth_gbps: number`

    Network bandwidth in Gbps.

  - `region: RegionName`

    Region the resource is in.

    - `"us-sva-2"`

  - `series: string`

  - `updated_at: string`

    When the Instance Type was updated.

  - `vcpu: number`

### Example

```http
curl https://api.nirvanalabs.io/v1/instance_types/$REGION/$NAME \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"
```

#### Response

```json
{
  "chipset": "amd-epyc-9354p",
  "created_at": "2025-01-01T00:00:00Z",
  "family": "standard",
  "memory_gb": 32,
  "name": "n1-standard-8",
  "network_bandwidth_gbps": 1,
  "region": "us-sva-2",
  "series": "n1",
  "updated_at": "2025-01-01T00:00:00Z",
  "vcpu": 8
}
```

## List Instance Types

**get** `/v1/instance_types`

List instance types

### Query Parameters

- `cursor: optional string`

  Pagination cursor returned by a previous request

- `limit: optional number`

  Maximum number of items to return

### Returns

- `InstanceTypeList object { items, pagination }`

  - `items: array of InstanceType`

    - `chipset: string`

    - `created_at: string`

      When the Instance Type was created.

    - `family: string`

    - `memory_gb: number`

    - `name: string`

    - `network_bandwidth_gbps: number`

      Network bandwidth in Gbps.

    - `region: RegionName`

      Region the resource is in.

      - `"us-sva-2"`

    - `series: string`

    - `updated_at: string`

      When the Instance Type was updated.

    - `vcpu: number`

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string`

    - `previous_cursor: string`

    - `total_count: number`

### Example

```http
curl https://api.nirvanalabs.io/v1/instance_types \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"
```

#### Response

```json
{
  "items": [
    {
      "chipset": "amd-epyc-9354p",
      "created_at": "2025-01-01T00:00:00Z",
      "family": "standard",
      "memory_gb": 32,
      "name": "n1-standard-8",
      "network_bandwidth_gbps": 1,
      "region": "us-sva-2",
      "series": "n1",
      "updated_at": "2025-01-01T00:00:00Z",
      "vcpu": 8
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
```

## Domain Types

### Instance Type

- `InstanceType object { chipset, created_at, family, 7 more }`

  Instance type.

  - `chipset: string`

  - `created_at: string`

    When the Instance Type was created.

  - `family: string`

  - `memory_gb: number`

  - `name: string`

  - `network_bandwidth_gbps: number`

    Network bandwidth in Gbps.

  - `region: RegionName`

    Region the resource is in.

    - `"us-sva-2"`

  - `series: string`

  - `updated_at: string`

    When the Instance Type was updated.

  - `vcpu: number`

### Instance Type List

- `InstanceTypeList object { items, pagination }`

  - `items: array of InstanceType`

    - `chipset: string`

    - `created_at: string`

      When the Instance Type was created.

    - `family: string`

    - `memory_gb: number`

    - `name: string`

    - `network_bandwidth_gbps: number`

      Network bandwidth in Gbps.

    - `region: RegionName`

      Region the resource is in.

      - `"us-sva-2"`

    - `series: string`

    - `updated_at: string`

      When the Instance Type was updated.

    - `vcpu: number`

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string`

    - `previous_cursor: string`

    - `total_count: number`
