---
title: "Get Enterprise Billing"
method: GET
path: "/api/admin/enterprise/billing"
tags: ["Admin"]
---

# Get Enterprise Billing

`GET /api/admin/enterprise/billing`

Enterprise billing dashboard data; internal/pilot/staff hidden unless a segment is given.

## Query parameters

- `segment` string, nullable — Population segment. Omit for the default view (hides internal, pilot and staff accounts). Values: all, admin, internal, pilot, regular_enterprise, regular_prepaid.

## Response `200`

Successful Response

- EnterpriseBillingResponse
  - `success` boolean
  - `summary` EnterpriseBillingSummary
    - `total_paid` number — Total paid invoices (all enterprise keys)
    - `total_unpaid` number — Total unpaid invoices
    - `total_current_month` number — Current month usage (not yet invoiced)
    - `paid_invoice_count` integer — Number of paid invoices
    - `unpaid_invoice_count` integer — Number of unpaid invoices
    - `active_enterprise_keys` integer — Number of active enterprise keys
  - `keys` EnterpriseKeyBilling[]
    - `key_id` string, required — API key ID
    - `key_name` string, required — Key display name
    - `key_preview` string, nullable — Key preview (first 12 chars)
    - `status` string, required — Key status: active, pending, revoked
    - `created_at` string, required — Key creation timestamp
    - `user_id` string, required — User ID who owns the key
    - `user_email` string, nullable — User email
    - `company_name` string, nullable — Company name
    - `credit_limit_usd` number — Credit limit for this key
    - `monthly_budget_usd` number, nullable — Monthly budget if set
    - `total_paid` number — Total paid invoices (all time)
    - `total_unpaid` number — Total unpaid invoices
    - `current_month_usage` number — Current month usage (not yet invoiced)
    - `paid_invoice_count` integer — Number of paid invoices
    - `unpaid_invoice_count` integer — Number of unpaid invoices
    - `invoices` EnterpriseInvoice[] — All invoices for this key
      - `id` string, required — Invoice record ID
      - `api_key_id` string, required — API key ID
      - `billing_month` string, required — Billing month (YYYY-MM)
      - `usage_usd` number — Usage amount for the month
      - `total_requests` integer — Total requests in the month
      - `invoice_paid` boolean — Whether invoice is paid
      - `invoice_generated_at` string, nullable — When invoice was generated
      - `paid_at` string, nullable — When invoice was paid
    - `category` string — admin | pilot | customer
  - `total` integer — Total enterprise keys

## Other responses

- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/compresr/apis/compresr-platform-api.md) · [All operations](https://skmtc.net/compresr/apis/compresr-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/compresr/compresr-platform-api/revisions/93ee959dfa51/schema)
