v0 Platform API/API Reference/Reports
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.
GET/v1/reports/usage
Usage
TypeScript Example
API Signature
Request
Query Parameters
startDate?: string
Query parameter "startDate"
endDate?: string
Query parameter "endDate"
chatId?: string
Query parameter "chatId"
messageId?: string
Query parameter "messageId"
limit?: number
Query parameter "limit"
cursor?: string
Base64 encoded cursor containing pagination data
Response
object: 'list'
data: object[]
id: string
object: 'usage_event'
type?: 'image_generation' | 'message' | 'manual_debit' | 'api_request' | 'inline-edit'
promptCost?: string
completionCost?: string
totalCost: string
chatId?: string
messageId?: string
userId?: string
pagination: object
hasMore: boolean
nextCursor?: string
nextUrl?: string
meta: object
totalCount: number