admin

Export billed usage as per-customer invoices

Changed on

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.

get/admin/usage/invoice

Request

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

Query parameters

formatstring

Export format: csv (default, as an attachment) or json

parentstring

Bill each direct child of this user path as one customer, e.g. /customers

daysinteger

Number of days (default 30)

start_datestring

Start date (YYYY-MM-DD)

end_datestring

End date (YYYY-MM-DD)

modelstring[]

Filter by exact model names; repeat or comma-separate for several

providerstring[]

Filter by provider names or types; repeat or comma-separate for several

labelstring[]

Filter by request labels (exact match); repeat for several

endpointstring[]

Filter by exact request endpoints, e.g. /v1/chat/completions,/v1/messages; repeat or comma-separate for several

operationstring

Filter by comma-separated operations, e.g. chat_completions,embeddings

session_idstring

Filter by exact detected session ID

auth_key_idstring[]

Filter by managed auth key IDs; repeat or comma-separate for several

user_pathstring[]

Filter by tracked user path subtrees; repeat for several

Response

OK

currencystring
end_datestring
parentstring
start_datestring

Changes