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.
Request
- Base URLhttps://api.runbear.io
- AuthHTTP bearer
Query parameters
Start of the window to export (ISO 8601), inclusive. Required.
End of the window (ISO 8601), exclusive. Required.
Maximum number of entries per page (1–1000). Defaults to 500.
Opaque pagination cursor. Pass the nextCursor from the previous response. Omit on the first request.
Response
Default Response
Changes
No recorded changes to this operation across all 1 revision of this API.