remagicaDocs home
API referenceUsage

Get credits

GET
/credits

Needs a key withusage:read

The workspace's credit balance (what it may spend now: its credits less any debt and what runs in progress set aside), its plan, credits expiring in the next 7 days, what you've spent this month and your credit limit if an admin set one. New workspaces start at 0: credits come from a paid plan, a credit pack or a code.

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

The balance.

application/json
  1. response
balance*integer

Credits the workspace may spend now: its unexpired credits less any debt and what runs in progress set aside.

canGrant*boolean

You may add credits by hand (Remagica staff only).

canManage*boolean

You may set members' credit limits (owners and admins).

debt*integer

Credits spent beyond what the workspace held (e.g. a refunded purchase); the next credits added pay it first.

expiringSoon*integer

Credits that expire in the next 7 days if not spent.

frozen*boolean

The workspace's credits are on hold (a payment is being looked into): runs and generations are refused.

held*integer

Credits set aside for workflow runs in progress.

nextExpiry*|

When the workspace's next credits expire, if any do.

personal*boolean

This is someone's personal workspace (made at sign-up).

plan*string

The workspace's plan: which models it may use.

Value in"free""creator""pro""studio""agency""enterprise"
trialAwaitsVerification*boolean

Verifying your email would give this workspace your free trial credits. Always false: new accounts no longer get a free trial.

you*
Example Request
curl -X GET 'https://api.remagica.com/api/v1/credits'
Example Response
{  "balance": 12,  "canGrant": true,  "canManage": true,  "debt": 12,  "expiringSoon": 12,  "frozen": true,  "held": 1,  "nextExpiry": "2026-10-21T12:00:00.000Z",  "personal": true,  "plan": "free",  "trialAwaitsVerification": true,  "you": {    "cap": {      "creditMax": 1,      "period": "monthly",      "resetsAt": "2026-10-21T12:00:00.000Z",      "spent": 12    },    "spentThisMonth": 12  }}