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

# List cluster node groups

> Lists your cluster's node groups. Only available for projects that have a GPU cluster; any other project answers 404 PROJECT_NOT_A_CLUSTER. While the requirements are a draft, the list is empty.



## OpenAPI

````yaml https://spec.speakeasy.com/latitude/latitude/latitude-sh-api-with-code-samples get /projects/{project_id}/cluster/node_groups
openapi: 3.0.1
info:
  title: Latitude.sh API
  version: '2023-06-01'
  description: >-
    The Latitude.sh API is a RESTful API to manage your Latitude.sh account. It
    allows you to perform the same actions as the Latitude.sh dashboard.
servers:
  - url: https://api.latitude.sh
    variables:
      latitude_api_key:
        default: <insert your api key here>
  - url: http://api.latitude.sh
    variables:
      latitude_api_key:
        default: <insert your api key here>
security: []
tags:
  - name: API keys
  - name: Baselines (Preview)
    description: >-
      Preview. Available to teams with the `baselines_api` feature flag. The
      shape of these endpoints may change before general availability.
  - name: Billing
  - name: Clusters
    description: >-
      Projects that have a GPU cluster only. Every operation answers 404
      PROJECT_NOT_A_CLUSTER for a project without one.
  - name: Elastic Ips
  - name: Events
  - name: Firewalls
  - name: Inference
  - name: IP Addresses
  - name: Managed Databases
    description: Managed database instances (PostgreSQL, ClickHouse)
  - name: Kubernetes Clusters
  - name: LKS
  - name: Marketplace apps
  - name: Operating Systems
  - name: Plans
  - name: Sandboxes (Preview)
    description: >-
      Preview. Available to teams with the `sandboxes_api` feature flag. The
      shape of these endpoints may change before general availability.
  - name: Public Networks
  - name: Private Networks
  - name: Projects
  - name: Regions
  - name: Roles
  - name: SSH Keys
  - name: Servers
  - name: Block Storage
  - name: Filesystem Storage
  - name: Object Storage
  - name: Tags
  - name: Teams
  - name: Team members
  - name: Traffic
  - name: User data
  - name: User profile
  - name: Virtual machines
  - name: Virtual machine backups
  - name: Virtual machine restores
paths:
  /projects/{project_id}/cluster/node_groups:
    get:
      tags:
        - Clusters
      summary: List cluster node groups
      description: >-
        Lists your cluster's node groups. Only available for projects that have
        a GPU cluster; any other project answers 404 PROJECT_NOT_A_CLUSTER.
        While the requirements are a draft, the list is empty.
      operationId: get-project-cluster-node-groups
      parameters:
        - name: project_id
          in: path
          required: true
          description: The ID or slug of a project that has a GPU cluster
          examples:
            Success:
              value: proj_lxWpD699qm6rk
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/vnd.api+json:
              examples:
                Success:
                  value:
                    data:
                      - id: '7'
                        type: cluster_node_groups
                        attributes:
                          name: gpu-b300
                          kind: gpu
                          plan: g4-b300-large
                          plan_name: g4.b300.large
                          server_count: 16
                          os: ubuntu_24_04_x64_lts
                    meta:
                      total: 1
              schema:
                $ref: '#/components/schemas/cluster_node_groups'
        '404':
          description: Project is not a cluster, or project not found
          content:
            application/vnd.api+json:
              examples:
                Project is not a cluster:
                  value:
                    errors:
                      - code: PROJECT_NOT_A_CLUSTER
                        title: Project Not A Cluster
                        detail: This project is not a cluster
                        status: '404'
                        meta: {}
      security:
        - Bearer: []
      x-codeSamples:
        - lang: go
          label: Go (SDK)
          source: "package main\n\nimport(\n\t\"context\"\n\t\"os\"\n\tlatitudeshgosdk \"github.com/latitudesh/latitudesh-go-sdk\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := latitudeshgosdk.New(\n        latitudeshgosdk.WithSecurity(os.Getenv(\"LATITUDESH_BEARER\")),\n    )\n\n    res, err := s.Clusters.GetProjectClusterNodeGroups(ctx, \"proj_lxWpD699qm6rk\")\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.ClusterNodeGroups != nil {\n        // handle response\n    }\n}"
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Latitudesh } from "latitudesh-typescript-sdk";

            const latitudesh = new Latitudesh({
              bearer: process.env["LATITUDESH_BEARER"] ?? "",
            });

            async function run() {
              const result = await latitudesh.clusters.getProjectClusterNodeGroups({
                projectId: "proj_lxWpD699qm6rk",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    cluster_node_groups:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/cluster_node_group_data'
        meta:
          type: object
          properties:
            total:
              type: integer
    cluster_node_group_data:
      type: object
      properties:
        id:
          type: string
          example: '7'
          description: The node group id
        type:
          type: string
          enum:
            - cluster_node_groups
        attributes:
          type: object
          properties:
            name:
              type: string
              example: gpu-workers
            kind:
              type: string
              enum:
                - gpu
                - cpu
                - storage
                - management
                - other
              example: gpu
            plan:
              type: string
              nullable: true
              example: g4-b300-large
              description: The plan slug; null while no plan is set
            plan_name:
              type: string
              nullable: true
              example: g4.b300.large
            server_count:
              type: integer
              example: 16
            os:
              type: string
              nullable: true
              example: ubuntu_24_04_x64_lts
              description: The operating system slug; null while none is set
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.