Hanzo
OpenapiBilling

Every billed call the caller's org made, attributed to a product

Answers one row per BILLED call against the caller's org — transaction id, amount, timestamp and the metered unit.

GET /v1/billing/usage

Addresshttps://api.hanzo.ai/v1/billing/usage
MethodGET
Operationget_billing_usage
AuthAuthorization: Bearer $HANZO_API_KEY

Answers one row per BILLED call against the caller's org — transaction id, amount, timestamp and the metered unit. This is the raw charged ledger, not a rollup.

Each row is stamped with a canonical metadata.product derived from what the meter persisted: agent becomes agents, provisioning becomes the provisioned kind, a token-metered row becomes inference, anything else keeps its metering surface. The ledger has no product field of its own, so this read is where that dimension is made real — from the SAME charged rows, never a second meter. A row that already carries its own product WINS, so the derivation stops the day the meter records one.

product=<id> filters to one product server-side. groupBy=product reduces to {product,requests,amountCents} rollups instead of rows.

amount is whole USD cents, ROUNDED; decimal beside it is the SAME debit exact, as an 18-decimal USD string. Sum decimal. A page of sub-cent token calls totals correctly there and totals ZERO in amount — that difference is real money.

Scoped to the caller's own org's books, where the org's ledger file IS the tenant boundary; no client-supplied subject is ever forwarded. 401 without a validated principal. The co-resident read returns the 2000 most recent debits, newest first; start and end narrow the window only on the split-deploy upstream.

Request

GET /v1/billing/usage takes no parameters and no body — the credential is the whole request.

Response

The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.

Examples

hanzo billing usage get

Billing API · All Hanzo APIs · Interactive reference

How is this guide?

On this page