List charges or runs
Changed onThe ledger charges behind the numbers (group=charge), or those charges grouped by run (group=run) with each run's lifetime total alongside. Cursor-paginated: pass next_cursor as cursor.
All analytics endpoints return { "data": ..., "meta": ... }. meta carries the resolved range (from inclusive, to exclusive, ISO 8601 UTC), timezone, the comparison period, applied filters, data_as_of, money_unit, time_basis and attribution_scope.
Amounts are whole credits; fields ending in _cents are credits (1 credit = 1 cent). Charges are counted when they were posted to the ledger. On team accounts, non-members only see their own identity dimensions (attribution_scope: self); others collapse into "Other ..." groups.
With format=csv the response is text/csv; exports are capped at 10,000 rows and fail with 400 export_too_large instead of truncating.
Request
- Base URL: https://api.varg.ai/v2
- URL: https://api.varg.ai/v2/analytics/activity
- Auth: HTTP bearer
Query parameters
Range start, inclusive. YYYY-MM-DD (local midnight in timezone), a local date-time (2026-09-01T09:30), or an ISO 8601 instant with offset. Default: to minus 30 days. Ranges are limited to 366 days.
Range end, exclusive. Same formats as from. Default is now.
IANA timezone used for date-only bounds and calendar buckets. Default UTC.
previous_period compares against the equal-length period right before from; none disables comparison. Default is previous_period on /analytics/summary and none elsewhere. Ignored when compare_from/compare_to are given.
Explicit comparison start. Must be sent together with compare_to.
Explicit comparison end, exclusive. Must be sent together with compare_from.
Filter by capability. Comma-separated tool keys (video, image, speech, music, render, pipeline, ...) or none. Up to 50 values.
Filter by model. Comma-separated model ids or none. Up to 50 values.
Filter by folder. Comma-separated folder ids or none (no folder). Up to 50 values.
Filter by the API key that started the run. Comma-separated key ids or none. Up to 50 values.
Filter by the person who started the run. Comma-separated user ids or none. Up to 50 values.
Filter by creator: api_key:<id> (a personal API key) or member:<id> (a person), comma-separated, or none. Up to 50 values.
Filter by how the run was started. Comma-separated values of app (a person in the web app), api (API key, SDK, CLI), mcp (an agent via MCP), internal (varg system keys), unknown.
Filter by the charged job's status. Comma-separated values of completed, failed, cancelled, awaiting_confirmation, running, submitting, queued, unknown.
charge (default) lists individual ledger charges; run groups them by run.
recent (default) newest first; amount largest first.
Page size. 1-200, default 50. Out-of-range values are clamped. Ignored for CSV.
The next_cursor of the previous page. Opaque; only valid with the same group and sort.
json (default) returns the { data, meta } envelope. csv returns the same rows as text/csv with a Content-Disposition attachment filename. Amounts are in credits.
Response
Result envelope (JSON) or CSV export
Example response
{
"meta": {
"definition_version": "2026-09-28",
"timezone": "UTC"
}
}Changes
- info
endpoint added
- info