Loading
Loading
Retrieve real-time credit usage information for both one-off and subscription credits. This endpoint is restricted to organization admins and cannot be accessed by organization members.
The Credits Usage API returns a detailed breakdown of your organization's credit consumption, including subscription credits, surcharge credits, and one-off credits.
Authorize every request with your API key, passed either as a header or as a query parameter:
X-apiKeyapiKeyThis is version v1.0 of the API.
Optional query parameter to control the response format.
formatoptionalStringdefault: jsonResponse format: 'json' (default) or 'xml'.
A successful request returns a 200 OK response with a JSON object containing the credit usage data. See the response preview on the right for the full JSON structure.
apiKeyAPI key provided in the request whose usage is required.
userStatusStatus of the user account. Possible values: active, inactive, deleted.
subActiveWhether subscription credits are consumable.
subStatusStatus of the subscription credits. Possible values: active, overdue, cancelled, deactivated.
subAllowedCreditsAllowed credits limit of the subscription.
subUsedCreditsUsed credits from the subscription.
subSurchargeStatusStatus of subscription surcharge. Possible values: none, payment_added, payment_cleared.
subSurchargeAllowedCreditsSurcharge allowed credits for the subscription.
subSurchargeUsedCreditsSurcharge used credits for the subscription.
subSurchargeAllowedWhether surcharge credits are allowed for the subscription.
oneOffCreditsActiveWhether one-off credits are consumable.
oneOffAllowedCreditsAllowed credits limit of one-off credits.
oneOffUsedCreditsUsed credits from one-off credits.
Besides the response body, every response carries custom headers you can use to track credit usage, and concurrency usage on endpoints that enforce a concurrency limit. See the Custom Response Headers documentation and the endpoints with concurrency limits for more details.
X-Concurrent-Threadsheaderconcurrency-limited endpointsSpecifies the maximum number of concurrent requests allowed.
X-Concurrent-Threads-Activeheaderconcurrency-limited endpointsIndicates the number of active concurrent requests being processed.
X-AF-Credits-Costheaderall responsesSpecifies the number of credits consumed by the current request.
See the HTTP Status Codes documentation for a complete reference of common API errors and HTTP status codes.
You need to be organization admin to access this endpoint.