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

# Price a what-if node-group draft against a cluster (bearer twin)

> Prices a draft configuration - the full set of node groups the prototype cluster would run (count, vCPU, memory, disk, spot) and optionally its network resources - beside the cluster's current configuration, and predicts the monthly bill as the metered run rate plus the difference. In catalogue mode each group is placed on the cheapest published size that holds it (locked to the current size's CPU architecture); private capacity is priced per vCPU, GB of memory and GB of disk from the rate card. Nothing is stored. Bearer-PAT twin of the browser route of the same name under /org.



## OpenAPI

````yaml https://platform.ankra.app/openapi.json post /api/v1/org/clusters/{cluster_id}/cost/estimate
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/org/clusters/{cluster_id}/cost/estimate:
    post:
      tags:
        - Cost
        - cli
      summary: Price a what-if node-group draft against a cluster (bearer twin)
      description: >-
        Prices a draft configuration - the full set of node groups the prototype
        cluster would run (count, vCPU, memory, disk, spot) and optionally its
        network resources - beside the cluster's current configuration, and
        predicts the monthly bill as the metered run rate plus the difference.
        In catalogue mode each group is placed on the cheapest published size
        that holds it (locked to the current size's CPU architecture); private
        capacity is priced per vCPU, GB of memory and GB of disk from the rate
        card. Nothing is stored. Bearer-PAT twin of the browser route of the
        same name under /org.
      operationId: cluster_cost_estimate_api_v1_org_clusters_post
      parameters:
        - description: PAT organisation override.
          in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            type: string
        - in: path
          name: cluster_id
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClusterCostEstimateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterCostEstimateResponse'
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: >-
            Missing or malformed Authorization header, or a draft the pricing
            cannot honour (out-of-range node count, size or network count)
        '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)
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Cluster not found in the token's organisation
        '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:
    ClusterCostEstimateRequest:
      properties:
        node_groups:
          description: >-
            The full set of node groups the prototype cluster would run (at most
            32).
          items:
            $ref: '#/components/schemas/ClusterCostEstimateNodeGroupInput'
          type: array
        network:
          anyOf:
            - $ref: '#/components/schemas/ClusterCostEstimateNetworkInput'
            - type: 'null'
          description: Absent means unchanged from today.
        provider:
          description: >-
            Price the draft on this provider's catalogue instead of the
            cluster's own (a migration); one of the response's
            available_targets. Empty keeps the cluster's provider.
          type: string
      required:
        - node_groups
      title: ClusterCostEstimateRequest
      type: object
    ClusterCostEstimateResponse:
      properties:
        currency:
          type: string
        pricing:
          $ref: '#/components/schemas/CostEstimatePricing'
        baseline:
          $ref: '#/components/schemas/CostEstimateConfiguration'
        estimate:
          $ref: '#/components/schemas/CostEstimateConfiguration'
        metered_monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
        predicted_monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
        delta_monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
        target_provider:
          description: >-
            The provider the estimate was priced on when the draft asked for a
            migration; empty otherwise.
          type: string
        target_pricing:
          anyOf:
            - $ref: '#/components/schemas/CostEstimatePricing'
            - type: 'null'
          description: >-
            The migration target's source and unit prices; pricing keeps the
            cluster's own.
        available_targets:
          description: >-
            Providers a draft may be priced on: those with an offline size
            catalogue and priced rows, the cluster's own excluded.
          items:
            $ref: '#/components/schemas/CostEstimateTarget'
          type: array
      required:
        - currency
        - pricing
        - baseline
        - estimate
        - metered_monthly_cents
        - predicted_monthly_cents
        - delta_monthly_cents
        - target_provider
        - target_pricing
        - available_targets
      title: ClusterCostEstimateResponse
      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
    ClusterCostEstimateNodeGroupInput:
      properties:
        name:
          description: Defaults to group-N; must be unique within the draft.
          type: string
        count:
          description: 0 to 100 nodes.
          type: integer
        vcpus:
          description: vCPU per node, 0 to 512.
          type: number
        memory_gb:
          description: Memory per node in GB, 0 to 4096.
          type: number
        disk_gb:
          description: >-
            Disk per node in GB, 0 to 100000. Disk beyond what the placed size
            bundles is priced as volume storage.
          type: number
        spot:
          description: >-
            Price the group as spot capacity where the provider sells it;
            ignored (and noted) elsewhere.
          type: boolean
      required:
        - count
        - vcpus
        - memory_gb
        - disk_gb
      title: ClusterCostEstimateNodeGroupInput
      type: object
    ClusterCostEstimateNetworkInput:
      properties:
        load_balancers:
          type: integer
        nat_gateways:
          type: integer
        gateways:
          type: integer
        flexible_ips:
          type: integer
      required: []
      title: ClusterCostEstimateNetworkInput
      type: object
    CostEstimatePricing:
      properties:
        mode:
          description: catalog | rate_card | unavailable
          type: string
        provider:
          type: string
        source:
          type: string
        reason:
          type: string
        spot_supported:
          type: boolean
        catalog_size_count:
          type: integer
        applied_discount_pct:
          type: number
        vcpu_monthly_amount:
          anyOf:
            - type: number
            - type: 'null'
        memory_gb_monthly_amount:
          anyOf:
            - type: number
            - type: 'null'
        storage_gb_monthly_amount:
          anyOf:
            - type: number
            - type: 'null'
        load_balancer_monthly_amount:
          anyOf:
            - type: number
            - type: 'null'
        nat_gateway_monthly_amount:
          anyOf:
            - type: number
            - type: 'null'
        gateway_monthly_amount:
          anyOf:
            - type: number
            - type: 'null'
        flexible_ip_monthly_amount:
          anyOf:
            - type: number
            - type: 'null'
      required:
        - mode
        - provider
        - source
        - reason
        - spot_supported
        - catalog_size_count
        - applied_discount_pct
        - vcpu_monthly_amount
        - memory_gb_monthly_amount
        - storage_gb_monthly_amount
        - load_balancer_monthly_amount
        - nat_gateway_monthly_amount
        - gateway_monthly_amount
        - flexible_ip_monthly_amount
      title: CostEstimatePricing
      type: object
    CostEstimateConfiguration:
      properties:
        node_groups:
          items:
            $ref: '#/components/schemas/CostEstimateNodeGroup'
          type: array
        network:
          $ref: '#/components/schemas/CostEstimateNetwork'
        total_node_count:
          type: integer
        priced_node_count:
          type: integer
        compute_monthly_cents:
          type: integer
        storage_monthly_cents:
          type: integer
        network_monthly_cents:
          type: integer
        monthly_cents:
          description: Sum of what could be priced.
          type: integer
        coverage_incomplete:
          type: boolean
      required:
        - node_groups
        - network
        - total_node_count
        - priced_node_count
        - compute_monthly_cents
        - storage_monthly_cents
        - network_monthly_cents
        - monthly_cents
        - coverage_incomplete
      title: CostEstimateConfiguration
      type: object
    CostEstimateTarget:
      properties:
        provider:
          type: string
        title:
          type: string
        size_count:
          type: integer
      required:
        - provider
        - title
        - size_count
      title: CostEstimateTarget
      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
    CostEstimateNodeGroup:
      properties:
        name:
          type: string
        count:
          type: integer
        vcpus:
          type: number
        memory_gb:
          type: number
        disk_gb:
          type: number
        spot:
          type: boolean
        instance_type:
          description: >-
            The size the group runs on or was placed on; empty when nothing
            holds it.
          type: string
        instance_vcpus:
          anyOf:
            - type: number
            - type: 'null'
        instance_memory_gb:
          anyOf:
            - type: number
            - type: 'null'
        instance_disk_gb:
          anyOf:
            - type: number
            - type: 'null'
        extra_disk_gb:
          description: >-
            Disk priced as volume storage beyond what the size bundles (all of
            it under a rate card).
          type: number
        unit_monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
        compute_monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
        storage_monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
        monthly_cents:
          anyOf:
            - type: integer
            - type: 'null'
        priced:
          description: >-
            False when any part of the line could not be priced; the figures
            then cover only what could.
          type: boolean
        note:
          type: string
      required:
        - name
        - count
        - vcpus
        - memory_gb
        - disk_gb
        - spot
        - instance_type
        - instance_vcpus
        - instance_memory_gb
        - instance_disk_gb
        - extra_disk_gb
        - unit_monthly_cents
        - compute_monthly_cents
        - storage_monthly_cents
        - monthly_cents
        - priced
        - note
      title: CostEstimateNodeGroup
      type: object
    CostEstimateNetwork:
      properties:
        load_balancers:
          type: integer
        nat_gateways:
          type: integer
        gateways:
          type: integer
        flexible_ips:
          type: integer
        monthly_cents:
          type: integer
        unpriced_count:
          type: integer
      required:
        - load_balancers
        - nat_gateways
        - gateways
        - flexible_ips
        - monthly_cents
        - unpriced_count
      title: CostEstimateNetwork
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: PAT
      scheme: bearer
      type: http

````