admin

Get usage summary

Changed on
get/admin/usage/summary

Request

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

cache_write_input_tokensinteger
cached_input_tokensinteger
rewrite_cost_savednumber
rewrite_tokens_savedinteger

Rewrite savings: prompt tokens request rewriters removed before the provider call, and the estimated input cost avoided (nil when no matched row had a priced savings estimate).

total_billed_costnumber nullable

TotalBilledCost is what the period was billed at: provider cost plus markup. Unlike the other cost fields it includes billed response-cache hits in every cache mode, because those are billed to the caller too.

total_costnumber
total_input_costnumber
total_input_tokensinteger
total_output_costnumber
total_output_tokensinteger
total_requestsinteger
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