Simulations

Fetch the latest per-resource cost breakdown

Returns the per-resource hourly cost array from the simulation's most recent metrics record, joined with each resource's current status and serving state. status is raw health severity/cooldown; use availabilityState, isRoutable, and routedRps to determine whether the resource is currently serving. A critical resource may therefore be availabilityState: degraded with isRoutable: true after it rejoins routing. Use this after a failure or traffic surge to identify resources that continue billing while genuinely unavailable ("residual" spend).

totalCostPerHour is the exact sum of all resources[].costPerHour values. The response is always a flat array (no paging, no metrics history), making it cheap to call between scenario steps.

Aurora Serverless v2 rows identify writer/reader role, reader scaling mode, billable ACU and the per-ACU-hour rate. An unavailable quick-failure writer retains its pre-failure allocated ACU in this model; this is a modeling assumption, not a claim that AWS bills a failed instance like a stopped cluster. AWS distinguishes stopped clusters from running instances: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html (reviewed 2026-09-25). Aurora capacity/reader behavior: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.how-it-works.html (reviewed 2026-09-25).

OpenShift rows retain their billing metadata. For ARO, compare like-for-like units: publishedUnitRatePerHour is the official $0.171/hour rate per 4-vCPU billing unit, while derivedPlatformFeePerHour and costPerHour are the topology-derived total. For example, three 2-vCPU workers produce effectiveWorkerVcpu: 6 and a $0.2565/hour platform total (publishedUnitRatePerHour × effectiveWorkerVcpu ÷ billingUnitVcpu). Platform, control-plane, and worker rows are separate additive entries; the estimated control-plane charge must not be folded into the platform unit comparison or added a second time.

Returns 404 when the simulation has not been stepped yet (no metrics record exists). Requires read scope and ownership, or an x402 micro-payment (simulation_cost_breakdown, $0.0030).

get/simulations/{simulationId}/cost-breakdown

Request

  • Base URL: https://www.cloudworldmodel.ai/api
  • URL: https://www.cloudworldmodel.ai/api/simulations/{simulationId}/cost-breakdown
  • Auth: none required

Path parameters

simulationIdstring required

Simulation UUID

Response

Latest per-resource cost breakdown

simulationIdstring required
stepIndexnumber required

Simulation step (metrics timestamp) the breakdown was computed at

totalCostPerHournumber required

Exact sum of all resources[].costPerHour values (USD/hr)

residualCostPerHournumber required

Exact subtotal of costPerHour for resources that are currently unavailable/parked or stopped. Healthy/degraded idle resources, including ALBs, are excluded.

residualCostDefinitionstring required

Explains which billed resources are included in residualCostPerHour; totalCostPerHour includes all billed resources.

Example response

{
  "simulationId": "550e8400-e29b-41d4-a716-446655440000",
  "stepIndex": 42,
  "totalCostPerHour": 1.77,
  "residualCostPerHour": 0.045,
  "residualCostDefinition": "Unavailable, parked, or stopped resource costs only. Healthy or degraded idle resources, including ALBs, are excluded; totalCostPerHour remains the complete billed total.",
  "resources": [
    {
      "name": "app-nat",
      "resourceType": "network",
      "provider": "aws",
      "costPerHour": 0.045,
      "rdsSqlServerBilling": {
        "input": {
          "instanceClass": "db.t3.micro",
          "storageType": "gp2",
          "allocatedStorageGiB": 20,
          "durationHours": 480,
          "sustainedCpuPercent": 43
        }
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.