Monitor your API usage
Report on credit consumption and API activity per organization — totals, a per-key breakdown, and a paginated call log you can filter.
Requires: a Bearer JWT with theBILLING_ACCESSpermission on the organization. Endpoints are addressed byorganizationId.
Usage totals
The api-usage endpoint returns aggregate calls and credits over an ISO 8601 date range, including creditsRemaining in the current allowance.
curl -H "Authorization: Bearer eyJhbGci..." \
"https://api.topolab.nl/v1/credits/org_8f3a2c7e/api-usage?startDate=2026-05-01&endDate=2026-05-31"
Usage by key
The by-key variant breaks the same totals down per API key, so you can attribute spend to a specific workload.
curl -H "Authorization: Bearer eyJhbGci..." \
"https://api.topolab.nl/v1/credits/org_8f3a2c7e/api-usage/by-key"
Call log
The api-logs endpoint returns individual calls, newest first, with the credits each consumed. Narrow it with page, limit (max 100), startDate, endDate, apiKeyId, and datasetId; page through by incrementing page until page * limit >= total.
curl -H "Authorization: Bearer eyJhbGci..." \
"https://api.topolab.nl/v1/credits/org_8f3a2c7e/api-logs?page=1&limit=50&startDate=2026-05-01&endDate=2026-05-31&apiKeyId=key_9a2c7e8b"
Per-key usageFor a single key without the organization scope, use the key-level endpoint from the API keys reference: GET /v1/api-keys/:id/usage?startDate=&endDate=.
Laatst bijgewerkt 25 juli 2026