AI Gateway Usage
get/ai/usage/conversations

Request

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

Query parameters

fromstring

ISO 8601 start time (defaults to 24h ago)

tostring

ISO 8601 end time (defaults to now)

limitinteger

Max results (defaults to 50, max 100)

user_idinteger

Filter by user ID

tagsstring

Filter by tags (comma-separated)

modelstring

Filter by model name

Response

Conversation summaries

avg_latency_msnumber double required
conversation_idstring required
first_atstring required
last_atstring required
message_countinteger required
models_usedstring[] required
total_cost_microcentsinteger required
total_input_tokensinteger required
total_output_tokensinteger 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