Skip to main content
Client List Usage Records
curl --request GET \
  --url https://agents-api.kolena.com/api/v1/client/usage \
  --header 'Authorization: Bearer <token>'
{
  "records": [
    {
      "type": "<string>",
      "workspace_id": 123,
      "agent_id": 123,
      "run_id": 123,
      "user": "<string>",
      "created": "2023-11-07T05:31:56Z",
      "credits_used": 123,
      "validation_id": 123
    }
  ],
  "total_pages": 123,
  "page_number": 123,
  "page_size": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.agents.kolena.com/llms.txt

Use this file to discover all available pages before exploring further.

Rate Limit: This endpoint is limited to requests per minute per user.

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.

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.