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

# List accelerators

> Returns items and a total for the accelerators held by the tenant selected by the X-CostGraph-Tenant-ID header. An accelerator that has reported gets its own item carrying its utilisation band, its 24h, 7d and 30d utilisation and memory, its hourly and monthly cost where the catalog prices it, and its MIG partitions with the ones that ran no compute marked idle. The accelerators on a machine that have not reported are counted in one further item per machine, with a null gpu_uuid, unreported_card_count set, and every measured field null rather than zero. A machine that reports its accelerators through the host agent rather than through Kubernetes gets its own item in the same shape, counted in unreported_card_count with every measured field null, since the agent reports what the hardware is and never how busy it was; such a machine is listed separately from any Kubernetes node and is never merged with one. model_source names what answered for the model, and reported_by names which path answered for the accelerator: operator for a card reporting through Kubernetes, agent for one the host agent inventoried, and catalog for cards the machine is priced for but none has reported. placement says where the accelerator sits and carries the ids a caller links on: placement.instance_id always, and placement.cluster_id, placement.node_id and placement.node_name where the machine is a Kubernetes node we hold, which is also what makes placement.kind workload rather than instance. placement.namespace names the namespace of the workload that asked for the accelerator, and stays null where no workload on that node asks for one or where more than one namespace does. gpu_availability states every signal the card could report, read from the measurements stored against it: supported where it was measured, capacity_unknown where it was measured but nothing expresses it as a percentage, unsupported where the card reports other signals but not this one, and no_data where the card reported nothing at all; no signal is ever omitted or returned as zero. A report whose 7-day or 30-day window has not been computed carries window_7d or window_30d as null rather than as a zero measurement. cost carries the currency every amount is in, the hourly and projected monthly rate the catalog prices the card at, and mtd_reason saying why mtd and change_percent are null; spend to date is billed for the whole machine, so it is never attributed to one accelerator and never rendered as zero. utilization_sparkline and memory_utilization_sparkline each carry the trailing 24 hours as 12 fixed-width 2 hour buckets, oldest first, each holding the highest percentage the card reached in that bucket; a bucket the card took no sample in is null, a card that has never reported carries twelve nulls rather than zeros, and a card carved into MIG partitions is read once for the whole card rather than once per partition. total_count is the filtered count before paging.



## OpenAPI

````yaml /api-reference/costgraph/openapi.json get /api/v1/tenant/gpus
openapi: 3.0.0
info:
  description: Read and manage your CostGraph organization, spend, alerts, and settings.
  title: CostGraph API
  contact: {}
  version: '1.0'
servers:
  - url: https://api.costgraph.ai
security: []
tags:
  - name: ai
    x-group: AI
  - name: ai-serving
    x-group: AI serving
  - name: anomalies
    x-group: Anomalies
  - name: auth
    x-group: Auth
  - name: billing
    x-group: Billing
  - name: billing-export
    x-group: Billing export
  - name: budgets
    x-group: Budgets
  - name: ci
    x-group: CI
  - name: compute-recommendations
    x-group: Compute recommendations
  - name: config
    x-group: Config
  - name: cost
    x-group: Cost
  - name: gpus
    x-group: GPUs
  - name: graphai
    x-group: Graph AI
  - name: infracost
    x-group: Infracost
  - name: integrations
    x-group: Integrations
  - name: invitations
    x-group: Invitations
  - name: kubernetes-clusters
    x-group: Kubernetes clusters
  - name: marketplace
    x-group: Marketplace
  - name: network-requests
    x-group: Network requests
  - name: notifications
    x-group: Notifications
  - name: oauth
    x-group: OAuth
  - name: oauth-clients
    x-group: OAuth clients
  - name: opencost
    x-group: OpenCost
  - name: organization
    x-group: Audit log
  - name: organizations
    x-group: Organizations
  - name: placement-alternatives
    x-group: Placement alternatives
  - name: reports
    x-group: Reports
  - name: service-map
    x-group: Service map
  - name: settings
    x-group: Settings
  - name: sso
    x-group: Single sign-on
  - name: tenants
    x-group: Tenants
  - name: user
    x-group: Users
  - name: virtual-machines
    x-group: Virtual machines
  - name: virtual-tags
    x-group: Virtual tags
  - name: workflows
    x-group: Workflows
