Knowledge Bases

Get all document token usage

Changed on

Get token usage / cost tracking across all of the user's documents.

get/api/v0/knowledge-bases/stats/token-usage

Request

Response

Successful Response

total_input_tokensinteger required

Total input tokens across all documents.

total_cached_input_tokensinteger

Total cached input tokens across all documents.

total_output_tokensinteger required

Total output tokens across all documents.

total_estimated_cost_usdnumber required

Total estimated cost in USD, at the price in force on the day of each call.

total_duration_msinteger required

Total LLM call duration in milliseconds across all documents.

total_llm_callsinteger required

Total number of LLM calls.

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

    • info

      added the optional property to the response with the status