Prudai Developer API: usage
Your organisation’s usage per period.
Base URL https://api.prudai.com/v1. Logging in is in Login, scopes in Scopes and permissions, errors in Errors. Overview.
| Method | Path | What it does | State |
|---|---|---|---|
GET | /v1/usage | Aggregated usage | In production |
Aggregated usage
GET /v1/usage
Usage of all keys of your organisation in the same environment as the calling key
(live keys see live usage, test keys see test usage), aggregated per UTC day, key,
model and/or operation. Contains metadata only, never content.
Credit amounts are null until credit accounting is enabled; free operations then cost 0.
Source grouping and filtering are reserved and return 422 unsupported_parameter
until source metadata is recorded. Personal credentials require an Owner or Admin role.
- State: in production.
- Scope:
account:usage:read - Approval:
none, no extra step.
Parameters
start_daterequired
First UTC day (inclusive).end_date
Last UTC day (inclusive). Defaults to today. The range is at most 366 days.group_by
Dimensions to group by, comma-separated. Defaultday. The reservedsourcedimension returns 422unsupported_parameter. One of:day,key,model,operation,sourcekey_id
Only usage of this key. Public id of an API key (not the secret). pattern^key_[A-Za-z0-9]{20}$model
Only usage of this model (product or product/specialisation). A product, optionally followed by/and a specialisation slug (e.g.leo/arbeidsrecht). max length 80 · pattern^(leo|leo-fiscaal|zia|vera|bever|maia)(/[a-z0-9]+(-[a-z0-9]+)*)?$operation
Only usage of this operation. The metered manifest operation identifier. Legacy dotted operation names are accepted as filters. pattern^[A-Za-z][A-Za-z0-9_.-]{0,99}$source_id
Reserved source filter. Currently returns 422unsupported_parameter. Public source id from the Prudai source catalogue. max length 80 · pattern^[a-z0-9]+(-[a-z0-9]+)*$
Responses
| Status | Meaning |
|---|---|
200 | The usage report. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
500 | Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits). |
Fields in data (200)
object
usage.reportstart_dateend_dategroup_by
One of:day,key,model,operation,sourcedatadata[].date
Set when grouped byday. may benulldata[].key_id
Set when grouped bykey. may benulldata[].key_name
may benulldata[].model
Set when grouped bymodel(null for operations without a model, such as search). may benulldata[].operation
Set when grouped byoperation. may benulldata[].source_id
Set when grouped bysource. may benulldata[].requests
min 0data[].failed_requests
min 0data[].input_tokens
min 0data[].cached_input_tokens
min 0data[].output_tokens
min 0data[].reasoning_tokens
min 0data[].priced_tool_calls
min 0data[].source_requests
min 0data[].credits
Null while credit accounting is disabled or the metered amount is unavailable. may benulltotalstotals.requests
min 0totals.failed_requests
Requests that ended in an error (not charged unless partial work was charged). min 0totals.input_tokens
min 0totals.cached_input_tokens
min 0totals.output_tokens
min 0totals.reasoning_tokens
min 0totals.priced_tool_calls
min 0totals.source_requests
/sources/*and/citations/verifyrequests (free at launch, counted here). min 0totals.credits
Null while credit accounting is disabled or the metered amount is unavailable. may benull
curl -s "https://api.prudai.com/v1/usage?start_date=%3Cstart_date%3E" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo usage{ "object": "usage.report", "start_date": "2026-11-05", "end_date": "2026-11-05", "group_by": [ "day" ], "data": [ { "date": "2026-11-05", "key_id": "string", "key_name": "string", "model": "leo", "operation": "listModels", "source_id": "string", "requests": 1, "failed_requests": 1, "input_tokens": 1, "cached_input_tokens": 1, "output_tokens": 1, "reasoning_tokens": 1, "priced_tool_calls": 1, "source_requests": 1, "credits": 1 } ], "totals": { "requests": 1, "failed_requests": 1, "input_tokens": 1, "cached_input_tokens": 1, "output_tokens": 1, "reasoning_tokens": 1, "priced_tool_calls": 1, "source_requests": 1, "credits": 1 }}