Skip to main content
GET
/
api
/
admins
/
credits
/
events
cURL
curl --request GET \
  --url https://api.recoupable.com/api/admins/credits/events \
  --header 'x-api-key: <api-key>'
{
  "status": "success",
  "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "period": "all",
  "page": 2,
  "limit": 2,
  "total_count": 1,
  "events": [
    {
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "source": "web",
      "agent_type": "main",
      "input_tokens": 123,
      "cached_input_tokens": 123,
      "output_tokens": 123,
      "tool_call_count": 123,
      "credits_deducted_cents": 123,
      "provider": "<string>",
      "model_id": "<string>"
    }
  ],
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://developers.recoupable.com/llms.txt

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

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Query Parameters

account_id
string<uuid>
required

UUID of the account whose usage_events rows to return.

period
enum<string>
default:monthly

Window to filter created_at against. Same semantics as the rollup endpoint. Defaults to monthly.

Available options:
all,
daily,
weekly,
monthly
limit
integer
default:100

Page size — number of events to return per request, sorted by created_at descending. Defaults to 100; max 500.

Required range: 1 <= x <= 500
page
integer
default:1

1-indexed page number. Server returns rows (page - 1) * limit through page * limit - 1. Defaults to 1. Use total_count in the response to drive a 'load more' control on the drilldown (page * limit < total_count).

Required range: x >= 1

Response

Usage events retrieved successfully

status
enum<string>
required

Status of the request

Available options:
success,
error
account_id
string<uuid>
required

UUID of the account whose events were returned (echoes the request)

period
enum<string>
required

The period the response was filtered to (echoes the request)

Available options:
all,
daily,
weekly,
monthly
page
integer
required

1-indexed page returned (echoes the request, or 1 if omitted)

Required range: x >= 1
limit
integer
required

Page size used for this response (echoes the request, or the default if omitted)

Required range: x >= 1
total_count
integer
required

Total number of usage_events rows for this account in the selected period (i.e. the size of the full result set before pagination). The client derives has_more as page * limit < total_count and shows 'X of Y events'. Computed via a COUNT(*) query alongside the paginated row fetch.

Required range: x >= 0
events
object[]
required

Raw usage_events rows, sorted by created_at descending

error
string

Error message (only present if status is 'error')