Skip to main content
POST
/
marketplace
/
providers
/
compute
Register a custom provider
curl --request POST \
  --url https://pricing.baselinehq.cloud/marketplace/providers/compute \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "entries": [
    {
      "architecture": "<string>",
      "availability_zone": "<string>",
      "cost_per_hour": 123,
      "cpu_cores": 123,
      "cpu_cores_cost_per_hour": 123,
      "created_at": "<string>",
      "id": "<string>",
      "instance_type": "<string>",
      "operating_system": "<string>",
      "period_billing_hours": 123,
      "provider": "<string>",
      "ram_gb": 123,
      "ram_gb_cost_per_hour": 123,
      "raw_pricing_data": {},
      "region": "<string>",
      "service": "<string>",
      "tags": {},
      "updated_at": "<string>",
      "usage_type": "<string>"
    }
  ]
}
'
import requests

url = "https://pricing.baselinehq.cloud/marketplace/providers/compute"

payload = { "entries": [
{
"architecture": "<string>",
"availability_zone": "<string>",
"cost_per_hour": 123,
"cpu_cores": 123,
"cpu_cores_cost_per_hour": 123,
"created_at": "<string>",
"id": "<string>",
"instance_type": "<string>",
"operating_system": "<string>",
"period_billing_hours": 123,
"provider": "<string>",
"ram_gb": 123,
"ram_gb_cost_per_hour": 123,
"raw_pricing_data": {},
"region": "<string>",
"service": "<string>",
"tags": {},
"updated_at": "<string>",
"usage_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({
entries: [
{
architecture: '<string>',
availability_zone: '<string>',
cost_per_hour: 123,
cpu_cores: 123,
cpu_cores_cost_per_hour: 123,
created_at: '<string>',
id: '<string>',
instance_type: '<string>',
operating_system: '<string>',
period_billing_hours: 123,
provider: '<string>',
ram_gb: 123,
ram_gb_cost_per_hour: 123,
raw_pricing_data: {},
region: '<string>',
service: '<string>',
tags: {},
updated_at: '<string>',
usage_type: '<string>'
}
]
})
};

fetch('https://pricing.baselinehq.cloud/marketplace/providers/compute', 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/marketplace/providers/compute",
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([
'entries' => [
[
'architecture' => '<string>',
'availability_zone' => '<string>',
'cost_per_hour' => 123,
'cpu_cores' => 123,
'cpu_cores_cost_per_hour' => 123,
'created_at' => '<string>',
'id' => '<string>',
'instance_type' => '<string>',
'operating_system' => '<string>',
'period_billing_hours' => 123,
'provider' => '<string>',
'ram_gb' => 123,
'ram_gb_cost_per_hour' => 123,
'raw_pricing_data' => [

],
'region' => '<string>',
'service' => '<string>',
'tags' => [

],
'updated_at' => '<string>',
'usage_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/marketplace/providers/compute"

payload := strings.NewReader("{\n \"entries\": [\n {\n \"architecture\": \"<string>\",\n \"availability_zone\": \"<string>\",\n \"cost_per_hour\": 123,\n \"cpu_cores\": 123,\n \"cpu_cores_cost_per_hour\": 123,\n \"created_at\": \"<string>\",\n \"id\": \"<string>\",\n \"instance_type\": \"<string>\",\n \"operating_system\": \"<string>\",\n \"period_billing_hours\": 123,\n \"provider\": \"<string>\",\n \"ram_gb\": 123,\n \"ram_gb_cost_per_hour\": 123,\n \"raw_pricing_data\": {},\n \"region\": \"<string>\",\n \"service\": \"<string>\",\n \"tags\": {},\n \"updated_at\": \"<string>\",\n \"usage_type\": \"<string>\"\n }\n ]\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/marketplace/providers/compute")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entries\": [\n {\n \"architecture\": \"<string>\",\n \"availability_zone\": \"<string>\",\n \"cost_per_hour\": 123,\n \"cpu_cores\": 123,\n \"cpu_cores_cost_per_hour\": 123,\n \"created_at\": \"<string>\",\n \"id\": \"<string>\",\n \"instance_type\": \"<string>\",\n \"operating_system\": \"<string>\",\n \"period_billing_hours\": 123,\n \"provider\": \"<string>\",\n \"ram_gb\": 123,\n \"ram_gb_cost_per_hour\": 123,\n \"raw_pricing_data\": {},\n \"region\": \"<string>\",\n \"service\": \"<string>\",\n \"tags\": {},\n \"updated_at\": \"<string>\",\n \"usage_type\": \"<string>\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://pricing.baselinehq.cloud/marketplace/providers/compute")

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 \"entries\": [\n {\n \"architecture\": \"<string>\",\n \"availability_zone\": \"<string>\",\n \"cost_per_hour\": 123,\n \"cpu_cores\": 123,\n \"cpu_cores_cost_per_hour\": 123,\n \"created_at\": \"<string>\",\n \"id\": \"<string>\",\n \"instance_type\": \"<string>\",\n \"operating_system\": \"<string>\",\n \"period_billing_hours\": 123,\n \"provider\": \"<string>\",\n \"ram_gb\": 123,\n \"ram_gb_cost_per_hour\": 123,\n \"raw_pricing_data\": {},\n \"region\": \"<string>\",\n \"service\": \"<string>\",\n \"tags\": {},\n \"updated_at\": \"<string>\",\n \"usage_type\": \"<string>\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "entries": [
    {
      "architecture": "<string>",
      "availability_zone": "<string>",
      "cost_per_hour": 123,
      "cpu_cores": 123,
      "cpu_cores_cost_per_hour": 123,
      "created_at": "<string>",
      "id": "<string>",
      "instance_type": "<string>",
      "operating_system": "<string>",
      "period_billing_hours": 123,
      "provider": "<string>",
      "ram_gb": 123,
      "ram_gb_cost_per_hour": 123,
      "raw_pricing_data": {},
      "region": "<string>",
      "service": "<string>",
      "tags": {},
      "updated_at": "<string>",
      "usage_type": "<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

Custom pricing request

entries
object[]
required
Minimum array length: 1

Response

Pricing response for a custom provider

entries
object[]
status
enum<string>
Available options:
Registered,
Deleted