admin

Get usage breakdown by period

Changed on
get/admin/usage/daily

Request

  • Base URL
    http://localhost:8080
  • URL
    http://localhost:8080/admin/usage/daily
  • 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)

intervalstring

Grouping interval: daily, weekly, monthly, yearly (default daily)

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

BilledCost includes the period's billed response-cache hits in every cache mode, so a period served only from the cache can appear with no requests.

cache_write_input_tokensinteger
cached_input_tokensinteger
datestring
input_costnumber
input_tokensinteger
output_costnumber
output_tokensinteger
requestsinteger
total_costnumber
total_tokensinteger
uncached_input_tokensinteger

Provider prompt-cache split of the period's input, folded per row from raw_data (same source as the summary). Zero when the storage layer does not populate them.

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