admin

Get usage breakdown by request label

Changed on

Returns per-label token and cost aggregates. Requests carrying several labels count once per label, so rows overlap and do not sum to the period totals. Unlabelled requests are omitted.

get/admin/usage/labels

Request

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

Query parameters

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

cache_modestring

Cache mode filter: uncached, cached, all (default uncached)

Response

OK

billed_costnumber nullable
cache_write_input_tokensinteger
cached_input_costnumber nullable
cached_input_tokensinteger
input_costnumber nullable
input_tokensinteger
labelstring
local_cached_input_tokensinteger
local_cached_output_tokensinteger
output_costnumber nullable
output_tokensinteger
requestsinteger
total_costnumber nullable
total_tokensinteger
uncached_input_tokensinteger

Changes

    • info

      for the query request parameter auth_key_id, the type was generalized from string to array

    • info

      for the query request parameter endpoint, the type was generalized from string to array

    • info

      for the query request parameter label, the type was generalized from string to array

    • info

      for the query request parameter model, the type was generalized from string to array

    • info

      for the query request parameter provider, the type was generalized from string to array

    • info

      for the query request parameter user_path, the type was generalized from string to array

    • info

      added the optional property / to the response with the status