paths:
  /api/v1/tenant/gpus:
    get:
      tags:
        - gpus
      summary: List accelerators
      description: >-
        Returns items and a total for the accelerators held by the tenant
        selected by the X-CostGraph-Tenant-ID header. An accelerator that has
        reported gets its own item carrying its utilisation band, its 24h, 7d
        and 30d utilisation and memory, its hourly and monthly cost where the
        catalog prices it, and its MIG partitions with the ones that ran no
        compute marked idle. The accelerators on a machine that have not
        reported are counted in one further item per machine, with a null
        gpu_uuid, unreported_card_count set, and every measured field null
        rather than zero. A machine that reports its accelerators through the
        host agent rather than through Kubernetes gets its own item in the same
        shape, counted in unreported_card_count with every measured field null,
        since the agent reports what the hardware is and never how busy it was;
        such a machine is listed separately from any Kubernetes node and is
        never merged with one. model_source names what answered for the model,
        and reported_by names which path answered for the accelerator: operator
        for a card reporting through Kubernetes, agent for one the host agent
        inventoried, and catalog for cards the machine is priced for but none
        has reported. placement says where the accelerator sits and carries the
        ids a caller links on: placement.instance_id always, and
        placement.cluster_id, placement.node_id and placement.node_name where
        the machine is a Kubernetes node we hold, which is also what makes
        placement.kind workload rather than instance. placement.namespace names
        the namespace of the workload that asked for the accelerator, and stays
        null where no workload on that node asks for one or where more than one
        namespace does. gpu_availability states every signal the card could
        report, read from the measurements stored against it: supported where it
        was measured, capacity_unknown where it was measured but nothing
        expresses it as a percentage, unsupported where the card reports other
        signals but not this one, and no_data where the card reported nothing at
        all; no signal is ever omitted or returned as zero. A report whose 7-day
        or 30-day window has not been computed carries window_7d or window_30d
        as null rather than as a zero measurement. cost carries the currency
        every amount is in, the hourly and projected monthly rate the catalog
        prices the card at, and mtd_reason saying why mtd and change_percent are
        null; spend to date is billed for the whole machine, so it is never
        attributed to one accelerator and never rendered as zero.
        utilization_sparkline and memory_utilization_sparkline each carry the
        trailing 24 hours as 12 fixed-width 2 hour buckets, oldest first, each
        holding the highest percentage the card reached in that bucket; a bucket
        the card took no sample in is null, a card that has never reported
        carries twelve nulls rather than zeros, and a card carved into MIG
        partitions is read once for the whole card rather than once per
        partition. total_count is the filtered count before paging.
      parameters:
        - description: Tenant ID
          name: X-CostGraph-Tenant-ID
          in: header
          required: true
          schema:
            type: string
        - description: Filter to one accelerator model
          name: model
          in: query
          schema:
            type: string
        - description: Filter to one utilisation band
          name: utilization_band
          in: query
          schema:
            type: string
        - description: Filter to accelerators held by one instance
          name: instance_id
          in: query
          schema:
            type: string
        - description: Filter to accelerators on the machines of one Kubernetes cluster
          name: cluster_id
          in: query
          schema:
            type: string
        - description: Filter to one or more cloud providers
          name: provider
          in: query
          explode: true
          schema:
            type: array
            items:
              type: string
        - description: 'Filter to where the accelerator sits: instance or workload'
          name: placement_kind
          in: query
          explode: true
          schema:
            type: array
            items:
              type: string
        - description: >-
            Case-insensitive match over the accelerator model and the name of
            the machine holding it
          name: search
          in: query
          schema:
            type: string
        - description: Filter to partitioned or whole cards
          name: partitioned
          in: query
          schema:
            type: boolean
        - description: >-
            Only accelerators that reported within this window, as a duration
            such as 24h, 7d or 30d. Omit to include ones that stopped reporting.
          name: window
          in: query
          schema:
            type: string
        - description: Number of rows to return (default 50, max 200)
          name: limit
          in: query
          schema:
            type: integer
        - description: Rows to skip
          name: offset
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/responses.SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/db.GPUListPage'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    responses.SuccessResponse:
      type: object
      required:
        - message
        - status
      properties:
        data: {}
        message:
          type: string
          example: some message
        status:
          type: string
          example: success
    db.GPUListPage:
      type: object
      required:
        - items
        - limit
        - offset
        - total_count
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/db.GPUListRow'
        limit:
          type: integer
        offset:
          type: integer
        total_count:
          type: integer
    responses.ErrorResponse:
      type: object
      required:
        - message
        - status
      properties:
        message:
          type: string
          example: some message
        status:
          type: string
          example: error
    db.GPUListRow:
      type: object
      required:
        - memory_utilization_sparkline
        - utilization_sparkline
      properties:
        action:
          type: string
        cost:
          $ref: '#/components/schemas/db.GPUCost'
        cost_per_hour:
          type: number
        data_age_hours:
          type: number
        data_quality_state:
          type: string
        gpu_count:
          type: number
        gpu_index:
          type: integer
        gpu_uuid:
          type: string
        idle_partition_count:
          type: integer
        instance_id:
          type: string
        last_reported_at:
          type: string
        memory_used_p95:
          type: number
        memory_used_p95_30d:
          type: number
        memory_used_p95_7d:
          type: number
        memory_utilization_percent:
          type: number
        memory_utilization_sparkline:
          type: array
          items:
            type: number
        mig_enabled:
          type: boolean
        model:
          type: string
        model_source:
          type: string
        partition_count:
          type: integer
        partitions:
          type: array
          items:
            $ref: '#/components/schemas/db.GPUPartition'
        placement:
          $ref: '#/components/schemas/db.GPUPlacement'
        power_mean_watts:
          type: number
        provider:
          type: string
        region:
          type: string
        reported_by:
          type: string
        unreported_card_count:
          type: integer
        urgency:
          type: string
        utilization_band:
          type: string
        utilization_p95_30d:
          type: number
        utilization_p95_7d:
          type: number
        utilization_percent:
          type: number
        utilization_sparkline:
          type: array
          items:
            type: number
        vendor:
          type: string
    db.GPUCost:
      type: object
      properties:
        change_percent:
          type: number
        currency:
          type: string
        hourly_rate:
          type: number
        mtd:
          type: number
        mtd_reason:
          type: string
        projected_monthly_spend:
          type: number
    db.GPUPartition:
      type: object
      properties:
        idle:
          type: boolean
        mig_instance_id:
          type: string
        mig_profile:
          type: string
        utilization_band:
          type: string
        utilization_p95:
          type: number
    db.GPUPlacement:
      type: object
      properties:
        cluster:
          type: string
        cluster_id:
          type: string
        instance_id:
          type: string
        kind:
          type: string
        name:
          type: string
        namespace:
          type: string
        node_id:
          type: string
        node_name:
          type: string
  securitySchemes:
    BearerAuth:
      description: Enter "Bearer {token}"
      type: apiKey
      name: Authorization
      in: header

````

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