API reference/21 of 24

Billing report

White-label period usage for credit reconciliation.

GET/rooms/{id}/report

White-label partners: period-by-period usage and overage for your private access. Your API key can only read your own id (the room id we give you when we provision access). Self-serve dashboard users can usually stick to GET /usage.

Charge closed periods only. The open period is still accruing — use billing.billable_period_starts and closed_periods_overage_cost_micros (or *_usd) for invoices. Plan/subscription fees are separate from this metered overage.

Path parameters

  • idstringRequired

    Your white-label id, for example acme-images.

curl https://api.comprestack.com/api/v1/rooms/acme-images/report \
  -H "Authorization: Bearer $COMPRESTACK_API_KEY"
Response
{
  "object": "billing_report",
  "id": "acme-images",
  "status": "active",
  "display_name": "Acme Images",
  "usage": {
    "object": "usage",
    "plan": "business",
    "images_used": 18420,
    "images_limit": 200000,
    "overage_images": 0,
    "overage_per_thousand_usd": 1,
    "remaining": 181580,
    "resets_at": "2026-11-01T00:00:00.000Z"
  },
  "periods": [
    {
      "period_start": "2026-09-01",
      "period_end": "2026-10-01",
      "closed": true,
      "images_used": 152000,
      "overage_images": 0,
      "overage_cost_usd": 0,
      "overage_cost_micros": 0
    },
    {
      "period_start": "2026-10-01",
      "period_end": "2026-11-01",
      "closed": false,
      "images_used": 18420,
      "overage_images": 0,
      "overage_cost_usd": 0,
      "overage_cost_micros": 0
    }
  ],
  "billing": {
    "currency": "USD",
    "amount_unit": "overage_cost_micros (millionths of a USD, integer)",
    "open_period_overage_cost_micros": 0,
    "closed_periods_overage_cost_micros": 0,
    "closed_periods_overage_cost_usd": 0,
    "billable_period_starts": ["2026-09-01"],
    "note": "Charge closed periods only; the open period is still accruing."
  },
  "active_keys": 1
}