Workspace.Chats.Usage
Tags: chat, communication, messaging
Endpoints
GET /{chat_id}/token-usage- Token Usage
Token Usage
GET /api/v2/w/{workspace_uuid}/chats/{chat_id}/token-usage
Description:
Chat usage information
Get aggregated token usage statistics for a specific chat.
Returns the total prompt tokens, completion tokens, total tokens, cached tokens, and credits used by all messages in this chat, including STT and TTS usage from voice calls.
Path Parameters:
chat_id: Chat ID to retrieve token usage for
Response: Returns a ChatTokenUsageResponse with aggregated token counts and credits.
Permissions: Self-access: Users can view token usage for their own chats. Admin access: CHATS_READ scope required to view other members' chat usage.
Error Responses:
401 Unauthorized: Missing or invalid authentication403 Forbidden: User does not have permission to view this chat404 Not Found: Chat not found
Authentication: Requires workspace member
Parameters:
chat_id(Integer)
Response: See ChatTokenUsageResponse