> ## 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 kubernetes cluster autopilot savings

> Returns what CostGraph AutoPilot saved and added in one cluster for a period, one entry per UTC hour, day or month clipped to the period, plus the period total. Saved and added are cost AutoPilot removed from or added to the managed workloads' cost (by sizing and by pool placement), not bill savings. Dollars are null when the cost behind them could not be priced; not_priced_containers counts those containers. hours is the number of hours with recorded data in each entry, so a partial entry is visible. Only workloads AutoPilot currently runs on (managed, limited, learning or rolled back) are counted, including their earlier history; savings of workloads it no longer runs on are left out. Coverage counts managed workloads and managed pod-hours, including periods where AutoPilot changed nothing; workloads saved, added and unchanged can sum to less than managed workloads, because a workload whose cost could not be priced or nets exactly zero is in none of them. from and to are RFC 3339 and truncated to the hour, to is exclusive; the default is the last 30 days ending at the last closed hour; a period over 400 days is rejected, and hour granularity is limited to 31 days. Optional filters narrow the figures to one workload, container, node, node pool or GPU model.



## OpenAPI

````yaml /api-reference/costgraph/openapi.json get /api/v1/tenant/clusters/{cluster_id}/autopilot/savings
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: context-graph
    x-group: Context graph
  - name: cost
    x-group: Cost
  - name: gpus
    x-group: GPUs
  - name: graphai
    x-group: Graph AI
  - name: integrations
    x-group: Integrations
  - name: invitations
    x-group: Invitations
  - name: kubernetes-clusters
    x-group: Kubernetes clusters
  - name: marketplace
    x-group: Marketplace
  - name: network
    x-group: Network
  - 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: settings
    x-group: Settings
  - name: sso
    x-group: Single sign-on
  - name: tenants
    x-group: Tenants
  - name: ticketing
    x-group: Ticketing
  - 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/clusters/{cluster_id}/autopilot/savings:
    get:
      tags:
        - kubernetes-clusters
      summary: Get kubernetes cluster autopilot savings
      description: >-
        Returns what CostGraph AutoPilot saved and added in one cluster for a
        period, one entry per UTC hour, day or month clipped to the period, plus
        the period total. Saved and added are cost AutoPilot removed from or
        added to the managed workloads' cost (by sizing and by pool placement),
        not bill savings. Dollars are null when the cost behind them could not
        be priced; not_priced_containers counts those containers. hours is the
        number of hours with recorded data in each entry, so a partial entry is
        visible. Only workloads AutoPilot currently runs on (managed, limited,
        learning or rolled back) are counted, including their earlier history;
        savings of workloads it no longer runs on are left out. Coverage counts
        managed workloads and managed pod-hours, including periods where
        AutoPilot changed nothing; workloads saved, added and unchanged can sum
        to less than managed workloads, because a workload whose cost could not
        be priced or nets exactly zero is in none of them. from and to are RFC
        3339 and truncated to the hour, to is exclusive; the default is the last
        30 days ending at the last closed hour; a period over 400 days is
        rejected, and hour granularity is limited to 31 days. Optional filters
        narrow the figures to one workload, container, node, node pool or GPU
        model.
      parameters:
        - description: Tenant ID
          name: X-CostGraph-Tenant-ID
          in: header
          required: true
          schema:
            type: string
        - description: Kubernetes cluster ID
          name: cluster_id
          in: path
          required: true
          schema:
            type: string
        - description: Period start (RFC 3339, inclusive)
          name: from
          in: query
          schema:
            type: string
        - description: Period end (RFC 3339, exclusive)
          name: to
          in: query
          schema:
            type: string
        - description: 'Entry size: hour, day (default) or month'
          name: granularity
          in: query
          schema:
            type: string
        - description: Only this workload resource ID
          name: workload_id
          in: query
          schema:
            type: string
        - description: Only containers with this name
          name: container
          in: query
          schema:
            type: string
        - description: Only containers on this node (node ID)
          name: node_id
          in: query
          schema:
            type: string
        - description: Only node pools of this autoscaler
          name: pool_autoscaler
          in: query
          schema:
            type: string
        - description: Only this node pool
          name: pool
          in: query
          schema:
            type: string
        - description: Only containers on nodes with this GPU model
          name: gpu_model
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/responses.SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/operator.AutopilotSavingsSeries'
        '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
    operator.AutopilotSavingsSeries:
      type: object
      required:
        - from
        - granularity
        - periods
        - to
        - total
      properties:
        from:
          type: string
        granularity:
          type: string
        periods:
          type: array
          items:
            $ref: '#/components/schemas/operator.AutopilotSavingsPeriod'
        to:
          type: string
        total:
          $ref: '#/components/schemas/operator.AutopilotSavingsPeriod'
    responses.ErrorResponse:
      type: object
      required:
        - message
        - status
      properties:
        message:
          type: string
          example: some message
        status:
          type: string
          example: error
    operator.AutopilotSavingsPeriod:
      type: object
      required:
        - added
        - coverage
        - end
        - hours
        - not_priced_containers
        - saved
        - start
      properties:
        added:
          $ref: '#/components/schemas/operator.AutopilotSavingsAmounts'
        coverage:
          $ref: '#/components/schemas/operator.AutopilotCoverage'
        end:
          type: string
        hours:
          type: integer
        not_priced_containers:
          type: integer
        saved:
          $ref: '#/components/schemas/operator.AutopilotSavingsAmounts'
        start:
          type: string
    operator.AutopilotSavingsAmounts:
      type: object
      required:
        - cpu_core_hours
        - gpu_hours
        - memory_gib_hours
      properties:
        cpu_core_hours:
          type: number
        gpu_hours:
          type: array
          items:
            $ref: '#/components/schemas/operator.AutopilotGPUHours'
        memory_gib_hours:
          type: number
        placement_usd:
          type: number
          x-semantic: costAmount
          nullable: true
        sizing_usd:
          type: number
          x-semantic: costAmount
          nullable: true
        usd:
          type: number
          x-semantic: costAmount
          nullable: true
    operator.AutopilotCoverage:
      type: object
      required:
        - managed_pod_hours
        - managed_workloads
        - workloads_added
        - workloads_saved
        - workloads_unchanged
      properties:
        managed_pod_hours:
          type: number
        managed_workloads:
          type: integer
        workloads_added:
          type: integer
        workloads_saved:
          type: integer
        workloads_unchanged:
          type: integer
    operator.AutopilotGPUHours:
      type: object
      required:
        - hours
        - model
      properties:
        hours:
          type: number
        model:
          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.