POST
/
v1
/
compute
/
pricing
Compute Pricing
curl --request POST \
  --url https://gateway.costgraph.baselinehq.cloud/v1/compute/pricing \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "availability_zone": "<string>",
  "instance_type": "<string>",
  "operating_system": "<string>",
  "provider": "GCP",
  "region": "<string>",
  "service": "ComputeEngine",
  "usage_type": "SPOT_PREEMPTIBLE",
  "vm": {
    "cpu_cores": 123,
    "ram_gb": 123
  }
}'
{
  "availability_zone": "<string>",
  "cost_per_hour": 123,
  "cpu_cores": 123,
  "cpu_cores_cost_per_hour": 123,
  "instance_type": "<string>",
  "operating_system": "<string>",
  "provider": "GCP",
  "ram_gb": 123,
  "ram_gb_cost_per_hour": 123,
  "raw_pricing_data": {},
  "region": "<string>",
  "service": "ComputeEngine",
  "usage_type": "SPOT_PREEMPTIBLE"
}
Get pricing information for cloud resources based on specified parameters.

Request Body

Response

availability_zone
string
The availability zone of the resource.
cost_per_hour
number
The total cost per hour for the resource.Example: 0.073981
cpu_cores_cost_per_hour
number
The cost per hour for CPU cores.Example: 0.031611
instance_type
string
The type of instance.Example: N2
operating_system
string
The operating system of the instance.
provider
string
The cloud provider.Example: GCP
ram_gb_cost_per_hour
number
The cost per hour for RAM.Example: 0.004237
raw_pricing_data
object
Detailed pricing information from the cloud provider.

Authorizations

Authorization
string
header
required

Bearer token for authentication

Body

application/json

Instance details

availability_zone
string
instance_type
string
operating_system
string
provider
enum<string>
Available options:
GCP,
AWS,
DigitalOcean,
Azure,
Hetzner,
OVHCloud,
Base
region
string
service
enum<string>
Available options:
ComputeEngine,
AmazonEC2,
Droplet,
AzureCompute,
HetznerCompute,
OVHPublicCloud,
BaseCompute
usage_type
enum<string>
Available options:
SPOT_PREEMPTIBLE,
ONDEMAND,
RESERVED,
ONDEMAND_CUSTOM,
SPOT_PREEMPTIBLE_CUSTOM,
RESERVED_CUSTOM,
SOLE_TENANCY,
CUSTOM,
EXTENDED
vm
object

Response

OK

availability_zone
string
cost_per_hour
number
cpu_cores
number
cpu_cores_cost_per_hour
number
instance_type
string
operating_system
string
provider
enum<string>
Available options:
GCP,
AWS,
DigitalOcean,
Azure,
Hetzner,
OVHCloud,
Base
ram_gb
number
ram_gb_cost_per_hour
number
raw_pricing_data
object
region
string
service
enum<string>
Available options:
ComputeEngine,
AmazonEC2,
Droplet,
AzureCompute,
HetznerCompute,
OVHPublicCloud,
BaseCompute
usage_type
enum<string>
Available options:
SPOT_PREEMPTIBLE,
ONDEMAND,
RESERVED,
ONDEMAND_CUSTOM,
SPOT_PREEMPTIBLE_CUSTOM,
RESERVED_CUSTOM,
SOLE_TENANCY,
CUSTOM,
EXTENDED