---
title: "What the ledger came to, with comped work split out"
method: GET
path: "/v1/admin/billing/summary"
tags: ["billing"]
---

# What the ledger came to, with comped work split out

`GET /v1/admin/billing/summary`

## Request

- Base URL: `https://api.hyperresearch.ai`
- URL: `https://api.hyperresearch.ai/v1/admin/billing/summary`
- Auth: API key in cookie `hr_session`

Estate-wide ledger totals for a window (the current UTC month by default), with operator-comped usage taken OUT of the revenue line and reported as `complimentary_cents` instead of netted into it. One D1 read; no vendor is called, and no query, report or customer name appears in it.

## Query parameters

- `from` string
- `to` string

## Response `200`

Ledger totals for the window

- BillingLedgerSummary
  - `from` string, required
  - `to` string, required
  - `charged_cents` integer, required: Money customers owe for this window: every positive ledger row that is neither comped nor trial-covered. This is the revenue line, and a comped run is never in it.
  - `complimentary_cents` integer, required: What the comped runs of this window would have cost, at their real list price (0041). Reported rather than netted away: the work was real and it cost us real money.
  - `refunded_cents` integer, required: The negative rows, as negative cents.
  - `gross_cents` integer, required: Every row in the window. Reconciliation only.
  - `events` integer, required
  - `complimentary_events` integer, required
  - `complimentary_accounts` integer, required: Accounts carrying a complimentary grant that is in force right now.

## Other responses

- `400`: Invalid request
- `401`: Authentication failed
- `403`: Insufficient scope or plan
- `404`: Not found
- `429`: Rate limited or over quota
- `500`: Internal error

---

[API](https://skmtc.dev/hyperresearch/apis/hyperresearch-cloud-api.md) · [All operations](https://skmtc.dev/hyperresearch/apis/hyperresearch-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hyperresearch/apis/hyperresearch-cloud-api/revisions/726ef831ebf4?raw)
