Estimate Batch
curl --request POST \
--url https://api.nebius.cloud/billing/v1/calculator/estimate-batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resourceSpecs": [
{
"spec": {
"@type": "<string>"
}
}
],
"currency": "<string>",
"filterAggregationUnit": {
"filterAggregationUnitValues": [
"FILTER_AGGREGATION_UNIT_UNSPECIFIED"
]
},
"offerTypes": [
"OFFER_TYPE_UNSPECIFIED"
]
}
'import requests
url = "https://api.nebius.cloud/billing/v1/calculator/estimate-batch"
payload = {
"resourceSpecs": [{ "spec": { "@type": "<string>" } }],
"currency": "<string>",
"filterAggregationUnit": { "filterAggregationUnitValues": ["FILTER_AGGREGATION_UNIT_UNSPECIFIED"] },
"offerTypes": ["OFFER_TYPE_UNSPECIFIED"]
}
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({
resourceSpecs: [{spec: {'@type': '<string>'}}],
currency: '<string>',
filterAggregationUnit: {filterAggregationUnitValues: ['FILTER_AGGREGATION_UNIT_UNSPECIFIED']},
offerTypes: ['OFFER_TYPE_UNSPECIFIED']
})
};
fetch('https://api.nebius.cloud/billing/v1/calculator/estimate-batch', 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://api.nebius.cloud/billing/v1/calculator/estimate-batch",
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([
'resourceSpecs' => [
[
'spec' => [
'@type' => '<string>'
]
]
],
'currency' => '<string>',
'filterAggregationUnit' => [
'filterAggregationUnitValues' => [
'FILTER_AGGREGATION_UNIT_UNSPECIFIED'
]
],
'offerTypes' => [
'OFFER_TYPE_UNSPECIFIED'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.nebius.cloud/billing/v1/calculator/estimate-batch"
payload := strings.NewReader("{\n \"resourceSpecs\": [\n {\n \"spec\": {\n \"@type\": \"<string>\"\n }\n }\n ],\n \"currency\": \"<string>\",\n \"filterAggregationUnit\": {\n \"filterAggregationUnitValues\": [\n \"FILTER_AGGREGATION_UNIT_UNSPECIFIED\"\n ]\n },\n \"offerTypes\": [\n \"OFFER_TYPE_UNSPECIFIED\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.nebius.cloud/billing/v1/calculator/estimate-batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resourceSpecs\": [\n {\n \"spec\": {\n \"@type\": \"<string>\"\n }\n }\n ],\n \"currency\": \"<string>\",\n \"filterAggregationUnit\": {\n \"filterAggregationUnitValues\": [\n \"FILTER_AGGREGATION_UNIT_UNSPECIFIED\"\n ]\n },\n \"offerTypes\": [\n \"OFFER_TYPE_UNSPECIFIED\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nebius.cloud/billing/v1/calculator/estimate-batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resourceSpecs\": [\n {\n \"spec\": {\n \"@type\": \"<string>\"\n }\n }\n ],\n \"currency\": \"<string>\",\n \"filterAggregationUnit\": {\n \"filterAggregationUnitValues\": [\n \"FILTER_AGGREGATION_UNIT_UNSPECIFIED\"\n ]\n },\n \"offerTypes\": [\n \"OFFER_TYPE_UNSPECIFIED\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"currency": "<string>",
"resourceCosts": [
{
"aggregationUnit": {
"unit": "<string>",
"unitType": "UNIT_TYPE_UNSPECIFIED"
},
"autoscale": {
"maxCost": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
},
"maxInstances": 123,
"minCost": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
},
"minInstances": 123,
"perInstance": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
}
},
"fixedInstance": {
"instanceCount": 123,
"perInstance": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
},
"total": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
}
},
"general": {
"total": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
}
},
"metadata": {
"parentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"labels": {},
"name": "<string>",
"resourceVersion": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
},
"overrideMetadata": {
"parentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"labels": {},
"name": "<string>",
"resourceVersion": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
],
"totalCosts": [
{
"aggregationUnit": {
"unit": "<string>",
"unitType": "UNIT_TYPE_UNSPECIFIED"
},
"general": {
"total": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
}
},
"range": {
"max": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
},
"min": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
}
}
}
]
}calculator
Estimate Batch
Estimates prices for multiple resources. Returns aggregated hourly and monthly cost estimates for all specified resources.
POST
/
billing
/
v1
/
calculator
/
estimate-batch
Estimate Batch
curl --request POST \
--url https://api.nebius.cloud/billing/v1/calculator/estimate-batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resourceSpecs": [
{
"spec": {
"@type": "<string>"
}
}
],
"currency": "<string>",
"filterAggregationUnit": {
"filterAggregationUnitValues": [
"FILTER_AGGREGATION_UNIT_UNSPECIFIED"
]
},
"offerTypes": [
"OFFER_TYPE_UNSPECIFIED"
]
}
'import requests
url = "https://api.nebius.cloud/billing/v1/calculator/estimate-batch"
payload = {
"resourceSpecs": [{ "spec": { "@type": "<string>" } }],
"currency": "<string>",
"filterAggregationUnit": { "filterAggregationUnitValues": ["FILTER_AGGREGATION_UNIT_UNSPECIFIED"] },
"offerTypes": ["OFFER_TYPE_UNSPECIFIED"]
}
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({
resourceSpecs: [{spec: {'@type': '<string>'}}],
currency: '<string>',
filterAggregationUnit: {filterAggregationUnitValues: ['FILTER_AGGREGATION_UNIT_UNSPECIFIED']},
offerTypes: ['OFFER_TYPE_UNSPECIFIED']
})
};
fetch('https://api.nebius.cloud/billing/v1/calculator/estimate-batch', 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://api.nebius.cloud/billing/v1/calculator/estimate-batch",
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([
'resourceSpecs' => [
[
'spec' => [
'@type' => '<string>'
]
]
],
'currency' => '<string>',
'filterAggregationUnit' => [
'filterAggregationUnitValues' => [
'FILTER_AGGREGATION_UNIT_UNSPECIFIED'
]
],
'offerTypes' => [
'OFFER_TYPE_UNSPECIFIED'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.nebius.cloud/billing/v1/calculator/estimate-batch"
payload := strings.NewReader("{\n \"resourceSpecs\": [\n {\n \"spec\": {\n \"@type\": \"<string>\"\n }\n }\n ],\n \"currency\": \"<string>\",\n \"filterAggregationUnit\": {\n \"filterAggregationUnitValues\": [\n \"FILTER_AGGREGATION_UNIT_UNSPECIFIED\"\n ]\n },\n \"offerTypes\": [\n \"OFFER_TYPE_UNSPECIFIED\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.nebius.cloud/billing/v1/calculator/estimate-batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resourceSpecs\": [\n {\n \"spec\": {\n \"@type\": \"<string>\"\n }\n }\n ],\n \"currency\": \"<string>\",\n \"filterAggregationUnit\": {\n \"filterAggregationUnitValues\": [\n \"FILTER_AGGREGATION_UNIT_UNSPECIFIED\"\n ]\n },\n \"offerTypes\": [\n \"OFFER_TYPE_UNSPECIFIED\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nebius.cloud/billing/v1/calculator/estimate-batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resourceSpecs\": [\n {\n \"spec\": {\n \"@type\": \"<string>\"\n }\n }\n ],\n \"currency\": \"<string>\",\n \"filterAggregationUnit\": {\n \"filterAggregationUnitValues\": [\n \"FILTER_AGGREGATION_UNIT_UNSPECIFIED\"\n ]\n },\n \"offerTypes\": [\n \"OFFER_TYPE_UNSPECIFIED\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"currency": "<string>",
"resourceCosts": [
{
"aggregationUnit": {
"unit": "<string>",
"unitType": "UNIT_TYPE_UNSPECIFIED"
},
"autoscale": {
"maxCost": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
},
"maxInstances": 123,
"minCost": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
},
"minInstances": 123,
"perInstance": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
}
},
"fixedInstance": {
"instanceCount": 123,
"perInstance": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
},
"total": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
}
},
"general": {
"total": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
}
},
"metadata": {
"parentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"labels": {},
"name": "<string>",
"resourceVersion": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
},
"overrideMetadata": {
"parentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"labels": {},
"name": "<string>",
"resourceVersion": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
],
"totalCosts": [
{
"aggregationUnit": {
"unit": "<string>",
"unitType": "UNIT_TYPE_UNSPECIFIED"
},
"general": {
"total": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
}
},
"range": {
"max": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
},
"min": {
"cost": "<string>",
"costRounded": "<string>",
"skuCosts": [
{
"cost": "<string>",
"costRounded": "<string>",
"quantity": "<string>",
"quantityRounded": "<string>",
"skuId": "<string>"
}
]
}
}
}
]
}Body
application/json
Was this page helpful?