> ## 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 compute recommendation summary

> Returns fleet-level compute recommendation totals for the tenant selected by the X-CostGraph-Tenant-ID header



## OpenAPI

````yaml /api-reference/costgraph/openapi.json get /api/v1/tenant/compute/recommendations/summary
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/compute/recommendations/summary:
    get:
      tags:
        - compute-recommendations
      summary: Get compute recommendation summary
      description: >-
        Returns fleet-level compute recommendation totals for the tenant
        selected by the X-CostGraph-Tenant-ID header
      parameters:
        - description: Tenant ID
          name: X-CostGraph-Tenant-ID
          in: header
          required: true
          schema:
            type: string
        - description: Resource type. Defaults to virtual_machine
          name: resource_type
          in: query
          schema:
            type: string
        - description: Filter by cloud provider (repeat param or comma-separated)
          name: provider
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by region (repeat param or comma-separated)
          name: region
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by availability zone (repeat param or comma-separated)
          name: availability_zone
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by instance type (repeat param or comma-separated)
          name: instance_type
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by architecture (repeat param or comma-separated)
          name: architecture
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by operating system (repeat param or comma-separated)
          name: operating_system
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by active heartbeat state
          name: active
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/responses.SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: >-
                          #/components/schemas/recommendations.ComputeRecommendationSummary
        '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
    recommendations.ComputeRecommendationSummary:
      type: object
      required:
        - action_counts
        - actionable_count
        - analysis_coverage
        - analyzed_resources
        - potential_savings_annual_usd
        - potential_savings_monthly_usd
        - top_savers
        - total_resources
      properties:
        action_counts:
          description: Resource counts broken down by recommendation action.
          allOf:
            - $ref: >-
                #/components/schemas/recommendations.ComputeRecommendationActionCounts
          x-nullable: 'false'
        actionable_count:
          description: |-
            Number of resources whose recommendation action is DOWNSIZE, UPSIZE,
            or TERMINATE: the sum of those three counts in ActionCounts.
          type: integer
        analysis_coverage:
          description: |-
            AnalyzedResources divided by TotalResources, as a ratio (0-1). Zero
            when TotalResources is zero.
          type: number
        analyzed_resources:
          description: |-
            Number of TotalResources that have completed at least one analysis
            cycle and so have an assigned action.
          type: integer
        potential_savings_annual_usd:
          description: PotentialSavingsMonthlyUSD multiplied by twelve.
          type: number
          x-semantic: costAmount
        potential_savings_monthly_usd:
          description: |-
            Combined monthly savings available by applying every actionable
            recommendation, in USD.
          type: number
          x-semantic: costAmount
        top_savers:
          description: Resources with the largest SavingsMonthlyUSD, sorted descending.
          type: array
          items:
            $ref: '#/components/schemas/recommendations.ComputeRecommendationTopSaver'
        total_resources:
          description: |-
            Number of resources matching the request's filters, regardless of
            analysis state.
          type: integer
    responses.ErrorResponse:
      type: object
      required:
        - message
        - status
      properties:
        message:
          type: string
          example: some message
        status:
          type: string
          example: error
    recommendations.ComputeRecommendationActionCounts:
      type: object
      required:
        - downsize
        - no_recommendation
        - noop
        - pending
        - terminate
        - upsize
      properties:
        downsize:
          description: >-
            Number of matching resources whose recommendation action is
            DOWNSIZE.
          type: integer
        no_recommendation:
          description: |-
            Number of matching resources whose recommendation action is
            NO_RECOMMENDATION (not enough signal to recommend a change).
          type: integer
        noop:
          description: >-
            Number of matching resources whose recommendation action is NOOP
            (the

            resource is already right-sized).
          type: integer
        pending:
          description: |-
            Number of matching resources that have not completed their first
            analysis cycle yet, so no action has been assigned.
          type: integer
        terminate:
          description: |-
            Number of matching resources whose recommendation action is
            TERMINATE.
          type: integer
        upsize:
          description: Number of matching resources whose recommendation action is UPSIZE.
          type: integer
    recommendations.ComputeRecommendationTopSaver:
      type: object
      required:
        - current_instance_type
        - name
        - recommended_instance_type
        - resource_id
        - resource_type
        - savings_monthly_usd
      properties:
        current_instance_type:
          description: Provider instance type or node SKU the resource currently runs as.
          type: string
        name:
          description: Display name of the resource.
          type: string
        recommended_instance_type:
          description: Provider instance type or node SKU the recommendation targets.
          type: string
        resource_id:
          description: Unique identifier of the resource.
          type: string
          x-semantic: resourceId
        resource_type:
          description: |-
            Kind of resource this recommendation covers, matching the request's
            resource_type filter (e.g. virtual machine or Kubernetes node).
          type: string
        savings_monthly_usd:
          description: >-
            Monthly savings from applying this resource's recommendation, in
            USD.
          type: number
          x-semantic: costAmount
  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.