---
title: "Price a machine"
method: POST
path: "/v1/pricing/compute"
tags: ["pricing"]
---

# Price a machine

`POST /v1/pricing/compute`

## Request

- Base URL: `https://pricing.baselinehq.cloud`
- URL: `https://pricing.baselinehq.cloud/v1/pricing/compute`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/baselinehq/apis/costgraph-pricing-api/docs/v1/pricing/compute/post.ts> (a function with typed inputs; its response is checked against the schema)

Resolve the hourly rate CostGraph would bill for a machine with the given shape, in the given region and usage type.
Prices you have published for the machine's provider are preferred over the public catalogue.

## Request body

- Instance
  - `availability_zone` string
  - `fallback_to_base_pricing` boolean
  - `id` string
  - `instance_type` string
  - `operating_system` string
  - `provider` 'GCP' | 'AWS' | 'DigitalOcean' | 'Azure' | 'Hetzner' | 'OVHCloud' | 'PlanetScale' | 'STACKIT' | 'Linode' | 'Base' | 'Akash' | 'Alibaba' | 'Baseten' | 'Beam' | 'Cerebrium' | 'CIRunners' | 'Civo' | 'Clore' | 'CoreWeave' | 'Crusoe' | 'CUDO' | 'DataCrunch' | 'DeepInfra' | 'Denvr' | 'E2ENetworks' | 'Exoscale' | 'Fal' | 'HotAisle' | 'Hyperbolic' | 'Hyperstack' | 'IBM' | 'Lambda' | 'Latitude' | 'MassedCompute' | 'Modal' | 'Nebius' | 'Novita' | 'Oblivus' | 'OCI' | 'OpenTelekom' | 'PrimeIntellect' | 'Replicate' | 'RunPod' | 'Salad' | 'Scaleway' | 'Sesterce' | 'Shadeform' | 'ThunderCompute' | 'UpCloud' | 'Vast' | 'Vultr'
  - `region` string
  - `service` 'ComputeEngine' | 'AmazonEC2' | 'Droplet' | 'AzureCompute' | 'AzureManagedDisks' | 'HetznerCompute' | 'OVHPublicCloud' | 'BaseCompute' | 'BaseDisks' | 'AmazonEBS' | 'AmazonRDS' | 'AuroraDSQL' | 'CloudSQL' | 'AlloyDB' | 'CloudSpanner' | 'AzureDatabaseForPostgreSQL' | 'AzureDatabaseForMySQL' | 'AzureSQLDatabase' | 'AzureSQLManagedInstance' | 'PlanetScale' | 'ComputeEnginePersistentDisk' | 'STACKITCompute' | 'STACKITBlockStorage' | 'STACKITDatabase' | 'AkamaiLinode' | 'AkamaiBlockStorage' | 'AkamaiDatabase' | 'AkashCompute' | 'AlibabaCompute' | 'AlibabaBlockStorage' | 'BasetenCompute' | 'BeamCompute' | 'CerebriumCompute' | 'CivoCompute' | 'CivoBlockStorage' | 'CloreCompute' | 'CoreWeaveCompute' | 'CrusoeCompute' | 'CUDOCompute' | 'DataCrunchCompute' | 'DeepInfraCompute' | 'DenvrCompute' | 'E2ENetworksCompute' | 'ExoscaleCompute' | 'ExoscaleBlockStorage' | 'FalCompute' | 'HotAisleCompute' | 'HyperbolicCompute' | 'HyperstackCompute' | 'IBMCompute' | 'IBMBlockStorage' | 'LambdaCompute' | 'LatitudeCompute' | 'MassedComputeCompute' | 'ModalCompute' | 'NebiusCompute' | 'NovitaCompute' | 'OblivusCompute' | 'OCICompute' | 'OCIBlockStorage' | 'OpenTelekomCompute' | 'PrimeIntellectCompute' | 'ReplicateCompute' | 'RunPodCompute' | 'SaladCompute' | 'ScalewayCompute' | 'ScalewayBlockStorage' | 'SesterceCompute' | 'ShadeformCompute' | 'ThunderComputeCompute' | 'UpCloudCompute' | 'UpCloudBlockStorage' | 'VastCompute' | 'VultrCompute' | 'VultrBlockStorage'
  - `usage_type` 'SPOT_PREEMPTIBLE' | 'ONDEMAND' | 'RESERVED' | 'ONDEMAND_CUSTOM' | 'SPOT_PREEMPTIBLE_CUSTOM' | 'RESERVED_CUSTOM' | 'SOLE_TENANCY' | 'CUSTOM' | 'EXTENDED'
  - `vm` GithubComBaselinehqGolangSharedTypesVM
    - `cpu_cores` number
    - `ram_gb` number

