LlmKeys

get llm key usage

Changed on

Returns aggregated usage statistics for the specified LLM key over a date range.

get/llm_keys/{id}/usage

Request

  • Base URL
    https://api.aptible.com
  • Auth
    API key in header Authorization

Path parameters

idinteger required

LLM Key database ID

Query parameters

start_datestring required

Start date for the usage period (YYYY-MM-DD)

end_datestring required

End date for the usage period (YYYY-MM-DD, exclusive)

no_embedboolean

When true, omits embedded resources from the response. Also triggered when the Prefer: no_sensitive_extras=true header is present.

Headers

Prefer'no_sensitive_extras=true'

When set to no_sensitive_extras=true, omits sensitive fields and embedded resources from the response.

Response

successful

spendnumber

Total spend in USD

input_tokensinteger

Total input (prompt) tokens

output_tokensinteger

Total output (completion) tokens

successful_requestsinteger

Total successful API requests

failed_requestsinteger

Total failed API requests

Changes