Metering: current UTC-day bucket ({window, as_of, currency, total, by_model, by_key}), raw token split + derived spend_micros

Changed on
get/api/v1/admin/usage

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header x-admin-token
    • HTTP bearer

Query parameters

windowstring

A PAST UTC-day bucket start epoch (default: current bucket). The response is always ONE bucket; spend_micros is a read-time estimate; bill from the raw token split, never store spend_micros as a ledger charge

Response

OK

as_ofinteger required

Freshness marker: the epoch this read was computed at (counters accumulate live).

by_key_truncatedboolean required

True when by_key was truncated to the cap (a deployment with more active keys than the cap). by_model is never capped (bounded by the configured model fleet).

currencystring required

The denomination of every spend_micros in this response (USAGE_CURRENCY, currently "USD"). A single-const source of truth so removal is one line. Emitted only here.

Changes

    • info

      api operation id GetUsage was added

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status