> ## 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.

# Get an accelerator

> Returns one accelerator held by the tenant selected by the X-CostGraph-Tenant-ID header: its model, vendor and provider, where it sits, its cost_summary where the catalog prices it, whether it is carved into MIG partitions with how many of them ran no compute, its compute and memory utilisation, its MIG partitions with the ones that ran no compute marked idle, and reports carrying every measurement recorded against it with a row per partition where the card is carved up. Every measured field is null rather than zero where nothing was measured, and every field the card also carries in the list carries the same name and the same value here. 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. cost_summary carries the currency every amount is in, and the hourly and projected monthly rate the catalog prices the card at; mtd and change_percent are always null with mtd_reason saying why, since spend to date is billed for the whole machine, so it is never attributed to one accelerator and never rendered as zero. A uuid the tenant has never reported gets a 404, and the accelerators on a machine that have not reported are only ever counted in the list's aggregate item, so they have no detail of their own. Where the same uuid has reported against more than one machine, the card the list ranks first wins and its reports are the ones from that same machine; filter the list by instance_id to reach the others. serving names the model-serving deployment running on the card, resolved from the pod the accelerator itself reports rather than from any name: serving.deployment_id is set only in state resolved, and addresses the same deployment /ai/deployments lists, so its serving series can be read from /ai/deployments/{id}/metrics. Every other state leaves deployment_id null and says why in serving.reason - shared when more than one serving deployment holds the card, not_serving when the pod holding it serves no model, unheld when no pod reported against it, partitioned when the card is carved up and its partitions report no pod, and unavailable when the lookup could not be made at all, which includes a card whose machine is not a Kubernetes node we hold. serving_holders carries every holder of the card rather than the single one serving resolves to, so a shared card can be charted in full. Each holder is named the way its placement names it: a card on a Kubernetes node we hold names its holders by namespace, pod and container with process_name and process_id null, and a card on any other machine names them by the process on the host, carrying process_name and process_id with namespace, pod and container null. mig_instance_id names the partition the holder occupies and is null where the holder holds the whole card. deployment_id and deployment_name are set only where the holder is a model-serving deployment we measure, and address the same deployment /ai/deployments lists. A card nothing holds carries an empty list rather than null, with serving.reason saying why.



## OpenAPI

