Account Management

Download Billing Report

You can view the billing report on the console, and you can also download the billing report in CSV format via API. For more advanced use cases, we have introduced two APIs that allow you to generate billing reports on an S3 bucket and fetch a download link for these reports.

Generate the billing report

To generate a billing report, you can make a request to the following API:

POST /bv/billing/v1/csv-reports

Upon a successful request, the API will generate a billing report and return a response containing the ID for the report:


Fetch the download URL for the billing report

Once you have the report ID, you can fetch the billing report using the following API:

GET /bv/billing/v1/csv-reports/{id}:fetch

The response from this API should include the ID, the status of the report, and the URI (download link) for the report:


In this response, the status field can be either CSV_REPORT_STATUS_RUNNING or CSV_REPORT_STATUS_SUCCEEDED. You should keep checking the status until it becomes CSV_REPORT_STATUS_SUCCEEDED. At that point, you can download the billing report from the provided URI.

Here is a sequence diagram to illustrate the process of fetching and downloading billing reports: