---
title: "Export billed usage as per-customer invoices"
method: GET
path: "/admin/usage/invoice"
tags: ["admin"]
---

# Export billed usage as per-customer invoices

`GET /admin/usage/invoice`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/admin/usage/invoice`
- Auth: HTTP bearer

Returns billed usage for the period, one block of model/provider line items per customer user path, with subtotals and a grand total. Amounts are USD. With parent, each direct child of that user path is one customer (usage on the parent itself stays under the parent); without it every user path is its own customer. Requests, tokens and provider cost cover provider-served requests; billed cost also includes billed response-cache hits. CSV rows carry row_type item, subtotal or total. Requires a GoModel Pro license with the billing entitlement and pricing.markups_enabled.

## Query parameters

- `format` string
- `parent` string
- `days` integer
- `start_date` string
- `end_date` string
- `model` string[]
- `provider` string[]
- `label` string[]
- `endpoint` string[]
- `operation` string
- `session_id` string
- `auth_key_id` string[]
- `user_path` string[]

## Response `200`

OK

- UsageInvoice
  - `currency` string
  - `customers` UsageInvoiceCustomer[]
    - `customer` string
    - `lines` UsageInvoiceLine[]
      - `billed_cost` number, nullable
      - `effective_markup_percent` number, nullable
      - `input_tokens` integer
      - `model` string
      - `output_tokens` integer
      - `provider` string
      - `provider_cost` number, nullable
      - `requests` integer
    - `subtotal` UsageInvoiceAmounts
      - `billed_cost` number, nullable
      - `effective_markup_percent` number, nullable
      - `input_tokens` integer
      - `output_tokens` integer
      - `provider_cost` number, nullable
      - `requests` integer
  - `end_date` string
  - `parent` string
  - `start_date` string
  - `total` UsageInvoiceAmounts
    - `billed_cost` number, nullable
    - `effective_markup_percent` number, nullable
    - `input_tokens` integer
    - `output_tokens` integer
    - `provider_cost` number, nullable
    - `requests` integer

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `409`: Conflict

## Changes

- **2026-10-26** `3568270b72f9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/enterpilot/apis/gomodel-api/changes/admin/usage/invoice/get.md)

---

[API](https://skmtc.dev/enterpilot/apis/gomodel-api.md) - [All operations](https://skmtc.dev/enterpilot/apis/gomodel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/enterpilot/apis/gomodel-api/revisions/02d5643d7bec?raw)