````yaml /api-reference/costgraph/openapi.json get /api/v1/tenant/gpus/{gpu_uuid}
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/{gpu_uuid}:
    get:
      tags:
        - gpus
      summary: Get an accelerator
      description: >-
        Returns one accelerator held by the tenant selected by the
        X-CostGraph-Tenant-ID header: its model, vendor and provider, where it
        sits, its cost_summary where the catalog prices it, whether it is carved
        into MIG partitions with how many of them ran no compute, its compute
        and memory utilisation, its MIG partitions with the ones that ran no
        compute marked idle, and reports carrying every measurement recorded
        against it with a row per partition where the card is carved up. Every
        measured field is null rather than zero where nothing was measured, and
        every field the card also carries in the list carries the same name and
        the same value here. 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. cost_summary carries the
        currency every amount is in, and the hourly and projected monthly rate
        the catalog prices the card at; mtd and change_percent are always null
        with mtd_reason saying why, since spend to date is billed for the whole
        machine, so it is never attributed to one accelerator and never rendered
        as zero. A uuid the tenant has never reported gets a 404, and the
        accelerators on a machine that have not reported are only ever counted
        in the list's aggregate item, so they have no detail of their own. Where
        the same uuid has reported against more than one machine, the card the
        list ranks first wins and its reports are the ones from that same
        machine; filter the list by instance_id to reach the others. serving
        names the model-serving deployment running on the card, resolved from
        the pod the accelerator itself reports rather than from any name:
        serving.deployment_id is set only in state resolved, and addresses the
        same deployment /ai/deployments lists, so its serving series can be read
        from /ai/deployments/{id}/metrics. Every other state leaves
        deployment_id null and says why in serving.reason - shared when more
        than one serving deployment holds the card, not_serving when the pod
        holding it serves no model, unheld when no pod reported against it,
        partitioned when the card is carved up and its partitions report no pod,
        and unavailable when the lookup could not be made at all, which includes
        a card whose machine is not a Kubernetes node we hold. serving_holders
        carries every holder of the card rather than the single one serving
        resolves to, so a shared card can be charted in full. Each holder is
        named the way its placement names it: a card on a Kubernetes node we
        hold names its holders by namespace, pod and container with process_name
        and process_id null, and a card on any other machine names them by the
        process on the host, carrying process_name and process_id with
        namespace, pod and container null. mig_instance_id names the partition
        the holder occupies and is null where the holder holds the whole card.
        deployment_id and deployment_name are set only where the holder is a
        model-serving deployment we measure, and address the same deployment
        /ai/deployments lists. A card nothing holds carries an empty list rather
        than null, with serving.reason saying why.
      parameters:
        - description: Tenant ID
          name: X-CostGraph-Tenant-ID
          in: header
          required: true
          schema:
            type: string
        - description: Accelerator UUID as the device reports it
          name: gpu_uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/responses.SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/db.GPUDetail'
        '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'
        '404':
          description: Not Found
          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.GPUDetail:
      type: object
      properties:
        cost_summary:
          $ref: '#/components/schemas/db.GPUCost'
        gpu_availability:
          type: object
          additionalProperties:
            type: string
        gpu_uuid:
          type: string
        idle_partition_count:
          type: integer
        instance_id:
          type: string
        memory_utilization_percent:
          type: number
        mig_enabled:
          type: boolean
        model:
          type: string
        partition_count:
          type: integer
        partitions:
          type: array
          items:
            $ref: '#/components/schemas/db.GPUPartition'
        placement:
          $ref: '#/components/schemas/db.GPUPlacement'
        provider:
          type: string
        reports:
          type: array
          items:
            $ref: '#/components/schemas/db.GPUReportRow'
        serving:
          $ref: '#/components/schemas/db.GPUServing'
        serving_holders:
          type: array
          items:
            $ref: '#/components/schemas/db.GPUServingHolder'
        utilization_percent:
          type: number
        vendor:
          type: string
    responses.ErrorResponse:
      type: object
      required:
        - message
        - status
      properties:
        message:
          type: string
          example: some message
        status:
          type: string
          example: error
    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
    db.GPUReportRow:
      type: object
      properties:
        action:
          type: string
        created_at:
          type: string
        data_age_hours:
          type: number
        data_quality_state:
          type: string
        gpu_count:
          type: number
        gpu_index:
          type: number
        gpu_model:
          type: string
        gpu_uuid:
          type: string
        id:
          type: string
        instance_id:
          type: string
        last_sample_age_seconds:
          type: number
        metric_presence_flags:
          type: array
          items:
            type: string
        mig_instance_id:
          type: string
        mig_profile:
          type: string
        observed:
          $ref: '#/components/schemas/schema.StatsRow'
        observed_stats_id:
          type: string
        partial_windows_flags:
          type: array
          items:
            type: string
        qos_value_type_id:
          type: string
        reasons:
          type: object
        stats_30d_id:
          type: string
        stats_7d_id:
          type: string
        tenant_id:
          type: string
        updated_at:
          type: string
        urgency:
          type: string
        utilization_band:
          type: string
        value_type:
          type: string
        window_30d:
          $ref: '#/components/schemas/schema.StatsRow'
        window_7d:
          $ref: '#/components/schemas/schema.StatsRow'
    db.GPUServing:
      type: object
      properties:
        deployment_id:
          type: string
        deployment_name:
          type: string
        namespace:
          type: string
        reason:
          type: string
        state:
          type: string
    db.GPUServingHolder:
      type: object
      properties:
        container:
          type: string
        deployment_id:
          type: string
        deployment_name:
          type: string
        mig_instance_id:
          type: string
        namespace:
          type: string
        pod:
          type: string
        process_id:
          type: string
        process_name:
          type: string
    schema.StatsRow:
      type: object
      properties:
        id:
          type: string
        last:
          type: number
        max:
          type: number
        mean:
          type: number
        min:
          type: number
        p50:
          type: number
        p90:
          type: number
        p95:
          type: number
        p99:
          type: number
        std_dev:
          type: number
        tenant_id:
          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.