> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blaxel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing API

> Programmatically retrieve cost and usage metrics for your Blaxel account.

The **Billing API** is the same data source that powers the [Billing Explorer](/Security/Quotas#analytics) in the Blaxel Console. It returns resource-centric, paginated timeseries of cost and usage for an account over an arbitrary time window, with optional filtering and grouping.

Use it to:

* pull cost and usage into your own observability stack
* build custom dashboards and chargeback reports per workspace, resource type, or individual resource
* drive alerting on spend trends

<Note>
  The Billing API is an **account-scoped** API. Unless you pass `workspace=` or `groupBy=workspace` (both restricted to account admins — see [Admin-only parameters](/api-reference/billing#admin-only-parameters)), the response aggregates across every workspace in the account.
</Note>

<Warning>
  **Metrics are not real-time.** We aggressively minimize the delay, but usage events flow through a metering pipeline before they become queryable — expect a lag of a few minutes (sometimes longer under load) between a resource running and its cost/usage appearing in the response. Do not use this API for hard real-time enforcement; use it for dashboards, reporting, and alerting.
</Warning>

<Card title="Billing API Reference" icon="code" href="/api-reference/billing">
  Read the reference documentation.
</Card>
