AI Gateway Usage
get/ai/usage/summary

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/ai/usage/summary
  • Auth: HTTP bearer

Query parameters

fromstring

ISO 8601 start time (defaults to 24h ago)

tostring

ISO 8601 end time (defaults to now)

Response

Usage summary for the time range

avg_latency_msnumber double required
byok_countinteger required
error_countinteger required
streaming_countinteger required
total_cost_microcentsinteger required
total_input_tokensinteger required
total_output_tokensinteger required
total_requestsinteger required
total_tokensinteger required

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status