AI Gateway Usage

GET /ai/usage/timeseries

Changed on

Request

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

Query parameters

fromstring

ISO 8601 start time (defaults to 24h ago)

tostring

ISO 8601 end time (defaults to now)

bucketstring

Bucket size: hour, day, week (defaults to day)

project_idinteger

Filter by project ID (deployment-token usage; instance administrators only)

Response

Time-series usage data

avg_latency_msnumber double required
bucketstring required

ISO 8601 timestamp

input_tokensinteger required
output_tokensinteger required
request_countinteger required

Changes

    • breaking

      removed the required property extensions from the response with the status

    • breaking

      removed the required property extensions from the response with the status

    • breaking

      removed the required property extensions from the response with the status