Skip to main content
Client List Usage Records
Rate Limit: This endpoint is limited to requests per minute per user.

Multiple Usage Records per Run

A Run can have separate usage records for Prompt executions and document processing. These records may be split further by cost type or credit grant. A single Run can therefore have several records with the same run_id and type: "agent_run". The response does not include Prompt IDs, cost types, or credit grants, so records may look alike. Keep each record when calculating usage.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>. The <token> represents your API key, which must be acquired from the Kolena platform.

Query Parameters

page_number
integer
default:0

Optionally specify the index of the Usage Records page to fetch.

Required range: x >= 0
page_size
integer
default:50

Optionally specify the maximum number of Usage Records to fetch.

Required range: 0 <= x <= 1000
created_gte
string<date-time> | null

Optionally filter Usage Records created on or after this timestamp (inclusive). Accepts ISO 8601 format (e.g., 2024-01-15T10:30:00Z or 2024-01-15T10:30:00+00:00).

created_lte
string<date-time> | null

Optionally filter Usage Records created on or before this timestamp (inclusive). Accepts ISO 8601 format (e.g., 2024-01-15T23:59:59Z or 2024-01-15T23:59:59+00:00).

agent_id
integer | null

Optionally filter Usage Records to those associated with this Agent.

workspace_id
integer | null

Optionally filter Usage Records to those within this Workspace.

user
string | null

Optionally filter Usage Records to those attributed to this user.

Response

Successful Response

records
ClientUsageRecord · object[]
required

The fetched page of Usage Records. A single Run can have multiple records.

total_pages
integer
required

The total number of pages of Usage Records. Use the request arguments page_number and page_size to control which Usage Records are fetched.

page_number
integer
required

The number of the fetched page.

page_size
integer
required

The page size, i.e. number of Usage Records, fetched.