Skip to content

Usage breakdown by user

GET
/api/workspaces/{workspaceId}/usage/by-user
workspaceId
required
string
from
string
to
string

Per-user usage breakdown.

object
users
required
Array
object
totalInputTokens
required
number
totalOutputTokens
required
number
totalCacheReadTokens
required
number
totalCacheWriteTokens
required
number
totalReasoningTokens
required
number
totalTokens
required
number
totalCostUsd
required
number
invocationCount
required
number
userId
required
string | null

Invalid request

object
success
boolean
error
required
string
Example
Human-readable error message

Authentication required

object
success
boolean
error
required
string
Example
Human-readable error message

Forbidden

object
success
boolean
error
required
string
Example
Human-readable error message

Not found

object
success
boolean
error
required
string
Example
Human-readable error message

Conflict

object
success
boolean
error
required
string
Example
Human-readable error message

Internal server error

object
success
boolean
error
required
string
Example
Human-readable error message