remagicaDocs home
API referenceProjects

Get credit usage

GET
/credit-usage

Needs a key withusage:read

Credits your workspace's generations have used this month (failed ones cost nothing).

Requires scope usage:read.

Authorization

apiKey
headerx-api-key<token>

An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.

Response Body

This month's usage.

application/json
  1. response
creditsThisMonth*integer

Credits the workspace's generations used since the 1st (UTC).

Example Request
curl -X GET 'https://api.remagica.com/api/v1/credit-usage'
Example Response
{  "creditsThisMonth": 12}