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

# Savings model for the organisation

> The organisation's savings model: right-size and off-hours recommendations across the biggest priced clusters, the cost breakdowns they were read from, the clusters the fleet cannot price, and the waste scan, in the caller's display currency (`ankra cost savings`). One cluster counts once in the total, at its best lever. Bearer-PAT twin of the browser route of the same name under /org.



## OpenAPI

````yaml https://platform.ankra.app/openapi.json get /api/v1/org/cloud-cost/savings
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
tags:
  - name: Clusters
    description: Create, inspect and manage clusters, and the stacks deployed on them.
  - name: Managed Clusters
    description: Provider-managed control planes, driven through one common surface.
  - name: Imported Clusters
    description: Clusters that already existed and were connected to Ankra.
  - name: Cluster Access
    description: Kubeconfigs, service-account tokens and per-cluster access grants.
  - name: Kubernetes
    description: Read and act on the Kubernetes objects inside a cluster.
  - name: AWS Clusters
    description: >-
      Provision and manage self-managed k3s / kubeadm clusters on AWS EC2 in
      your own VPC.
  - name: DigitalOcean Clusters
    description: Provision and manage DigitalOcean Kubernetes clusters.
  - name: Hetzner Clusters
    description: Provision and manage Hetzner Kubernetes clusters.
  - name: OVH Clusters
    description: Provision and manage OVH Kubernetes clusters.
  - name: Scaleway Clusters
    description: Provision and manage Scaleway Kapsule clusters.
  - name: UpCloud Clusters
    description: Provision and manage UpCloud Kubernetes clusters.
  - name: Applications
    description: Deploy, configure and observe applications across the fleet.
  - name: Backups
    description: >-
      Backup vaults, restore points, protection posture and captures for stacks
      and application deployments; a completed capture is not a verified
      restore.
  - name: Stack Profiles
    description: Reusable stack definitions, their versions and sharing.
  - name: Services
    description: >-
      Versioned service packages and explicit sharing. Runtime admission is
      separate from publication.
  - name: Charts
    description: Browse the chart catalogue behind stacks and addons.
  - name: Helm
    description: Helm registries, credentials and the charts they expose.
  - name: Executions
    description: Long-running platform executions and their jobs.
  - name: Operations
    description: Cancel in-flight cluster operations and their jobs.
  - name: Chat
    description: Conversational sessions, plans and confirmable actions.
  - name: AI Agent Runs
    description: Autonomous agent runs and their outcomes.
  - name: AI Tickets
    description: The AI ticket board, its sync connections and settings.
  - name: AI Playbooks
    description: Reusable playbooks the AI lanes execute.
  - name: AI Conditions
    description: Conditions that gate AI autonomy.
  - name: AI Remediation
    description: >-
      The organisation's auto-remediation policy: what the AI lanes may fix by
      themselves, and who approves the rest.
  - name: AI Engineering Handoffs
    description: Work the AI lanes escalate to a human engineer.
  - name: AI Environment
    description: The environment and base stacks AI demos deploy into.
  - name: Security
    description: Findings, advisories, SBOMs, compliance and posture.
  - name: Cost
    description: Cluster and fleet cost, rate cards and cost settings.
  - name: Decisions
    description: >-
      The decision ledger behind the Security and Cost queues: proposals a
      surface computed, the approve and set-aside decisions people took on them,
      and the receipts of running them.
  - name: Billing
    description: Subscription and spend caps.
  - name: Organisation
    description: Members, invitations, audit logs and organisation settings.
  - name: Account Tokens
    description: Personal access tokens for the API and CLI.
  - name: Credentials
    description: The shared credential store.
  - name: AWS Credentials
    description: >-
      AWS credentials: access keys or CloudFormation-onboarded STS roles for
      cost, EKS and self-managed provisioning.
  - name: Azure Credentials
    description: Azure credentials and SSH keys.
  - name: DigitalOcean Credentials
    description: DigitalOcean credentials and SSH keys.
  - name: Hetzner Credentials
    description: Hetzner credentials and SSH keys.
  - name: OVH Credentials
    description: OVH credentials and SSH keys.
  - name: Scaleway Credentials
    description: Scaleway credentials.
  - name: UpCloud Credentials
    description: UpCloud credentials and SSH keys.
  - name: Data Source Credentials
    description: Credentials for metrics and log sources.
  - name: DNS Credentials
    description: Credentials for DNS providers.
  - name: Object Storage Buckets
    description: >-
      Buckets Ankra creates and manages on an organisation's own provider
      credentials.
  - name: DNS
    description: DNS zones and records, including custom organisation zones.
  - name: Cloudflare
    description: Cloudflare domains and the credentials behind them.
  - name: Variables
    description: Organisation- and cluster-scoped variables.
  - name: SOPS
    description: Encrypt and decrypt values with the organisation SOPS config.
  - name: Alerts
    description: Alert integrations and ingest credentials.
  - name: Notifications
    description: Notification routes and their delivery targets.
  - name: Support
    description: Support tickets.
  - name: AI Settings
    description: Organisation AI provider, model catalog and per-function model settings
