Marketplace
Register custom model pricing
Register custom token pricing for models you host. Entries are versioned: a price change closes the current row and opens a new one, so historic spend keeps the rate it was billed at.
The returned id is what you attach with the costgraph.ai/pricing-id.model label or tag. Each version carries its own id, so read the live entry back after a price change instead of holding on to an earlier one.
POST
/
marketplace
/
providers
/
models
Register custom model pricing
curl --request POST \
--url https://pricing.baselinehq.cloud/marketplace/providers/models \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"entries": [
{
"context_limit": 123,
"currency": "<string>",
"effective_from": "<string>",
"effective_to": "<string>",
"fetched_at": "<string>",
"host": "<string>",
"id": "<string>",
"modalities_input": [
"<string>"
],
"modalities_output": [
"<string>"
],
"model": "<string>",
"model_id": "<string>",
"open_weights": true,
"output_limit": 123,
"provider": "<string>",
"publisher": "<string>",
"raw_pricing_data": {},
"reasoning": true,
"region": "<string>",
"sku_price_id": "<string>",
"source": "<string>",
"source_url": "<string>",
"structured_output": true,
"tags": {},
"token_bucket": "<string>",
"tool_call": true,
"unit_price_per_mtok": 123
}
]
}
'import requests
url = "https://pricing.baselinehq.cloud/marketplace/providers/models"
payload = { "entries": [
{
"context_limit": 123,
"currency": "<string>",
"effective_from": "<string>",
"effective_to": "<string>",
"fetched_at": "<string>",
"host": "<string>",
"id": "<string>",
"modalities_input": ["<string>"],
"modalities_output": ["<string>"],
"model": "<string>",
"model_id": "<string>",
"open_weights": True,
"output_limit": 123,
"provider": "<string>",
"publisher": "<string>",
"raw_pricing_data": {},
"reasoning": True,
"region": "<string>",
"sku_price_id": "<string>",
"source": "<string>",
"source_url": "<string>",
"structured_output": True,
"tags": {},
"token_bucket": "<string>",
"tool_call": True,
"unit_price_per_mtok": 123
}
] }
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: [
{
context_limit: 123,
currency: '<string>',
effective_from: '<string>',
effective_to: '<string>',
fetched_at: '<string>',
host: '<string>',
id: '<string>',
modalities_input: ['<string>'],
modalities_output: ['<string>'],
model: '<string>',
model_id: '<string>',
open_weights: true,
output_limit: 123,
provider: '<string>',
publisher: '<string>',
raw_pricing_data: {},
reasoning: true,
region: '<string>',
sku_price_id: '<string>',
source: '<string>',
source_url: '<string>',
structured_output: true,
tags: {},
token_bucket: '<string>',
tool_call: true,
unit_price_per_mtok: 123
}
]
})
};
fetch('https://pricing.baselinehq.cloud/marketplace/providers/models', 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/models",
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' => [
[
'context_limit' => 123,
'currency' => '<string>',
'effective_from' => '<string>',
'effective_to' => '<string>',
'fetched_at' => '<string>',
'host' => '<string>',
'id' => '<string>',
'modalities_input' => [
'<string>'
],
'modalities_output' => [
'<string>'
],
'model' => '<string>',
'model_id' => '<string>',
'open_weights' => true,
'output_limit' => 123,
'provider' => '<string>',
'publisher' => '<string>',
'raw_pricing_data' => [
],
'reasoning' => true,
'region' => '<string>',
'sku_price_id' => '<string>',
'source' => '<string>',
'source_url' => '<string>',
'structured_output' => true,
'tags' => [
],
'token_bucket' => '<string>',
'tool_call' => true,
'unit_price_per_mtok' => 123
]
]
]),
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/models"
payload := strings.NewReader("{\n \"entries\": [\n {\n \"context_limit\": 123,\n \"currency\": \"<string>\",\n \"effective_from\": \"<string>\",\n \"effective_to\": \"<string>\",\n \"fetched_at\": \"<string>\",\n \"host\": \"<string>\",\n \"id\": \"<string>\",\n \"modalities_input\": [\n \"<string>\"\n ],\n \"modalities_output\": [\n \"<string>\"\n ],\n \"model\": \"<string>\",\n \"model_id\": \"<string>\",\n \"open_weights\": true,\n \"output_limit\": 123,\n \"provider\": \"<string>\",\n \"publisher\": \"<string>\",\n \"raw_pricing_data\": {},\n \"reasoning\": true,\n \"region\": \"<string>\",\n \"sku_price_id\": \"<string>\",\n \"source\": \"<string>\",\n \"source_url\": \"<string>\",\n \"structured_output\": true,\n \"tags\": {},\n \"token_bucket\": \"<string>\",\n \"tool_call\": true,\n \"unit_price_per_mtok\": 123\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/models")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entries\": [\n {\n \"context_limit\": 123,\n \"currency\": \"<string>\",\n \"effective_from\": \"<string>\",\n \"effective_to\": \"<string>\",\n \"fetched_at\": \"<string>\",\n \"host\": \"<string>\",\n \"id\": \"<string>\",\n \"modalities_input\": [\n \"<string>\"\n ],\n \"modalities_output\": [\n \"<string>\"\n ],\n \"model\": \"<string>\",\n \"model_id\": \"<string>\",\n \"open_weights\": true,\n \"output_limit\": 123,\n \"provider\": \"<string>\",\n \"publisher\": \"<string>\",\n \"raw_pricing_data\": {},\n \"reasoning\": true,\n \"region\": \"<string>\",\n \"sku_price_id\": \"<string>\",\n \"source\": \"<string>\",\n \"source_url\": \"<string>\",\n \"structured_output\": true,\n \"tags\": {},\n \"token_bucket\": \"<string>\",\n \"tool_call\": true,\n \"unit_price_per_mtok\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pricing.baselinehq.cloud/marketplace/providers/models")
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 \"context_limit\": 123,\n \"currency\": \"<string>\",\n \"effective_from\": \"<string>\",\n \"effective_to\": \"<string>\",\n \"fetched_at\": \"<string>\",\n \"host\": \"<string>\",\n \"id\": \"<string>\",\n \"modalities_input\": [\n \"<string>\"\n ],\n \"modalities_output\": [\n \"<string>\"\n ],\n \"model\": \"<string>\",\n \"model_id\": \"<string>\",\n \"open_weights\": true,\n \"output_limit\": 123,\n \"provider\": \"<string>\",\n \"publisher\": \"<string>\",\n \"raw_pricing_data\": {},\n \"reasoning\": true,\n \"region\": \"<string>\",\n \"sku_price_id\": \"<string>\",\n \"source\": \"<string>\",\n \"source_url\": \"<string>\",\n \"structured_output\": true,\n \"tags\": {},\n \"token_bucket\": \"<string>\",\n \"tool_call\": true,\n \"unit_price_per_mtok\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"entries": [
{
"context_limit": 123,
"currency": "<string>",
"effective_from": "<string>",
"effective_to": "<string>",
"fetched_at": "<string>",
"host": "<string>",
"id": "<string>",
"modalities_input": [
"<string>"
],
"modalities_output": [
"<string>"
],
"model": "<string>",
"model_id": "<string>",
"open_weights": true,
"output_limit": 123,
"provider": "<string>",
"publisher": "<string>",
"raw_pricing_data": {},
"reasoning": true,
"region": "<string>",
"sku_price_id": "<string>",
"source": "<string>",
"source_url": "<string>",
"structured_output": true,
"tags": {},
"token_bucket": "<string>",
"tool_call": true,
"unit_price_per_mtok": 123
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
ApiKeyAuthBearerAuth
API key with "bl_" prefix (e.g. "bl_<api_key>")
Body
application/json
Custom model pricing request
Minimum array length:
1Show child attributes
Show child attributes
Was this page helpful?
⌘I
Register custom model pricing
curl --request POST \
--url https://pricing.baselinehq.cloud/marketplace/providers/models \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"entries": [
{
"context_limit": 123,
"currency": "<string>",
"effective_from": "<string>",
"effective_to": "<string>",
"fetched_at": "<string>",
"host": "<string>",
"id": "<string>",
"modalities_input": [
"<string>"
],
"modalities_output": [
"<string>"
],
"model": "<string>",
"model_id": "<string>",
"open_weights": true,
"output_limit": 123,
"provider": "<string>",
"publisher": "<string>",
"raw_pricing_data": {},
"reasoning": true,
"region": "<string>",
"sku_price_id": "<string>",
"source": "<string>",
"source_url": "<string>",
"structured_output": true,
"tags": {},
"token_bucket": "<string>",
"tool_call": true,
"unit_price_per_mtok": 123
}
]
}
'import requests
url = "https://pricing.baselinehq.cloud/marketplace/providers/models"
payload = { "entries": [
{
"context_limit": 123,
"currency": "<string>",
"effective_from": "<string>",
"effective_to": "<string>",
"fetched_at": "<string>",
"host": "<string>",
"id": "<string>",
"modalities_input": ["<string>"],
"modalities_output": ["<string>"],
"model": "<string>",
"model_id": "<string>",
"open_weights": True,
"output_limit": 123,
"provider": "<string>",
"publisher": "<string>",
"raw_pricing_data": {},
"reasoning": True,
"region": "<string>",
"sku_price_id": "<string>",
"source": "<string>",
"source_url": "<string>",
"structured_output": True,
"tags": {},
"token_bucket": "<string>",
"tool_call": True,
"unit_price_per_mtok": 123
}
] }
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: [
{
context_limit: 123,
currency: '<string>',
effective_from: '<string>',
effective_to: '<string>',
fetched_at: '<string>',
host: '<string>',
id: '<string>',
modalities_input: ['<string>'],
modalities_output: ['<string>'],
model: '<string>',
model_id: '<string>',
open_weights: true,
output_limit: 123,
provider: '<string>',
publisher: '<string>',
raw_pricing_data: {},
reasoning: true,
region: '<string>',
sku_price_id: '<string>',
source: '<string>',
source_url: '<string>',
structured_output: true,
tags: {},
token_bucket: '<string>',
tool_call: true,
unit_price_per_mtok: 123
}
]
})
};
fetch('https://pricing.baselinehq.cloud/marketplace/providers/models', 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/models",
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' => [
[
'context_limit' => 123,
'currency' => '<string>',
'effective_from' => '<string>',
'effective_to' => '<string>',
'fetched_at' => '<string>',
'host' => '<string>',
'id' => '<string>',
'modalities_input' => [
'<string>'
],
'modalities_output' => [
'<string>'
],
'model' => '<string>',
'model_id' => '<string>',
'open_weights' => true,
'output_limit' => 123,
'provider' => '<string>',
'publisher' => '<string>',
'raw_pricing_data' => [
],
'reasoning' => true,
'region' => '<string>',
'sku_price_id' => '<string>',
'source' => '<string>',
'source_url' => '<string>',
'structured_output' => true,
'tags' => [
],
'token_bucket' => '<string>',
'tool_call' => true,
'unit_price_per_mtok' => 123
]
]
]),
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/models"
payload := strings.NewReader("{\n \"entries\": [\n {\n \"context_limit\": 123,\n \"currency\": \"<string>\",\n \"effective_from\": \"<string>\",\n \"effective_to\": \"<string>\",\n \"fetched_at\": \"<string>\",\n \"host\": \"<string>\",\n \"id\": \"<string>\",\n \"modalities_input\": [\n \"<string>\"\n ],\n \"modalities_output\": [\n \"<string>\"\n ],\n \"model\": \"<string>\",\n \"model_id\": \"<string>\",\n \"open_weights\": true,\n \"output_limit\": 123,\n \"provider\": \"<string>\",\n \"publisher\": \"<string>\",\n \"raw_pricing_data\": {},\n \"reasoning\": true,\n \"region\": \"<string>\",\n \"sku_price_id\": \"<string>\",\n \"source\": \"<string>\",\n \"source_url\": \"<string>\",\n \"structured_output\": true,\n \"tags\": {},\n \"token_bucket\": \"<string>\",\n \"tool_call\": true,\n \"unit_price_per_mtok\": 123\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/models")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entries\": [\n {\n \"context_limit\": 123,\n \"currency\": \"<string>\",\n \"effective_from\": \"<string>\",\n \"effective_to\": \"<string>\",\n \"fetched_at\": \"<string>\",\n \"host\": \"<string>\",\n \"id\": \"<string>\",\n \"modalities_input\": [\n \"<string>\"\n ],\n \"modalities_output\": [\n \"<string>\"\n ],\n \"model\": \"<string>\",\n \"model_id\": \"<string>\",\n \"open_weights\": true,\n \"output_limit\": 123,\n \"provider\": \"<string>\",\n \"publisher\": \"<string>\",\n \"raw_pricing_data\": {},\n \"reasoning\": true,\n \"region\": \"<string>\",\n \"sku_price_id\": \"<string>\",\n \"source\": \"<string>\",\n \"source_url\": \"<string>\",\n \"structured_output\": true,\n \"tags\": {},\n \"token_bucket\": \"<string>\",\n \"tool_call\": true,\n \"unit_price_per_mtok\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pricing.baselinehq.cloud/marketplace/providers/models")
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 \"context_limit\": 123,\n \"currency\": \"<string>\",\n \"effective_from\": \"<string>\",\n \"effective_to\": \"<string>\",\n \"fetched_at\": \"<string>\",\n \"host\": \"<string>\",\n \"id\": \"<string>\",\n \"modalities_input\": [\n \"<string>\"\n ],\n \"modalities_output\": [\n \"<string>\"\n ],\n \"model\": \"<string>\",\n \"model_id\": \"<string>\",\n \"open_weights\": true,\n \"output_limit\": 123,\n \"provider\": \"<string>\",\n \"publisher\": \"<string>\",\n \"raw_pricing_data\": {},\n \"reasoning\": true,\n \"region\": \"<string>\",\n \"sku_price_id\": \"<string>\",\n \"source\": \"<string>\",\n \"source_url\": \"<string>\",\n \"structured_output\": true,\n \"tags\": {},\n \"token_bucket\": \"<string>\",\n \"tool_call\": true,\n \"unit_price_per_mtok\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"entries": [
{
"context_limit": 123,
"currency": "<string>",
"effective_from": "<string>",
"effective_to": "<string>",
"fetched_at": "<string>",
"host": "<string>",
"id": "<string>",
"modalities_input": [
"<string>"
],
"modalities_output": [
"<string>"
],
"model": "<string>",
"model_id": "<string>",
"open_weights": true,
"output_limit": 123,
"provider": "<string>",
"publisher": "<string>",
"raw_pricing_data": {},
"reasoning": true,
"region": "<string>",
"sku_price_id": "<string>",
"source": "<string>",
"source_url": "<string>",
"structured_output": true,
"tags": {},
"token_bucket": "<string>",
"tool_call": true,
"unit_price_per_mtok": 123
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}