Skip to content

Organisation stats

Usage and credit for the current billing period. Useful for a “credits remaining” indicator in your own product, or for a pre-flight check before submitting a large batch — running out of credit mid-batch is a normal outcome, but it’s cheaper to know beforehand.

GET /v1/organisation/stats

The organisation is derived from the API key itself — there is nothing to pass.

import asyncio
from pagr import PagrApiClient
async def main():
async with PagrApiClient("pagr_prod_xxxxxxxx") as client:
stats = await client.get_org_stats()
print(stats) # OrgStats | Acme Inc. (growth) …
if stats.pages_available is not None and stats.pages_available < 100:
print("Running low on page credit")
asyncio.run(main())

None.

None.

None — this is a GET.

200:

{
"organisationName": "Acme Inc.",
"periodStart": "2026-07-01T00:00:00Z",
"periodEnd": "2026-07-31T23:59:59Z",
"tier": "growth",
"includedRendersPerMonth": 5000,
"pagesUsedThisPeriod": 1204,
"pagesAvailable": 3796,
"includedTokensPerMonth": 200000,
"tokensUsedThisPeriod": 41000,
"tokensAvailable": 159000,
"userCount": 4
}
Field Type Description
organisationName string The organisation the API key belongs to.
periodStart / periodEnd string (ISO 8601) The current billing period.
tier string The plan tier, e.g. growth.
includedRendersPerMonth number Page allowance included in the tier.
pagesUsedThisPeriod number Pages consumed so far this period.
pagesAvailable number Pages remaining, floored at 0.
includedTokensPerMonth number AI token allowance.
tokensUsedThisPeriod number AI tokens consumed so far this period.
tokensAvailable number AI tokens remaining.
userCount number Users in the organisation.

“Pages” is the render-credit unit (rendered document pages); “tokens” are AI tokens consumed by AI-assisted template features. Both have a monthly allowance, an amount used this period, and an amount remaining.

SDK Method
Python await client.get_org_stats()
TypeScript await client.getOrgStats()
Java client.getOrgStats()
C# await client.GetOrgStatsAsync(cancellationToken)
Ruby client.org_stats
C++ client.get_org_stats() / get_org_stats_async()
Status code When
401 NotAuthenticated The API key has no associated organisation.

Everything else is auth/transport only. See Errors for the full table.

  • Billing — the workspace view of plan and usage.
  • Usage — historical usage, beyond the current period.
  • Render a document — where the insufficient_credit outcome surfaces.