POST
/
cloud
/
v1
/
reservation_cost_report
/
totals
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
cost_report_aggregated_monthly = client.cloud.cost_reports.get_aggregated_monthly()
print(cost_report_aggregated_monthly.count)
{
  "count": 1,
  "price_status": "error",
  "results": [
    {
      "billing_feature_name": "AI Infrastructure: bm3-ai-1xlarge-h100-80-8 (2 x Intel Xeon 8480+, 2TB RAM, 8x3.84 TB NVMe, 8x Nvidia H100, IB 3.2 Tbit/s, 2x100Gbit/s Ethernet)  Luxembourg-2 - PAYG",
      "billing_metric_name": "bm3-ai-1xlarge-h100-80-8_min",
      "billing_value": 1000,
      "billing_value_unit": "minutes",
      "cost": 1000,
      "currency": "EUR",
      "err": null,
      "flavor": "bm3-ai-1xlarge-h100-80-8",
      "region": 76,
      "region_id": 76,
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Body

application/json
regions
integer[]

List of region IDs.

Examples:
[1, 2, 3]
response_format
enum<string>

Format of the response (csv_totals or json).

Available options:
csv_totals,
json
rounding
boolean
default:true

Round cost values to 5 decimal places. When false, returns full precision.

schema_filter
object

Extended filter for field filtering.

Examples:
{
"field": "flavor",
"type": "instance",
"values": ["g1-standard-1-2"]
}
tags
object

Filter by tags

time_from
string<date-time>
deprecated

Deprecated. Use year_month instead. Beginning of the period: YYYY-mm

time_to
string<date-time>
deprecated

Deprecated. Use year_month instead. End of the period: YYYY-mm

types
enum<string>[]

List of resource types to be filtered in the report.

Examples:
["egress_traffic", "instance"]
year_month
string

Year and month in the format YYYY-MM

Examples:

"2024-08"

Response

200 - application/json

OK

count
integer
required

Total count of the totals

Required range: x >= 0
Examples:

1

price_status
enum<string>
required

Price status for the UI, type: string

Available options:
error,
hide,
show
results
Results · array
required