All functions
getCredits
Returns the current day's credit usage statistics for the authenticated organization, including credits used, the daily limit based on the active plan, and the remaining balance.
Free
Use cases
Dashboard credit monitoring
Display real-time credit consumption in your app dashboard. Integrate the credits API into your admin panel to show used/remaining credits and warn users before they hit their limit.
Parameters
| Name | Type | Description | |
|---|---|---|---|
| organizationId | string | required | The ID of the organization to query credits for |
Response
| Name | Type | Description |
|---|---|---|
| used | number | Credits consumed this billing period |
| limit | number | Maximum credits available per billing period |
| remaining | number | Credits still available (limit minus used) |