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 '
{
"currency": "<string>",
"filterAggregationUnit": {
"filterAggregationUnitValues": [
"FILTER_AGGREGATION_UNIT_UNSPECIFIED"
]
},
"offerTypes": [
"OFFER_TYPE_UNSPECIFIED"
],
"resourceSpecs": [
{
"spec": {
"@type": "<string>"
}
}
]
}
'import requests
url = "https://api.nebius.cloud/billing/v1/calculator/estimate-batch"
payload = {
"currency": "<string>",
"filterAggregationUnit": { "filterAggregationUnitValues": ["FILTER_AGGREGATION_UNIT_UNSPECIFIED"] },
"offerTypes": ["OFFER_TYPE_UNSPECIFIED"],
"resourceSpecs": [{ "spec": { "@type": "<string>" } }]
}
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({
currency: '<string>',
filterAggregationUnit: {filterAggregationUnitValues: ['FILTER_AGGREGATION_UNIT_UNSPECIFIED']},
offerTypes: ['OFFER_TYPE_UNSPECIFIED'],
resourceSpecs: [{spec: {'@type': '<string>'}}]
})
};
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([
'currency' => '<string>',
'filterAggregationUnit' => [
'filterAggregationUnitValues' => [
'FILTER_AGGREGATION_UNIT_UNSPECIFIED'
]
],
'offerTypes' => [
'OFFER_TYPE_UNSPECIFIED'
],
'resourceSpecs' => [
[
'spec' => [
'@type' => '<string>'
]
]
]
]),
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 \"currency\": \"<string>\",\n \"filterAggregationUnit\": {\n \"filterAggregationUnitValues\": [\n \"FILTER_AGGREGATION_UNIT_UNSPECIFIED\"\n ]\n },\n \"offerTypes\": [\n \"OFFER_TYPE_UNSPECIFIED\"\n ],\n \"resourceSpecs\": [\n {\n \"spec\": {\n \"@type\": \"<string>\"\n }\n }\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 \"currency\": \"<string>\",\n \"filterAggregationUnit\": {\n \"filterAggregationUnitValues\": [\n \"FILTER_AGGREGATION_UNIT_UNSPECIFIED\"\n ]\n },\n \"offerTypes\": [\n \"OFFER_TYPE_UNSPECIFIED\"\n ],\n \"resourceSpecs\": [\n {\n \"spec\": {\n \"@type\": \"<string>\"\n }\n }\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 \"currency\": \"<string>\",\n \"filterAggregationUnit\": {\n \"filterAggregationUnitValues\": [\n \"FILTER_AGGREGATION_UNIT_UNSPECIFIED\"\n ]\n },\n \"offerTypes\": [\n \"OFFER_TYPE_UNSPECIFIED\"\n ],\n \"resourceSpecs\": [\n {\n \"spec\": {\n \"@type\": \"<string>\"\n }\n }\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 '
{
"currency": "<string>",
"filterAggregationUnit": {
"filterAggregationUnitValues": [
"FILTER_AGGREGATION_UNIT_UNSPECIFIED"
]
},
"offerTypes": [
"OFFER_TYPE_UNSPECIFIED"
],
"resourceSpecs": [
{
"spec": {
"@type": "<string>"
}
}
]
}
'import requests
url = "https://api.nebius.cloud/billing/v1/calculator/estimate-batch"
payload = {
"currency": "<string>",
"filterAggregationUnit": { "filterAggregationUnitValues": ["FILTER_AGGREGATION_UNIT_UNSPECIFIED"] },
"offerTypes": ["OFFER_TYPE_UNSPECIFIED"],
"resourceSpecs": [{ "spec": { "@type": "<string>" } }]
}
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({
currency: '<string>',
filterAggregationUnit: {filterAggregationUnitValues: ['FILTER_AGGREGATION_UNIT_UNSPECIFIED']},
offerTypes: ['OFFER_TYPE_UNSPECIFIED'],
resourceSpecs: [{spec: {'@type': '<string>'}}]
})
};
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([
'currency' => '<string>',
'filterAggregationUnit' => [
'filterAggregationUnitValues' => [
'FILTER_AGGREGATION_UNIT_UNSPECIFIED'
]
],
'offerTypes' => [
'OFFER_TYPE_UNSPECIFIED'
],
'resourceSpecs' => [
[
'spec' => [
'@type' => '<string>'
]
]
]
]),
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 \"currency\": \"<string>\",\n \"filterAggregationUnit\": {\n \"filterAggregationUnitValues\": [\n \"FILTER_AGGREGATION_UNIT_UNSPECIFIED\"\n ]\n },\n \"offerTypes\": [\n \"OFFER_TYPE_UNSPECIFIED\"\n ],\n \"resourceSpecs\": [\n {\n \"spec\": {\n \"@type\": \"<string>\"\n }\n }\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 \"currency\": \"<string>\",\n \"filterAggregationUnit\": {\n \"filterAggregationUnitValues\": [\n \"FILTER_AGGREGATION_UNIT_UNSPECIFIED\"\n ]\n },\n \"offerTypes\": [\n \"OFFER_TYPE_UNSPECIFIED\"\n ],\n \"resourceSpecs\": [\n {\n \"spec\": {\n \"@type\": \"<string>\"\n }\n }\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 \"currency\": \"<string>\",\n \"filterAggregationUnit\": {\n \"filterAggregationUnitValues\": [\n \"FILTER_AGGREGATION_UNIT_UNSPECIFIED\"\n ]\n },\n \"offerTypes\": [\n \"OFFER_TYPE_UNSPECIFIED\"\n ],\n \"resourceSpecs\": [\n {\n \"spec\": {\n \"@type\": \"<string>\"\n }\n }\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>"
}
]
}
}
}
]
}Authorizations
The Authorization header expects a Bearer token.
Body
application/json
Currency for the cost estimate (e.g., "usd", "ils"). Defaults to "usd".
Filters only time-based aggregation units, e.g. hour, day, month, etc. If response contains other aggregation units like request, token, etc., it will always be presented in response.
Show child attributes
Show child attributes
Type of offers to be applied to the cost estimate.
OfferType is a enum that specifies the type of offer.
- OFFER_TYPE_CONTRACT_PRICE: Contract price is a special price for SKU.
Available options:
OFFER_TYPE_UNSPECIFIED, OFFER_TYPE_CONTRACT_PRICE List of resource specifications for cost estimation. Each resource will be priced individually and then aggregated into total costs.
Show child attributes
Show child attributes
Was this page helpful?
⌘I