Skip to content

Metering

Paprika records what each tenant uses, whether or not anyone bills for it. The records stay in PostgreSQL: nothing is ever sent anywhere.

  • A usage event for every render that reached a renderer, synchronous or queued: where it came from (sync, job, batch), its kind (pdf, images, merge), the tenant, the key’s id, the template and version, the tier, the pages, bytes, images and resolution, how long it waited and rendered, and its outcome (ok, cancelled or the error’s code). A worker that stopped mid-job leaves a job-abandoned event for that attempt.
  • A summary when a batch ends: its records done, failed, skipped and cancelled, the pages delivered, the combined file’s size and the time from submission to the end.
  • Each tenant’s storage, by kind (fonts, images, profiles, records files, templates, brand kits, resources, outputs not yet expired: count and bytes), measured once a day (UTC) and worked out whenever asked.

Requests refused before rendering (bad values, a full queue, the rate limit) and template checks aren’t recorded. Events hold ids, counts, times and codes: never a field’s value, a file name or a message.

A tenant reads its own totals with a key that has the keys scope, by day or by month, from the start of this month until now unless it asks for other dates (at most 400 days):

Terminal window
curl -H "Authorization: Bearer $PAPRIKA_KEY" "$PAPRIKA_URL/v1/usage?by=month"

The answer has, for each period, its renders by outcome and kind, the pages and bytes delivered and its batches, and the tenant’s storage now and as last measured.

Every event, oldest first, a page at a time (next is the cursor for the next page):

Terminal window
curl -H "Authorization: Bearer $PAPRIKA_ADMIN_TOKEN" "$PAPRIKA_URL/v1/admin/usage?tenant=fabrikam&limit=100"
{
"metering": "on",
"items": [
{
"id": "use_YvcRoiSYqSDY3aXuNhE8",
"at": "2026-11-10T15:53:32.041Z",
"tenant": "fabrikam",
"key": "coTu9SrdMPLK",
"source": "sync",
"kind": "pdf",
"job": null,
"batch": null,
"template": "tpl_2w6BkFBdwf2dk9o1",
"version": 1,
"tier": "standard",
"pages": 1,
"bytes": 69234,
"images": null,
"dpi": null,
"waitMs": 0,
"renderMs": 16,
"outcome": "ok",
"requestId": "bb845073"
}
],
"next": null
}

Or all of them at once, for a spreadsheet or a billing system, as CSV or newline-delimited JSON (format=ndjson); leave out tenant for every tenant’s:

Terminal window
curl -H "Authorization: Bearer $PAPRIKA_ADMIN_TOKEN" -o usage.csv "$PAPRIKA_URL/v1/admin/usage?from=2026-11-01T00:00:00Z&format=csv"

Storage now and as measured each day:

Terminal window
curl -H "Authorization: Bearer $PAPRIKA_ADMIN_TOKEN" "$PAPRIKA_URL/v1/admin/usage/storage?tenant=fabrikam"
  • PAPRIKA_METERING: on (the default) or off. Off, no events are recorded and no storage measured; the answers say "metering": "off", and storage now is still worked out.
  • PAPRIKA_USAGE_KEEP_DAYS: how long events and measures are kept, 400 days by default, also past their tenant’s deletion, for its last bill.