Skip to main content
POST
/
pricing
/
disks
Get pricing for a disk
curl --request POST \
  --url https://pricing.baselinehq.cloud/pricing/disks \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "availability_zone": "<string>",
  "capacity_gb": 123,
  "fallback_to_base_pricing": true,
  "id": "<string>",
  "iops": 123,
  "region": "<string>",
  "throughput_mbps": 123,
  "type": "<string>"
}
'
import requests

url = "https://pricing.baselinehq.cloud/pricing/disks"

payload = {
"availability_zone": "<string>",
"capacity_gb": 123,
"fallback_to_base_pricing": True,
"id": "<string>",
"iops": 123,
"region": "<string>",
"throughput_mbps": 123,
"type": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
availability_zone: '<string>',
capacity_gb: 123,
fallback_to_base_pricing: true,
id: '<string>',
iops: 123,
region: '<string>',
throughput_mbps: 123,
type: '<string>'
})
};

fetch('https://pricing.baselinehq.cloud/pricing/disks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://pricing.baselinehq.cloud/pricing/disks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'availability_zone' => '<string>',
'capacity_gb' => 123,
'fallback_to_base_pricing' => true,
'id' => '<string>',
'iops' => 123,
'region' => '<string>',
'throughput_mbps' => 123,
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://pricing.baselinehq.cloud/pricing/disks"

payload := strings.NewReader("{\n \"availability_zone\": \"<string>\",\n \"capacity_gb\": 123,\n \"fallback_to_base_pricing\": true,\n \"id\": \"<string>\",\n \"iops\": 123,\n \"region\": \"<string>\",\n \"throughput_mbps\": 123,\n \"type\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://pricing.baselinehq.cloud/pricing/disks")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"availability_zone\": \"<string>\",\n \"capacity_gb\": 123,\n \"fallback_to_base_pricing\": true,\n \"id\": \"<string>\",\n \"iops\": 123,\n \"region\": \"<string>\",\n \"throughput_mbps\": 123,\n \"type\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://pricing.baselinehq.cloud/pricing/disks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"availability_zone\": \"<string>\",\n \"capacity_gb\": 123,\n \"fallback_to_base_pricing\": true,\n \"id\": \"<string>\",\n \"iops\": 123,\n \"region\": \"<string>\",\n \"throughput_mbps\": 123,\n \"type\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "availability_zone": "<string>",
  "cost_per_gb_hour": 123,
  "cost_per_iops_hour": 123,
  "cost_per_throughput_mbps_hour": 123,
  "created_at": "<string>",
  "id": "<string>",
  "max_capacity_gb": 123,
  "max_iops": 123,
  "max_throughput_mbps": 123,
  "min_capacity_gb": 123,
  "min_iops": 123,
  "min_throughput_mbps": 123,
  "period_billing_hours": 123,
  "provider": "<string>",
  "raw_pricing_data": {},
  "region": "<string>",
  "service": "<string>",
  "tags": {},
  "type": "<string>",
  "updated_at": "<string>",
  "usage_type": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}

Authorizations

X-API-Key
string
header
required

API key with "bl_" prefix (e.g. "bl_<api_key>")

Body

application/json

Disk

availability_zone
string
capacity_gb
number
fallback_to_base_pricing
boolean
id
string
iops
number
provider
enum<string>
Available options:
GCP,
AWS,
DigitalOcean,
Azure,
Hetzner,
OVHCloud,
Base
region
string
service
enum<string>
Available options:
ComputeEngine,
AmazonEC2,
Droplet,
AzureCompute,
AzureManagedDisks,
HetznerCompute,
OVHPublicCloud,
BaseCompute,
BaseDisks,
AmazonEBS,
ComputeEnginePersistentDisk
throughput_mbps
number
type
string
usage_type
enum<string>
Available options:
SPOT_PREEMPTIBLE,
ONDEMAND,
RESERVED,
ONDEMAND_CUSTOM,
SPOT_PREEMPTIBLE_CUSTOM,
RESERVED_CUSTOM,
SOLE_TENANCY,
CUSTOM,
EXTENDED

Response

Pricing for a given disk

availability_zone
string
cost_per_gb_hour
number
cost_per_iops_hour
number
cost_per_throughput_mbps_hour
number
created_at
string
id
string
max_capacity_gb
number
max_iops
number
max_throughput_mbps
number
min_capacity_gb
number
min_iops
number
min_throughput_mbps
number
period_billing_hours
number
provider
string
raw_pricing_data
object
region
string
service
string
tags
object
type
string
updated_at
string
usage_type
string