Get Usage Report
Retrieves detailed usage events for the authenticated user or team, including costs, event types, models used, and metadata. Shows the same data as displayed in the usage dashboard. Can be filtered by chatId to show usage for a specific chat, or by userId to show usage for a specific user.
Query parameters
Query parameter "startDate"
Query parameter "endDate"
Query parameter "chatId"
Query parameter "messageId"
Query parameter "userId"
Bounds the raw billing transactions scanned per ledger group and page. A page can contain more events than this value (large teams are scanned in parallel ledger groups), and a filtered page (chatId, userId, or messageId) can contain fewer or zero events while more data remains. Events are sorted newest-first within a page but not across pages on large teams. Always paginate with pagination.hasMore and pagination.nextCursor rather than stopping on an empty page.
Bounds the raw billing transactions scanned per ledger group and page. A page can contain more events than this value (large teams are scanned in parallel ledger groups), and a filtered page (chatId, userId, or messageId) can contain fewer or zero events while more data remains. Events are sorted newest-first within a page but not across pages on large teams. Always paginate with pagination.hasMore and pagination.nextCursor rather than stopping on an empty page.
Base64 encoded cursor containing pagination data
Base64 encoded cursor containing pagination data
Response
Success