Skip to main content
GET
Get usage and cost

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

from
string<date-time>

Start date (ISO 8601)

Example:

"2024-01-01T00:00:00.000Z"

to
string<date-time>

End date (ISO 8601)

Example:

"2024-12-31T23:59:59.999Z"

groupBy
enum<string>
default:agent

agent and day come from the daily usage records (days in UTC). model comes from per-conversation usage, by the day the conversation started.

Available options:
agent,
day,
model
agentIds
string

Comma-separated agent ids. Default: every agent the key can access.

Example:

"clx1agent,clx2agent"

Response

from
string<date-time>
required
to
string<date-time>
required
groupBy
enum<string>
required
Available options:
agent,
day,
model
costIncluded
boolean
required

Whether costUsd is included (the key has billing:read).

total
object
required
rows
object[]
required
credits
object

The team's credit balance for the current billing period. Only for keys that cover all agents.