Export the credit ledger entry by entry

Export the organization's credit ledger for a time window, newest first — one entry per metered inference call, for loading into your own warehouse and modelling cost per message, per agent, or per model.

The unit is one metered call, not one message. How many entries a single conversation turn produces depends on the engine that served it. Group by traceId to get the cost of a turn.

Nothing is filtered out. Entries Runbear does not bill for — memory updates, ambient runs, gating, context compaction — are included with chargeable: false, and entries with a null traceId are included too. Summing credits over the entries with chargeable: true for a billing period gives exactly the currentUsageCredits that GET /v1/credits/usage reports for it. That is the property to check your load against.

Pass from and to to bound the window; it may not exceed 31 days per request. Follow nextCursor until it is null to walk a window in full. History reaches back to the organization's first recorded usage — the ledger has no retention cutoff, and traceId reaches back with it.

get/v1/credits/usage/entries

Request

  • Base URL
    https://api.runbear.io
  • Auth
    HTTP bearer

Query parameters

fromstring required

Start of the window to export (ISO 8601), inclusive. Required.

tostring required

End of the window (ISO 8601), exclusive. Required.

limitinteger

Maximum number of entries per page (1–1000). Defaults to 500.

Example:500
cursorstring

Opaque pagination cursor. Pass the nextCursor from the previous response. Omit on the first request.

Response

Default Response

nextCursorstring nullable required

Opaque cursor for the next page, or null once the window has been fully exported.

Changes

No recorded changes to this operation across all 1 revision of this API.