import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/cost/estimate"
payload = { "node_groups": [
{
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"name": "<string>",
"spot": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
node_groups: [
{
count: 123,
vcpus: 123,
memory_gb: 123,
disk_gb: 123,
name: '<string>',
spot: true
}
]
})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/cost/estimate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/cost/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"node_groups": [
{
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"name": "<string>",
"spot": true
}
]
}
'{
"currency": "<string>",
"pricing": {
"mode": "<string>",
"provider": "<string>",
"source": "<string>",
"reason": "<string>",
"spot_supported": true,
"catalog_size_count": 123,
"applied_discount_pct": 123,
"vcpu_monthly_amount": 123,
"memory_gb_monthly_amount": 123,
"storage_gb_monthly_amount": 123,
"load_balancer_monthly_amount": 123,
"nat_gateway_monthly_amount": 123,
"gateway_monthly_amount": 123,
"flexible_ip_monthly_amount": 123,
"public_ipv4_monthly_amount": 123,
"local_disk_gb_monthly_amount": 123,
"region": "<string>"
},
"baseline": {
"node_groups": [
{
"name": "<string>",
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"spot": true,
"instance_type": "<string>",
"instance_class": "<string>",
"instance_vcpus": 123,
"instance_memory_gb": 123,
"instance_disk_gb": 123,
"extra_disk_gb": 123,
"unit_monthly_cents": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"public_ipv4s": 123,
"public_ipv4_monthly_cents": 123,
"local_disk_monthly_cents": 123,
"monthly_cents": 123,
"priced": true,
"note": "<string>"
}
],
"control_plane": {
"name": "<string>",
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"spot": true,
"instance_type": "<string>",
"instance_class": "<string>",
"instance_vcpus": 123,
"instance_memory_gb": 123,
"instance_disk_gb": 123,
"extra_disk_gb": 123,
"unit_monthly_cents": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"public_ipv4s": 123,
"public_ipv4_monthly_cents": 123,
"local_disk_monthly_cents": 123,
"monthly_cents": 123,
"priced": true,
"note": "<string>"
},
"network": {
"load_balancers": 123,
"nat_gateways": 123,
"gateways": 123,
"flexible_ips": 123,
"monthly_cents": 123,
"unpriced_count": 123
},
"total_node_count": 123,
"priced_node_count": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"network_monthly_cents": 123,
"monthly_cents": 123,
"coverage_incomplete": true
},
"estimate": {
"node_groups": [
{
"name": "<string>",
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"spot": true,
"instance_type": "<string>",
"instance_class": "<string>",
"instance_vcpus": 123,
"instance_memory_gb": 123,
"instance_disk_gb": 123,
"extra_disk_gb": 123,
"unit_monthly_cents": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"public_ipv4s": 123,
"public_ipv4_monthly_cents": 123,
"local_disk_monthly_cents": 123,
"monthly_cents": 123,
"priced": true,
"note": "<string>"
}
],
"control_plane": {
"name": "<string>",
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"spot": true,
"instance_type": "<string>",
"instance_class": "<string>",
"instance_vcpus": 123,
"instance_memory_gb": 123,
"instance_disk_gb": 123,
"extra_disk_gb": 123,
"unit_monthly_cents": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"public_ipv4s": 123,
"public_ipv4_monthly_cents": 123,
"local_disk_monthly_cents": 123,
"monthly_cents": 123,
"priced": true,
"note": "<string>"
},
"network": {
"load_balancers": 123,
"nat_gateways": 123,
"gateways": 123,
"flexible_ips": 123,
"monthly_cents": 123,
"unpriced_count": 123
},
"total_node_count": 123,
"priced_node_count": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"network_monthly_cents": 123,
"monthly_cents": 123,
"coverage_incomplete": true
},
"metered_monthly_cents": 123,
"predicted_monthly_cents": 123,
"delta_monthly_cents": 123,
"target_provider": "<string>",
"target_pricing": {
"mode": "<string>",
"provider": "<string>",
"source": "<string>",
"reason": "<string>",
"spot_supported": true,
"catalog_size_count": 123,
"applied_discount_pct": 123,
"vcpu_monthly_amount": 123,
"memory_gb_monthly_amount": 123,
"storage_gb_monthly_amount": 123,
"load_balancer_monthly_amount": 123,
"nat_gateway_monthly_amount": 123,
"gateway_monthly_amount": 123,
"flexible_ip_monthly_amount": 123,
"public_ipv4_monthly_amount": 123,
"local_disk_gb_monthly_amount": 123,
"region": "<string>"
},
"available_targets": [
{
"provider": "<string>",
"title": "<string>",
"size_count": 123,
"region": "<string>",
"source": "<string>",
"pricing_mode": "<string>"
}
],
"match": "<string>",
"volumes": {
"count": 123,
"metered_monthly_cents": 123,
"target_monthly_cents": 123,
"volume_type": "<string>",
"target_volume_type": "<string>",
"tier_changed": true,
"note": "<string>"
},
"priced_delta_monthly_cents": 123,
"unitemised": {
"monthly_cents": 123,
"carried_to_target": true,
"note": "<string>"
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Price a what-if node-group draft against a cluster
Prices a draft configuration - the full set of node groups the prototype cluster would run (count, vCPU, memory, disk, spot) and optionally its network resources - beside the cluster’s current configuration, and predicts the monthly bill as the metered run rate plus the difference. In catalogue mode each group is placed on the cheapest published size that holds it (locked to the current size’s CPU architecture); private capacity is priced per vCPU, GB of memory and GB of disk from the rate card. Nothing is stored. Bearer-PAT twin of the browser route of the same name under /org.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/cost/estimate"
payload = { "node_groups": [
{
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"name": "<string>",
"spot": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
node_groups: [
{
count: 123,
vcpus: 123,
memory_gb: 123,
disk_gb: 123,
name: '<string>',
spot: true
}
]
})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/cost/estimate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/cost/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"node_groups": [
{
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"name": "<string>",
"spot": true
}
]
}
'{
"currency": "<string>",
"pricing": {
"mode": "<string>",
"provider": "<string>",
"source": "<string>",
"reason": "<string>",
"spot_supported": true,
"catalog_size_count": 123,
"applied_discount_pct": 123,
"vcpu_monthly_amount": 123,
"memory_gb_monthly_amount": 123,
"storage_gb_monthly_amount": 123,
"load_balancer_monthly_amount": 123,
"nat_gateway_monthly_amount": 123,
"gateway_monthly_amount": 123,
"flexible_ip_monthly_amount": 123,
"public_ipv4_monthly_amount": 123,
"local_disk_gb_monthly_amount": 123,
"region": "<string>"
},
"baseline": {
"node_groups": [
{
"name": "<string>",
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"spot": true,
"instance_type": "<string>",
"instance_class": "<string>",
"instance_vcpus": 123,
"instance_memory_gb": 123,
"instance_disk_gb": 123,
"extra_disk_gb": 123,
"unit_monthly_cents": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"public_ipv4s": 123,
"public_ipv4_monthly_cents": 123,
"local_disk_monthly_cents": 123,
"monthly_cents": 123,
"priced": true,
"note": "<string>"
}
],
"control_plane": {
"name": "<string>",
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"spot": true,
"instance_type": "<string>",
"instance_class": "<string>",
"instance_vcpus": 123,
"instance_memory_gb": 123,
"instance_disk_gb": 123,
"extra_disk_gb": 123,
"unit_monthly_cents": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"public_ipv4s": 123,
"public_ipv4_monthly_cents": 123,
"local_disk_monthly_cents": 123,
"monthly_cents": 123,
"priced": true,
"note": "<string>"
},
"network": {
"load_balancers": 123,
"nat_gateways": 123,
"gateways": 123,
"flexible_ips": 123,
"monthly_cents": 123,
"unpriced_count": 123
},
"total_node_count": 123,
"priced_node_count": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"network_monthly_cents": 123,
"monthly_cents": 123,
"coverage_incomplete": true
},
"estimate": {
"node_groups": [
{
"name": "<string>",
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"spot": true,
"instance_type": "<string>",
"instance_class": "<string>",
"instance_vcpus": 123,
"instance_memory_gb": 123,
"instance_disk_gb": 123,
"extra_disk_gb": 123,
"unit_monthly_cents": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"public_ipv4s": 123,
"public_ipv4_monthly_cents": 123,
"local_disk_monthly_cents": 123,
"monthly_cents": 123,
"priced": true,
"note": "<string>"
}
],
"control_plane": {
"name": "<string>",
"count": 123,
"vcpus": 123,
"memory_gb": 123,
"disk_gb": 123,
"spot": true,
"instance_type": "<string>",
"instance_class": "<string>",
"instance_vcpus": 123,
"instance_memory_gb": 123,
"instance_disk_gb": 123,
"extra_disk_gb": 123,
"unit_monthly_cents": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"public_ipv4s": 123,
"public_ipv4_monthly_cents": 123,
"local_disk_monthly_cents": 123,
"monthly_cents": 123,
"priced": true,
"note": "<string>"
},
"network": {
"load_balancers": 123,
"nat_gateways": 123,
"gateways": 123,
"flexible_ips": 123,
"monthly_cents": 123,
"unpriced_count": 123
},
"total_node_count": 123,
"priced_node_count": 123,
"compute_monthly_cents": 123,
"storage_monthly_cents": 123,
"network_monthly_cents": 123,
"monthly_cents": 123,
"coverage_incomplete": true
},
"metered_monthly_cents": 123,
"predicted_monthly_cents": 123,
"delta_monthly_cents": 123,
"target_provider": "<string>",
"target_pricing": {
"mode": "<string>",
"provider": "<string>",
"source": "<string>",
"reason": "<string>",
"spot_supported": true,
"catalog_size_count": 123,
"applied_discount_pct": 123,
"vcpu_monthly_amount": 123,
"memory_gb_monthly_amount": 123,
"storage_gb_monthly_amount": 123,
"load_balancer_monthly_amount": 123,
"nat_gateway_monthly_amount": 123,
"gateway_monthly_amount": 123,
"flexible_ip_monthly_amount": 123,
"public_ipv4_monthly_amount": 123,
"local_disk_gb_monthly_amount": 123,
"region": "<string>"
},
"available_targets": [
{
"provider": "<string>",
"title": "<string>",
"size_count": 123,
"region": "<string>",
"source": "<string>",
"pricing_mode": "<string>"
}
],
"match": "<string>",
"volumes": {
"count": 123,
"metered_monthly_cents": 123,
"target_monthly_cents": 123,
"volume_type": "<string>",
"target_volume_type": "<string>",
"tier_changed": true,
"note": "<string>"
},
"priced_delta_monthly_cents": 123,
"unitemised": {
"monthly_cents": 123,
"carried_to_target": true,
"note": "<string>"
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Path Parameters
Body
The full set of node groups the prototype cluster would run (at most 32).
Show child attributes
Show child attributes
Absent means unchanged from today.
Show child attributes
Show child attributes
Price the draft on this provider's catalogue instead of the cluster's own (a migration); one of the response's available_targets. The cluster's own provider is accepted too and re-sizes the fleet in place: every group and the control plane land afresh on that price book. Empty keeps the cluster's provider and its sizes.
How each group is placed on a size: cheapest (the default) takes the cheapest size that holds the shape whatever its vCPU class; like_for_like prefers a size of the same vCPU class as the one the group runs on today when any such size holds it.
cheapest, like_for_like Response
Successful response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The metered run rate plus the change; on a migration the re-priced volumes are folded in. Withheld when an unpriced part differs between the two sides.
The provider the estimate was priced on when the draft asked for a migration; empty otherwise.
The migration target's source and unit prices; pricing keeps the cluster's own.
Show child attributes
Show child attributes
Providers a draft may be priced on: those with an offline size catalogue and priced rows, the cluster's own excluded.
Show child attributes
Show child attributes
The matching rule the estimate was placed with.
Show child attributes
Show child attributes
The estimate minus the baseline over the lines both sides could price (a line priced on one side only is left out of both), answered even when the prediction is withheld so a partly priced target keeps a floor; null when no line could be compared.
Show child attributes
Show child attributes