## Response `200`

The resolved price

- ComputePrice
  - `architecture` string
  - `availability_zone` string
  - `cost_per_hour` number: On-demand-equivalent hourly USD; multiply by provider_pricing_rules.month_hours for monthly.
  - `cpu_cores` number
  - `cpu_cores_cost_per_hour` number
  - `created_at` string
  - `currency` string: Currency the provider published this price in. Cost columns are always normalized USD.
  - `gpu_cost_per_hour` number
  - `gpu_count` number
  - `gpu_type` string
  - `id` string
  - `instance_type` string
  - `native_cost_per_hour` number: cost_per_hour as published, before FX normalization. Zero when currency is USD.
  - `operating_system` string
  - `period_billing_hours` number: Commitment term the raw price covers: 1=hourly on-demand; 8640/25920/43200=1mo/3mo/1yr buckets. cost_per_hour is already normalized to hourly.
  - `provider` string
  - `ram_gb` number
  - `ram_gb_cost_per_hour` number
  - `raw_pricing_data` object
  - `region` string
  - `resizable` boolean: True when the row carries per-vCPU and per-GB rates for a shape sized at launch; resolution stores and returns a row priced at the requested vCPU and memory. NULL or false is a fixed-size shape.
  - `service` string
  - `tags` object
  - `updated_at` string
  - `usage_type` string: Pricing tier token (ONDEMAND, RESERVED, SPOT_*, *_HBP, *_BYOL, Commit1Yr/3Yr). Filter to ONDEMAND for normal pricing.

## Other responses

- `400`: Invalid request body
- `401`: Unauthenticated
- `404`: No price matches the machine
- `422`: Validation failed
- `500`: Internal server error

## Changes

- **2026-10-05** `506d14bb78ca`: 1 info
  - added the new `CIRunners` enum value to the request property `provider`
- **2026-10-05** `a60168add03d`: 5 info
  - added the optional property `affected` to the response with the `400` status
  - added the optional property `affected` to the response with the `401` status
  - added the optional property `affected` to the response with the `404` status
  - added the optional property `affected` to the response with the `422` status
  - …1 more
- **2026-10-05** `baaed9359752`: 1 breaking, 1 info
  - removed the enum value `Akamai` of the request property `provider`
  - added the new `Linode` enum value to the request property `provider`
- **2026-10-04** `73c38af41209`: 17 info
  - added the new `Alibaba` enum value to the request property `provider`
  - added the new `AlibabaBlockStorage` enum value to the request property `service`
  - added the new `AlibabaCompute` enum value to the request property `service`
  - added the new `Civo` enum value to the request property `provider`
  - …13 more
- **2026-09-30** `71a088807969`: 30 info
  - added the new `Baseten` enum value to the request property `provider`
  - added the new `BasetenCompute` enum value to the request property `service`
  - added the new `Beam` enum value to the request property `provider`
  - added the new `BeamCompute` enum value to the request property `service`
  - …26 more

[Operation history](https://skmtc.dev/baselinehq/apis/costgraph-pricing-api/changes/v1/pricing/compute/post.md)

---

[API](https://skmtc.dev/baselinehq/apis/costgraph-pricing-api.md) - [All operations](https://skmtc.dev/baselinehq/apis/costgraph-pricing-api/llms.txt) - [OpenAPI document](https://skmtc.dev/baselinehq/apis/costgraph-pricing-api/revisions/506d14bb78ca?raw)
