Skip to main content
GET
Get an LLM usage time series

Authorizations

Authorization
string
header
required

User-bound credential carrying an identity: either a session JWT or a user access token (at:*) generated from the user settings UI. Send as Authorization: Bearer <token>. The organization and the permissions applied are those of this user.

Query Parameters

period
enum<string>
default:30d

Sliding window ending now. Any other value uses 30d. Ignored when both from_date and to_date are set.

Available options:
7d,
30d,
90d
from_date
string<date-time>

Start of a custom range, ISO 8601. Used only together with to_date, and then takes precedence over period (period is returned as custom).

Maximum string length: 64
to_date
string<date-time>

End of a custom range, ISO 8601. Used only together with from_date.

Maximum string length: 64
granularity
enum<string>

Bucket size. Defaults to hourly for ranges of 2 days or less, daily otherwise.

Available options:
hourly,
daily
user_id
string

Only count this user's usage.

Maximum string length: 128
Pattern: ^[a-zA-Z0-9_-]+$
model
string

Only count this model's usage.

Maximum string length: 128
Pattern: ^[a-zA-Z0-9._:-]+$
call_type
string

Only count completions of this call type (e.g. agent_turn). Embeddings are then excluded.

Maximum string length: 40
Pattern: ^[a-z_]+$

Response

LLM usage time series.

series
object[]
by_user
object[]
totals
object
meta
object