paths:
  /api/v1/org/cloud-cost/savings:
    get:
      tags:
        - Cost
      summary: Savings model for the organisation
      description: >-
        The organisation's savings model: right-size and off-hours
        recommendations across the biggest priced clusters, the cost breakdowns
        they were read from, the clusters the fleet cannot price, and the waste
        scan, in the caller's display currency (`ankra cost savings`). One
        cluster counts once in the total, at its best lever. Bearer-PAT twin of
        the browser route of the same name under /org.
      operationId: cloud_savings_api_v1_org_cloud_cost_savings_get
      parameters:
        - description: PAT organisation override.
          in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudSavingsResponse'
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: >-
            Missing or malformed Authorization header, or business validation
            error
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Unknown, expired, or revoked API token
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: >-
            Token may not use this surface (MCP-scoped token or service account
            restriction)
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Request validation error
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Internal server error
      security:
        - BearerAuth: []
components:
  schemas:
    CloudSavingsResponse:
      description: >-
        The organisation's savings model. total_monthly_savings_cents counts
        each cluster once, at its best lever, because idle spend sits inside
        what an off-hours stop reclaims; unanalysed clusters are priced clusters
        beyond the analysed limit, not clusters with nothing to save.
      properties:
        analysed_cluster_count:
          type: integer
        breakdowns:
          items:
            $ref: '#/components/schemas/CloudSavingsBreakdown'
          type: array
        currency:
          type: string
        generated_at:
          type: string
          format: date-time
        namespaces:
          description: >-
            The costliest namespaces across the analysed clusters, at most
            twelve.
          items:
            $ref: '#/components/schemas/CloudSavingsNamespace'
          type: array
        priced_cluster_count:
          type: integer
        recommendations:
          items:
            $ref: '#/components/schemas/CloudSavingsRecommendation'
          type: array
        thresholds:
          $ref: '#/components/schemas/CloudSavingsThresholds'
        total_monthly_savings_cents:
          type: integer
        unanalysed_cluster_count:
          type: integer
        unpriced_cluster_count:
          type: integer
        unpriced_clusters:
          items:
            $ref: '#/components/schemas/CloudSavingsUnpricedCluster'
          type: array
        stale_cluster_count:
          type: integer
        stale_clusters:
          description: >-
            Clusters priced before whose latest snapshot is older than the
            fleet's staleness window: metering has stalled, which is neither
            priced nor unpriced.
          items:
            $ref: '#/components/schemas/CloudSavingsUnpricedCluster'
          type: array
        unreadable_clusters:
          description: >-
            Priced clusters whose cost breakdown could not be read on this pass;
            counted as unanalysed, never as clusters with nothing to save.
          items:
            $ref: '#/components/schemas/CloudSavingsUnreadableCluster'
          type: array
        waste:
          $ref: '#/components/schemas/CloudSavingsWaste'
      required:
        - currency
        - generated_at
        - total_monthly_savings_cents
        - recommendations
        - breakdowns
        - namespaces
        - analysed_cluster_count
        - unanalysed_cluster_count
        - priced_cluster_count
        - unpriced_cluster_count
        - unpriced_clusters
        - stale_cluster_count
        - stale_clusters
        - unreadable_clusters
        - waste
        - thresholds
      type: object
    ContractDetailError:
      example:
        detail: Cluster not found
      properties:
        detail:
          oneOf:
            - type: string
            - additionalProperties: true
              properties: {}
              type: object
      required:
        - detail
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    CloudSavingsBreakdown:
      description: >-
        One analysed cluster's run rate split by billed component, with the idle
        and unallocated shares the recommendations read, the id of its best
        recommendation, its costliest namespaces, and its daily cost trend over
        the last thirty days (the same series GET
        /org/clusters/{cluster_id}/cost serves as trend), so the fleet's
        movement can be attributed to the clusters that moved it from this one
        read.
      properties:
        best_recommendation_id:
          anyOf:
            - type: string
            - type: 'null'
        cluster_id:
          type: string
          format: uuid
        cluster_name:
          type: string
        components:
          items:
            $ref: '#/components/schemas/CloudSavingsComponent'
          type: array
        idle_monthly_cents:
          type: integer
        monthly_cents:
          type: integer
        provider:
          type: string
        top_namespaces:
          items:
            $ref: '#/components/schemas/CloudSavingsNamespace'
          type: array
        trend:
          description: >-
            The cluster's daily run rate over the last thirty days, one point
            per day, carried verbatim from its cost read; always present on an
            analysed cluster.
          items:
            $ref: '#/components/schemas/CostTrendPoint'
          type: array
        unallocated_monthly_cents:
          type: integer
      required:
        - cluster_id
        - cluster_name
        - provider
        - monthly_cents
        - components
        - idle_monthly_cents
        - unallocated_monthly_cents
        - best_recommendation_id
        - top_namespaces
        - trend
      type: object
    CloudSavingsNamespace:
      description: >-
        One namespace's allocated share of its cluster's run rate: the
        dependency cost a lane drills into.
      properties:
        cluster_id:
          type: string
          format: uuid
        cluster_name:
          type: string
        monthly_cents:
          type: integer
        namespace:
          type: string
        share_percent:
          type: integer
      required:
        - cluster_id
        - cluster_name
        - namespace
        - monthly_cents
        - share_percent
      type: object
    CloudSavingsRecommendation:
      description: >-
        One lever on one cluster. id is stable across reads (kind and cluster),
        so a ledger can reference it.
      properties:
        cluster_id:
          type: string
          format: uuid
        cluster_name:
          type: string
        environment:
          anyOf:
            - type: string
            - type: 'null'
        evidence:
          $ref: '#/components/schemas/CloudSavingsEvidence'
        id:
          type: string
        kind:
          enum:
            - right_size_idle
            - reduce_unallocated
            - off_hours_schedule
          type: string
        monthly_cost_cents:
          type: integer
        monthly_savings_cents:
          type: integer
        provider:
          type: string
        share_percent:
          type: integer
      required:
        - id
        - kind
        - cluster_id
        - cluster_name
        - provider
        - environment
        - monthly_savings_cents
        - monthly_cost_cents
        - share_percent
        - evidence
      type: object
    CloudSavingsThresholds:
      properties:
        analysed_cluster_limit:
          type: integer
        minimum_off_hours_monthly_cents:
          type: integer
        minimum_savings_cents:
          type: integer
        off_hours_share:
          type: number
        unallocated_share_threshold:
          type: number
      required:
        - minimum_savings_cents
        - minimum_off_hours_monthly_cents
        - unallocated_share_threshold
        - off_hours_share
        - analysed_cluster_limit
      type: object
    CloudSavingsUnpricedCluster:
      properties:
        cluster_id:
          type: string
          format: uuid
        cluster_name:
          type: string
        kind:
          type: string
      required:
        - cluster_id
        - cluster_name
        - kind
      type: object
    CloudSavingsUnreadableCluster:
      properties:
        cluster_id:
          type: string
          format: uuid
        cluster_name:
          type: string
      required:
        - cluster_id
        - cluster_name
      type: object
    CloudSavingsWaste:
      description: >-
        The open cloud-waste findings. available is false when the waste scan
        could not be read, which is unknown waste, not no waste.
      properties:
        available:
          type: boolean
        finding_count:
          type: integer
        has_data:
          type: boolean
        scanned_at:
          anyOf:
            - type: string
            - type: 'null'
        total_monthly_cost_cents:
          type: integer
        unpriced_finding_count:
          type: integer
      required:
        - available
        - has_data
        - scanned_at
        - total_monthly_cost_cents
        - finding_count
        - unpriced_finding_count
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    CloudSavingsComponent:
      properties:
        key:
          type: string
        label:
          type: string
        monthly_cents:
          type: integer
      required:
        - key
        - label
        - monthly_cents
      type: object
    CostTrendPoint:
      properties:
        day:
          type: string
          format: date-time
        monthly_cost_estimate_cents:
          type: integer
      required:
        - day
        - monthly_cost_estimate_cents
      title: CostTrendPoint
      type: object
    CloudSavingsEvidence:
      description: >-
        The numbers a recommendation was computed from; members that do not
        apply to its kind are null.
      properties:
        idle_monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
        off_hours_share_percent:
          anyOf:
            - type: integer
            - type: 'null'
        start_cron:
          anyOf:
            - type: string
            - type: 'null'
        stop_cron:
          anyOf:
            - type: string
            - type: 'null'
        stoppable_monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
        unallocated_monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
        unallocated_share_percent:
          anyOf:
            - type: integer
            - type: 'null'
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: PAT
      scheme: bearer
      type: http

````